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: H. Dieter Wilhelm
Subject: Re: Acquiring dependencies for Windows builds, was: Native compilation on Windows
Date: Sun, 27 Feb 2022 11:49:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt)

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: Wed, 23 Feb 2022 07:44:50 +0100
>> 
>> > The dependency on the optional DLLs is implicit, because Emacs loads
>> > them dynamically at run time.  You need to place the DLLs mentioned in
>> > dynamic-library-alist defined in w32-win.el in the bin/ directory, and
>> > _then_ repeat the process.  That's because we are talking about the
>> > dependencies of those dynamically-loaded DLLs.
>> 
>> I see, thank you for this concrete recipe.
>> 
>> I'm a bit baffled, why is in dynamic-library-alist no harfbuzz
>
> Sorry, forgot about harfbuzz.  We load that one by name.  (I can
> explain why, but I don't think it's relevant to this discussion.)  The
> name is fixed: libharfbuzz-0.dll.

Don't worry, I only hoped that dynamic-library-alist might be the only
"source of truth".  OK, so we also need take care of libharfbuzz-0.dll.

Furthermore, it seems that your recipe and can save about 10 DLLs in
comparison to the build-dep-zips.py approach (So far I tested this only
with etc/w32-feature.el).

It's drawback is that such an iterative approach is painful to do by
hand.  I'd like to do this in a script and call below MinGW64 command
from within Emacs

  objdump.exe -p *.exe *.dll| fgrep DLL

My idea is to do something like the following:

  (let ((Objdump-buffer (get-buffer-create "*objdump*"))
        (Bin-folder "~/emacs-build/build/emacs-28.0.91/bin/")
        (Objdump "d:/appl/MSYS2/mingw64/bin/objdump.exe"))
    (setq default-directory Bin-folder)
    (with-current-buffer Objdump-buffer
      ;;(goto-char (point-min))
      (erase-buffer)
      (shell-command (concat Objdump " -p *.exe *.dll") Objdump-buffer)
      (keep-lines "     DLL Name:")
      ;; And then filtering steps
      ;; Iteratively copying files into the Bin-folder..
      
Which brings output into the Objdump-buffer but I'm not sure if above
approach might miss the - possibly - necessary MinGW64 environment
information, don't know if it makes a difference when objdump.exe is
called from the MinGW64 shell or with shell-command .  How would you
bring the output of objdump into Emacs?

>> but gccjit, gdiplus and shlwapi are there
>
> Ignore gdiplus and shlwapi, they are system libraries that you don't
> need (and cannot, for obvious legal reasons) provide in the binary
> package.  The reasons they are there are historical, and again
> irrelevant.

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

Thank you very much

          Dieter



reply via email to

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