From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "H. Dieter Wilhelm" Newsgroups: gmane.emacs.devel Subject: Re: Acquiring dependencies for Windows builds Date: Tue, 08 Mar 2022 16:52:52 +0100 Message-ID: References: <83o848tc92.fsf@gnu.org> <86o8473k13.fsf@duenenhof-wilhelm.de> <83ee53ssbx.fsf@gnu.org> <86sft4c3ij.fsf@gnu.org> <87czk59b7p.fsf@russet.org.uk> <83k0ec5st1.fsf@gnu.org> <83v8x7tw4a.fsf@gnu.org> <834k4pu57x.fsf@gnu.org> <83mtico9e3.fsf@gnu.org> <83ee3llrwm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16137"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) Cc: arash@gnu.org, corwin@bru.st, phillip.lord@russet.org.uk, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 08 16:54:51 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nRcAi-0003ty-HW for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Mar 2022 16:54:48 +0100 Original-Received: from localhost ([::1]:36952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRcAg-0003Ob-UL for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Mar 2022 10:54:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRc94-0000eM-8H for emacs-devel@gnu.org; Tue, 08 Mar 2022 10:53:07 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.131]:59185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRc90-0002S0-2p; Tue, 08 Mar 2022 10:53:05 -0500 Original-Received: from VSL7V7PW ([92.116.138.251]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M8QNs-1nVzr33Ra4-004OpA; Tue, 08 Mar 2022 16:52:53 +0100 In-Reply-To: <83ee3llrwm.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Mar 2022 15:32:41 +0200") X-Provags-ID: V03:K1:9XSQy0JuMancuFJLydvL15PHNhMmSFXkhzOGV82mC/yIeOybDak sky70tjshc+/A87q3bebY5PFgUa6l0bfHvtctMxyGLslPsP9CPLcwyUYX5u0snkTvPiiVBE tci2aRDUvPF4S9K4ueOzwe2Mlvr4B7UI7AZPYkapwwsTSn3LRn0dBi/BxuYN6CK9JQayrqJ w82P4WuaD3Zp3gGDwSHVg== X-UI-Out-Filterresults: notjunk:1;V03:K0:MhwYa/pgVz0=:OXai3WDiSUQ81StlIkR6sk HjK4RkwGZj0DNBeVXXIjsEZwWHcp6X+m2rLbZ0euM30fFWC2fbWDZkbqvVCJq66w49gWqAdFc WQO6+Yngte1QfpmkYYBYS2HJdNm67ygorYqUevPGfpGsbJ68Y7twwTcSk5vCZ9uhLr/5orydL hrunmojVgW8PscbhXKJl29b9SGfLCY3JCqQuwVKgdwcYp7fDQQhLrDHV04AXSWL97Z58aITZ7 61y+0HLaIOoj2Q6KtB4N7Cu1qLximZ44TOXgG8QT6E6szyYIQHB0CA+F4v0ioZ4uFF6f0Ovjd y2GqXXe9YbDUFuy8db0BaR9JlPV4rOB6jY9Ay1df7pkUvkZEUr2WsPklD+5mhfn/2VN0f1Cgy J6moPnPtnfUCPGGC7oyibT4PQDBIPmLkD6FU3U8ouRoqa1p2mvDvLF6P9YY1viSvAnjDd9ew8 8956Iig0TB8tdeGMxaAuKRitJciusb7jEp0GtoeiHNIWVnMIJPV3MstUinCGQMj4SQJa9STIG rGyz2Ew8LIRLnB2WEeih0u9ZEB3eoAizY1rEl348sRJTu79tJE7uiuKcIwVM5MrSv4cYM5RpE nj4hhVGVBp9u+ghsCwkX46jWqc0gmDddJo1GiYJ4j+CVnEjzd62/pkti8mdLep6I274yyMQGq c2W4lFGjbslJsE8vdGJEIP8H0/LLGuT63WDtQp5T52XV9GN/gGSVQ8CU+NW7tsBqTI75zx1F0 3NQ+vF66z925Ne4X Received-SPF: none client-ip=212.227.126.131; envelope-from=dieter@duenenhof-wilhelm.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286929 Archived-At: Eli Zaretskii writes: >> From: "H. Dieter Wilhelm" >> Cc: arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org, >> phillip.lord@russet.org.uk >> Date: Mon, 28 Feb 2022 22:51:57 +0100 >>=20 >> >> It seems to me that all MSYS DLLs on which Emacs depends have a name >> >> component "lib", whereas the Windows libraries have no such substring. >> >> (So I can easily filter them out.) >> > >> > There are exceptions: zlib1.dll. For now, it's the only exception >> > AFAIK, but watch out for others. >>=20 >> Luckily zlib1.dll contains also "lib". :-) > > You are relying on luck too much: look in your Windows/system32 > directory, and you will see there quite a few system DLLs that match > "lib". My suggestion is to have an explicit list of system DLLs that > should be filtered out. I understand, thanks. I'll grab all DLL filenames of the Windows/system32 folder and filter them out. Or how would you build or hard-code such a filter list? >> In the following I'm using copy-file. But I'm wondering why the argument >> OK-IF-ALREADY-EXISTS can't be used to skip a copy process if the file >> exists? > > I'm not sure I understand, Would it make sense to you to have the (additonal) capability for copy-file to do nothing if the target file already exists? At the moment I can 1) trigger an error, 2) overwrite an existing file and 3) ask for confirmation either to overwrite or to have an error. So 3) is actually only an - annoying - way to have 1) or 2), there's no way to leave an existing file alone without an error. And here's another thing I stumbled over: An excerpt of copy-file's documentation string: OK-IF-ALREADY-EXISTS is an integer, request confirmation from the user about overwriting; this is what happens in interactive use with M-x. The interactive part in the documentation is unnecessary, I think, the request happens for me in batch mode as well. > but you should stop copying when you find > the first existing DLL for each feature in dynamic-library-alist. We > arrange the DLLs there in the descending order of > versions/importance/quality, so the leftmost DLL that is found is > always the best, and should not be overwritten by any existing DLLs > for the same feature whose names are to the right of that. For > example: > > '(tiff "libtiff-5.dll" "libtiff3.dll" "libtiff.dll") Actually my code was copying all of above tiff DLLs to the bin folder. > If you find libtiff-5.dll, you should not overwrite it with > libtiff3.dll, even if the latter exists. I see, I'll just copy the available, leftmost DLLs. > Also, I don't see that you ignore DLLs that don't match the version > with which Emacs was compiled. E.g., this part of > dynamic-library-alist: > > (if (>=3D libgif-version 50100) > ;; Yes, giflib 5.0 uses 6 as the major version of the API, > ;; and giflib 5.1 uses 7, thus "libgif-7.dll" and > ;; "libgif-6.dll" below (giflib 4.x used 5 as the major API > ;; version). giflib5.dll is from the lua-files project, > ;; and gif.dll is from luapower. > '(gif "libgif-7.dll") > (if (>=3D libgif-version 50000) > '(gif "libgif-6.dll" "giflib5.dll" "gif.dll") > '(gif "libgif-5.dll" "giflib4.dll" "libungif4.dll" "libungif.dll"))) Please tell me where I can find above definition of dynamic-library-alist? Mine (Emacs-27.2) just says: dynamic-library-alist is a variable defined in =E2=80=98C source code=E2= =80=99. ((harfbuzz "libharfbuzz-0.dll") (gdiplus "gdiplus.dll") (shlwapi "shlwapi.dll") (xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") (png "libpng16.dll" "libpng16-16.dll") (tiff "libtiff-5.dll" "libtiff3.dll" "libtiff.dll") (jpeg "libjpeg-8.dll") (gif "libgif-7.dll") (svg "librsvg-2-2.dll") (webp "libwebp-7.dll" "libwebp.dll") (sqlite3 "libsqlite3-0.dll") (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") (glib "libglib-2.0-0.dll") (gio "libgio-2.0-0.dll") (gobject "libgobject-2.0-0.dll") (gnutls "libgnutls-30.dll") (libxml2 "libxml2-2.dll" "libxml2.dll") (zlib "zlib1.dll" "libz-1.dll") (lcms2 "liblcms2-2.dll") (json "libjansson-4.dll") (gccjit "libgccjit-0.dll")) > means that Emacs compiled against giflib 5.1 and later should not try > to use libgif-6.dll or libgif-5.dll, it should only use libgif-7.dll. > We do this when a newer version is binary incompatible with an older > one, so you cannot just choose whichever DLL you have, you must use > the one that is binary-compatible with Emacs. I'm struggling to understand that, I thought ./configure would sort out what is necessary and available on my system? Thank you for your interest Dieter