unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Optional libraries
@ 2016-09-18 23:05 Nikolay Kudryavtsev
  2016-09-19 16:37 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Kudryavtsev @ 2016-09-18 23:05 UTC (permalink / raw)
  To: emacs-devel

Hello.

I'm currently trying to make sense of the possible optional libraries 
that are used on Windows.

Can someone help me document them?

Here's a list I lifted from emacs-w64 project, with some commentaries added.

libbwinpthread-*.dll ; msys2 built emacs does not work without it? Does 
not exist in official builds...
libdbus-*.dll ; is there a single legitimate usecase for dbus on windows?
;; Image support
libpng*.dll ; png images
libtiff-*.dll
libtiffxx-*.dll ; tiff images
libjpeg-*.dll ; jpeg images
libgif-*.dll ; gif images
libXpm-noX*.dll ; xpm images
;; rsvg dependencies
libglib-*.dll
libcairo-*.dll
libcroco-*.dll
libpango-*.dll
libpangocairo-*.dll
libpangoft*.dll
libpangowin32-*.dll
librsvg-*.dll ; svg images
;; Gnutls dependencies
libffi-*.dll ; only needed for msys2-based builds
libgmp-*.dll
libgnutls-*.dll
ibgnutls-openssl-*.dll ; only in Eli's gnutls build
libgnutlsxx-*.dll ; only in msys2, same library as the previous one, 
with a different name?
libhogweed-*.dll
libiconv-*.dll
libidn-*.dll ; only needed for msys2-based builds
libintl-*.dll
libnettle-*.dll
libp11-kit-*.dll
libtasn1-*.dll
zlib*.dll
;; Unknown
libgomp-*.dll
libgcc_s_seh-*.dll
libgobject-*.dll
libgdk_pixbuf-*.dll
libgio-*.dll
libgmodule-*.dll
libxml2-*.dll
libfontconfig-*.dll
libfreetype-*.dll
libpixman-*.dll
liblzma-*.dll
libexpat-*.dll
libharfbuzz-*.dll
libbz2-*.dll
libjbig-*.dll


-- 
Best Regards,
Nikolay Kudryavtsev




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Optional libraries
  2016-09-18 23:05 Optional libraries Nikolay Kudryavtsev
@ 2016-09-19 16:37 ` Eli Zaretskii
  2017-02-28 11:28   ` Arash Esbati
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2016-09-19 16:37 UTC (permalink / raw)
  To: Nikolay Kudryavtsev; +Cc: emacs-devel

> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
> Date: Mon, 19 Sep 2016 02:05:20 +0300
> 
> I'm currently trying to make sense of the possible optional libraries that are used on Windows.

