unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: arash@gnu.org, corwin@bru.st, phillip.lord@russet.org.uk,
	emacs-devel@gnu.org
Subject: Re: Acquiring dependencies for Windows builds
Date: Tue, 08 Mar 2022 16:52:52 +0100	[thread overview]
Message-ID: <xm46k0d4l9uz.fsf_-_@duenenhof-wilhelm.de> (raw)
In-Reply-To: <83ee3llrwm.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Mar 2022 15:32:41 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.

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 (>= 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")))

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 ‘C source code’.

  ((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



  reply	other threads:[~2022-03-08 15:52 UTC|newest]

Thread overview: 186+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 11:36 Bootstrap Compilation Speed phillip.lord
2022-01-14 13:21 ` Eli Zaretskii
2022-01-14 14:16   ` phillip.lord
2022-01-15  9:34 ` Eli Zaretskii
2022-01-15 11:29   ` phillip.lord
2022-01-15 10:29 ` H. Dieter Wilhelm
2022-01-15 11:28   ` phillip.lord
2022-01-15 16:24     ` Corwin Brust
2022-01-15 19:06       ` Native compilation on Windows, was " H. Dieter Wilhelm
2022-01-15 19:15         ` Eli Zaretskii
2022-01-15 19:27           ` H. Dieter Wilhelm
2022-01-16 11:47             ` H. Dieter Wilhelm
2022-01-16 12:13               ` Eli Zaretskii
2022-01-17  9:39                 ` Phillip Lord
2022-01-17 12:35                   ` Eli Zaretskii
2022-01-17 14:07                     ` Phillip Lord
2022-01-17 14:09                       ` Eli Zaretskii
2022-01-17 16:25                       ` H. Dieter Wilhelm
2022-01-17 18:07                         ` Corwin Brust
2022-01-17 18:13                         ` Eli Zaretskii
2022-01-17 20:25                         ` Phillip Lord
2022-01-17 20:46                           ` H. Dieter Wilhelm
2022-01-18 16:38                             ` Phillip Lord
2022-01-18 19:37                               ` H. Dieter Wilhelm
2022-01-18 19:46                                 ` Eli Zaretskii
2022-01-18 21:36                                   ` H. Dieter Wilhelm
2022-01-19  0:02                                     ` Corwin Brust
2022-01-19  7:45                                       ` Eli Zaretskii
2022-01-19 14:26                                         ` Corwin Brust
2022-01-19 14:42                                           ` Eli Zaretskii
2022-01-19 18:38                                         ` Phillip Lord
2022-01-19 14:01                                       ` H. Dieter Wilhelm
2022-01-19 18:59                                         ` H. Dieter Wilhelm
2022-01-19 20:21                                           ` Corwin Brust
2022-01-20  7:12                                             ` H. Dieter Wilhelm
2022-01-20 14:32                                               ` Corwin Brust
2022-01-20 22:56                                                 ` H. Dieter Wilhelm
2022-01-21  6:58                                                   ` Eli Zaretskii
2022-01-21 11:07                                                     ` H. Dieter Wilhelm
2022-01-21 12:04                                                       ` Eli Zaretskii
2022-01-21 19:22                                                         ` H. Dieter Wilhelm
2022-01-21 19:57                                                           ` Eli Zaretskii
2022-01-22 10:30                                                             ` H. Dieter Wilhelm
2022-01-22 10:44                                                               ` Eli Zaretskii
2022-01-25 19:45                                                               ` H. Dieter Wilhelm
2022-01-25 19:56                                                                 ` Eli Zaretskii
2022-01-26 19:49                                                                   ` H. Dieter Wilhelm
2022-01-21 12:21                                                       ` Phillip Lord
2022-01-21 12:51                                                         ` H. Dieter Wilhelm
2022-01-21 12:59                                                           ` Eli Zaretskii
2022-01-21 17:48                                                             ` phillip.lord
2022-01-21 19:36                                                               ` Eli Zaretskii
2022-01-21 19:47                                                                 ` Corwin Brust
2022-01-21 19:58                                                                   ` Eli Zaretskii
2022-01-21 19:58                                                                 ` H. Dieter Wilhelm
2022-01-22 12:52                                                                   ` Phillip Lord
2022-01-22 12:40                                                                 ` Phillip Lord
2022-01-22 12:46                                                                   ` Eli Zaretskii
2022-01-22 17:56                                                                     ` Phillip Lord
2022-01-21  9:05                                                   ` Corwin Brust
2022-01-22 21:51                                                     ` H. Dieter Wilhelm
2022-01-22 22:52                                                       ` Corwin Brust
2022-01-23 21:16                                                         ` H. Dieter Wilhelm
2022-01-24  3:24                                                           ` Eli Zaretskii
2022-01-24  4:17                                                           ` Corwin Brust
2022-01-24 15:43                                                             ` H. Dieter Wilhelm
2022-01-24 16:56                                                               ` Eli Zaretskii
2022-01-24 18:28                                                                 ` H. Dieter Wilhelm
2022-01-24 18:35                                                                   ` Eli Zaretskii
     [not found]                                                                     ` <86czkgztcv.fsf@duenenhof-wilhelm.de>
     [not found]                                                                       ` <83zgnkijfo.fsf@gnu.org>
2022-01-25 10:34                                                                         ` H. Dieter Wilhelm
2022-01-25 12:32                                                                           ` Eli Zaretskii
2022-01-25 13:46                                                                             ` H. Dieter Wilhelm
2022-01-25 13:50                                                                               ` Eli Zaretskii
2022-01-30 11:57                                                                                 ` H. Dieter Wilhelm
2022-01-30 14:12                                                                                   ` Eli Zaretskii
2022-01-30 18:12                                                                                     ` H. Dieter Wilhelm
2022-01-30 18:34                                                                                       ` Eli Zaretskii
2022-01-30 21:31                                                                                         ` H. Dieter Wilhelm
2022-01-25 10:45                                                               ` H. Dieter Wilhelm
2022-01-26  4:40                                                                 ` Corwin Brust
2022-01-19 18:33                                       ` Phillip Lord
2022-01-19  7:28                                     ` Eli Zaretskii
2022-01-19 13:57                                       ` H. Dieter Wilhelm
2022-01-19 14:39                                         ` Eli Zaretskii
2022-01-19 18:48                                           ` Phillip Lord
2022-01-29 21:32                                           ` H. Dieter Wilhelm
2022-01-29 22:01                                             ` Corwin Brust
2022-01-29 22:23                                               ` H. Dieter Wilhelm
2022-01-30  1:58                                                 ` Corwin Brust
2022-01-30 10:13                                                   ` H. Dieter Wilhelm
2022-01-30 10:19                                                     ` Eli Zaretskii
2022-01-30 21:33                                                     ` Arash Esbati
2022-01-30 22:16                                                       ` Corwin Brust
2022-01-31 10:57                                                         ` Arash Esbati
2022-01-31 15:58                                                           ` H. Dieter Wilhelm
2022-01-31 22:17                                                             ` Corwin Brust
2022-02-01 12:45                                                               ` H. Dieter Wilhelm
2022-02-01 15:28                                                                 ` Óscar Fuentes
2022-02-01 19:26                                                                   ` H. Dieter Wilhelm
2022-02-01 18:38                                                                 ` Arash Esbati
2022-02-01 19:02                                                                   ` H. Dieter Wilhelm
2022-02-01 19:10                                                                     ` Arash Esbati
2022-02-01 19:27                                                                       ` H. Dieter Wilhelm
2022-02-01 21:56                                                                   ` H. Dieter Wilhelm
2022-02-03  3:22                                                                 ` Corwin Brust
2022-02-03  7:10                                                                   ` H. Dieter Wilhelm
2022-02-03  7:47                                                                   ` Eli Zaretskii
2022-02-03 13:57                                                                     ` Corwin Brust
2022-02-03 16:53                                                                       ` Eli Zaretskii
2022-02-03 17:45                                                                         ` Corwin Brust
2022-02-02 22:06                                                               ` Phillip Lord
2022-02-02 23:28                                                                 ` Corwin Brust
2022-02-04 10:12                                                                   ` Phillip Lord
2022-02-02 23:31                                                                 ` Corwin Brust
2022-01-31 12:27                                                         ` Eli Zaretskii
2022-02-02 22:04                                                         ` Phillip Lord
2022-02-02 22:22                                                           ` Corwin Brust
2022-02-04 10:05                                                             ` Phillip Lord
2022-02-03  7:10                                                           ` Eli Zaretskii
2022-02-21 21:59                                                             ` H. Dieter Wilhelm
2022-02-22  3:31                                                               ` Eli Zaretskii
2022-02-23  6:44                                                                 ` H. Dieter Wilhelm
2022-02-23  9:32                                                                   ` Arash Esbati
2022-02-23 18:30                                                                     ` H. Dieter Wilhelm
2022-02-23 12:39                                                                   ` Eli Zaretskii
2022-02-27 10:49                                                                     ` Acquiring dependencies for Windows builds, was: Native compilation on Windows H. Dieter Wilhelm
2022-02-27 11:07                                                                       ` Eli Zaretskii
2022-02-28 21:51                                                                         ` H. Dieter Wilhelm
2022-03-01 13:32                                                                           ` Eli Zaretskii
2022-03-08 15:52                                                                             ` H. Dieter Wilhelm [this message]
2022-03-08 16:48                                                                               ` Acquiring dependencies for Windows builds Eli Zaretskii
2022-01-31 12:26                                                       ` Native compilation on Windows, was Re: Bootstrap Compilation Speed Eli Zaretskii
2022-01-30  2:37                                                 ` chad
2022-01-30 12:29                                                   ` H. Dieter Wilhelm
2022-02-01 17:17                                                   ` H. Dieter Wilhelm
2022-02-01 17:53                                                     ` Eli Zaretskii
2022-02-01 18:59                                                       ` H. Dieter Wilhelm
2022-02-01 19:23                                                         ` Eli Zaretskii
2022-02-02 10:36                                                           ` Robert Pluim
2022-02-02 11:28                                                             ` H. Dieter Wilhelm
2022-02-02 12:57                                                             ` Eli Zaretskii
2022-02-02 13:00                                                               ` Robert Pluim
2022-02-02 15:23                                                                 ` H. Dieter Wilhelm
2022-02-02 16:20                                                                   ` Robert Pluim
2022-02-02 17:04                                                                   ` Eli Zaretskii
2022-02-02 17:58                                                                     ` H. Dieter Wilhelm
2022-02-02 18:18                                                                       ` Robert Pluim
2022-02-01 19:00                                                       ` chad
2022-02-01 19:08                                                         ` H. Dieter Wilhelm
2022-02-02 22:12                                                       ` Phillip Lord
2022-02-05 21:46                                                         ` H. Dieter Wilhelm
2022-02-05 23:18                                                           ` Corwin Brust
2022-02-06 15:00                                                             ` Stefan Monnier
2022-02-06 17:21                                                               ` H. Dieter Wilhelm
2022-02-07 12:54                                                                 ` Stefan Monnier
2022-02-09 18:23                                                                   ` H. Dieter Wilhelm
2022-02-09 19:09                                                                     ` Eli Zaretskii
2022-02-09 20:13                                                                     ` Stefan Monnier
2022-02-09 23:32                                                                     ` Corwin Brust
2022-02-10 10:28                                                                     ` Robert Pluim
2022-02-02 21:58                                               ` Phillip Lord
2022-02-02 22:09                                                 ` Corwin Brust
2022-02-03  6:25                                                 ` H. Dieter Wilhelm
2022-02-03 13:30                                                   ` Stefan Monnier
2022-02-05 21:34                                                     ` H. Dieter Wilhelm
2022-01-30  7:59                                             ` Eli Zaretskii
2022-01-19 18:46                                         ` Phillip Lord
2022-01-19 19:25                                           ` H. Dieter Wilhelm
2022-01-19 18:28                                 ` Phillip Lord
2022-01-17  9:44               ` Phillip Lord
2022-01-17 16:08                 ` Óscar Fuentes
2022-01-17 17:23                   ` H. Dieter Wilhelm
2022-01-17 17:46                     ` Óscar Fuentes
2022-01-17 19:09                       ` H. Dieter Wilhelm
2022-01-17 20:21                   ` Phillip Lord
2022-01-18  9:03                     ` Robert Pluim
2022-01-18 14:50                       ` Eli Zaretskii
2022-01-18 15:09                       ` Óscar Fuentes
2022-01-18 16:40                       ` Phillip Lord
2022-01-15 22:14         ` phillip.lord
2022-01-15 22:32           ` H. Dieter Wilhelm
2022-01-16  8:54           ` Eli Zaretskii
2022-01-17  9:34             ` Andrea Corallo
2022-01-17  9:56             ` Phillip Lord
2022-01-17 12:37               ` Eli Zaretskii
2022-01-16 14:31       ` H. Dieter Wilhelm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xm46k0d4l9uz.fsf_-_@duenenhof-wilhelm.de \
    --to=dieter@duenenhof-wilhelm.de \
    --cc=arash@gnu.org \
    --cc=corwin@bru.st \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=phillip.lord@russet.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).