emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Acquiring dependencies for Windows builds, was: Native compilation o


From: Eli Zaretskii
Subject: Re: Acquiring dependencies for Windows builds, was: Native compilation on Windows
Date: Tue, 01 Mar 2022 15:32:41 +0200

> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
> 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
> 
> >> 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.
> 
> 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.

> 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, 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")

If you find libtiff-5.dll, you should not overwrite it with
libtiff3.dll, even if the latter exists.

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 (>= 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 (>= libgif-version 50000)
             '(gif "libgif-6.dll" "giflib5.dll" "gif.dll")
         '(gif "libgif-5.dll" "giflib4.dll" "libungif4.dll" "libungif.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.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]