Dependency Walker (http://www.dependencywalker.com/) is your friend.
You can run it for each DLL and see its dependency DLLs.

> Can someone help me document them?
> 
> Here's a list I lifted from emacs-w64 project, with some commentaries added.

I try adding some info below, but I don't have MinGW64 and cannot
check things myself.  (I also find many MSYS2 packages bloated with
unneeded stuff, which then requires users to have many redundant DLLs
around.)

> libbwinpthread-*.dll ; msys2 built emacs does not work without it? Does not exist in official builds...

I believe the MinGW64 GCC produces DLLs that depend on this and on
libgcc_s_seh-*.dll.  The package builders should be told to avoid
that, since these 2 dependencies require the corresponding sources be
available (and the sources for libgcc_s_seh-*.dll is the entire 80MB
GCC distribution).

> libdbus-*.dll ; is there a single legitimate usecase for dbus on windows?

There could be, but Emacs built for Windows doesn't support D-Bus, so
until that support is added, linking with this DLL is futile.

> ;; Image support
> libpng*.dll ; png images
> libtiff-*.dll
> libtiffxx-*.dll ; tiff images

The last one is for C++ programs, so not needed for Emacs.

> libjpeg-*.dll ; jpeg images
> libgif-*.dll ; gif images
> libXpm-noX*.dll ; xpm images
> ;; rsvg dependencies
> libglib-*.dll
> libcairo-*.dll
> libcroco-*.dll
> libpango-*.dll
> libpangocairo-*.dll
> libpangoft*.dll
> libpangowin32-*.dll
> librsvg-*.dll ; svg images

You've missed some rsvg dependencies, which appear under "unknown":

> libgobject-*.dll
> libgdk_pixbuf-*.dll
> libgio-*.dll
> libgmodule-*.dll
> libfontconfig-*.dll
> libfreetype-*.dll
> libpixman-*.dll
> libharfbuzz-*.dll

> ;; Gnutls dependencies
> libffi-*.dll ; only needed for msys2-based builds
> libgmp-*.dll
> libgnutls-*.dll
> libgnutls-openssl-*.dll ; only in Eli's gnutls build

It's in the GnuTLS binary distro, but is not needed for Emacs.

> libgnutlsxx-*.dll ; only in msys2, same library as the previous one, with a different name?

No, it's C++ APIs for GnuTLS; again, not needed for Emacs.

> libhogweed-*.dll
> libiconv-*.dll
> libidn-*.dll ; only needed for msys2-based builds
> libintl-*.dll
> libnettle-*.dll
> libp11-kit-*.dll
> libtasn1-*.dll
> zlib*.dll

zlib is also used by Emacs directly.

> ;; Unknown
> libgomp-*.dll

This one is part of GCC, use the Dependency Walker to see who needs
it, if at all.

> libxml2-*.dll

This is the XML support library, required for HTML and XML support in
Emacs.

> libexpat-*.dll

Not sure which DLL needs it, perhaps libxml2?

> liblzma-*.dll
> libbz2-*.dll
> libjbig-*.dll

Perhaps rsvg dependencies?

HTH



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Optional libraries
  2016-09-19 16:37 ` Eli Zaretskii
@ 2017-02-28 11:28   ` Arash Esbati
  0 siblings, 0 replies; 3+ messages in thread
From: Arash Esbati @ 2017-02-28 11:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Nikolay Kudryavtsev, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
>> Date: Mon, 19 Sep 2016 02:05:20 +0300
>> 
>> I'm currently trying to make sense of the possible optional libraries that are used on Windows.
>
> Dependency Walker (http://www.dependencywalker.com/) is your friend.
> You can run it for each DLL and see its dependency DLLs.

I had to do this exercise as well lately and I used "cygcheck.exe" which
comes with Msys2 (msys2-runtime).  I configure Emacs with:

./configure
  --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg \
  --with-xml2 --with-gnutls --with-xft \
  --without-imagemagick --without-dbus

Then, the libraries in question will be:

--8<---------------cut here---------------start------------->8---
# mingw-w64-x86_64-libjpeg-turbo
libjpeg-8.dll
libturbojpeg-0.dll

# mingw-w64-x86_64-xpm-nox
libXpm-noX4.dll

# mingw-w64-x86_64-libpng
libpng16-16.dll

# mingw-w64-x86_64-libtiff
libtiff-5.dll
libtiffxx-5.dll

# mingw-w64-x86_64-librsvg
librsvg-2-2.dll

# mingw-w64-x86_64-libxml2
libxml2-2.dll

# mingw-w64-x86_64-gnutls
libgnutls-30.dll
libgnutlsxx-28.dll

# mingw-w64-x86_64-freetype
libfreetype-6.dll
--8<---------------cut here---------------end--------------->8---

If I subtract "libtiffxx-5.dll" and "libgnutlsxx-28.dll" as you wrote,
and "libturbojpeg-0.dll" which is not needed to my understanding, the
net dependencies are:

--8<---------------cut here---------------start------------->8---
libXpm-noX4.dll
libbz2-1.dll
libcairo-2.dll
libcroco-0.6-3.dll
libexpat-1.dll
libffi-6.dll
libfontconfig-1.dll
libfreetype-6.dll
libgcc_s_seh-1.dll
libgdk_pixbuf-2.0-0.dll
libgio-2.0-0.dll
libglib-2.0-0.dll
libgmodule-2.0-0.dll
libgmp-10.dll
libgnutls-30.dll
libgobject-2.0-0.dll
libgraphite2.dll
libharfbuzz-0.dll
libhogweed-4.dll
libiconv-2.dll
libidn-11.dll
libintl-8.dll
libjpeg-8.dll
liblzma-5.dll
libnettle-6.dll
libp11-kit-0.dll
libpango-1.0-0.dll
libpangocairo-1.0-0.dll
libpangoft2-1.0-0.dll
libpangowin32-1.0-0.dll
libpcre-1.dll
libpixman-1-0.dll
libpng16-16.dll
librsvg-2-2.dll
libstdc++-6.dll
libtasn1-6.dll
libtiff-5.dll
libunistring-2.dll
libwinpthread-1.dll
libxml2-2.dll
zlib1.dll
--8<---------------cut here---------------end--------------->8---

>> libbwinpthread-*.dll ; msys2 built emacs does not work without it?
>> Does not exist in official builds...
>
> I believe the MinGW64 GCC produces DLLs that depend on this and on
> libgcc_s_seh-*.dll.

libwinpthread-1.dll is also required directly by libgnutls-30.dll.

>> ;; Unknown
>> libgomp-*.dll
>
> This one is part of GCC, use the Dependency Walker to see who needs
> it, if at all.

I think this one is not needed.

>> libexpat-*.dll
>
> Not sure which DLL needs it, perhaps libxml2?

This is the dependency tree:

librsvg-2-2.dll
  libcairo-2.dll
    libfontconfig-1.dll
      libexpat-1.dll

>> liblzma-*.dll

Required by libtiff-5.dll, librsvg-2-2.dll and libxml2-2.dll.

>> libbz2-*.dll

Required by libfontconfig-1.dll (which is required by librsvg-2-2.dll)
and libfreetype-6.dll.

>> libjbig-*.dll

I think this one is not needed.

HTH.  Best, Arash



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-28 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 23:05 Optional libraries Nikolay Kudryavtsev
2016-09-19 16:37 ` Eli Zaretskii
2017-02-28 11:28   ` Arash Esbati

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