all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fabrice Popineau <fabrice.popineau@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22959@debbugs.gnu.org
Subject: bug#22959: Emacs on Windows depends on libwinpthreads
Date: Sun, 17 Apr 2016 17:25:23 +0200	[thread overview]
Message-ID: <CAFgFV9NNncvdieDd9TFdOoFqCTivONEKmmnj1xp6KcWdbVyJXw@mail.gmail.com> (raw)
In-Reply-To: <837ffwb8st.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 5389 bytes --]

2016-04-17 16:37 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:

> > From: Fabrice Popineau <fabrice.popineau@gmail.com>
> > Date: Sat, 16 Apr 2016 23:48:35 +0200
> >
> > At this point, when I build emacs for w64 using msys2,
> > emacs.exe depends on libwinpthread for only one symbol
> > which is clock_gettime().
> > This is called from lib/gettime.c:gettime().
>
> This is not supposed to happen.  I don't see this on my system.
>
> There's some factor at work here that I cannot figure out: the
> configure-time test for clock_gettime doesn't try to look for that
> function in the pthreads library, it only tries the "normal" link
> without any extra libraries, and if that fails, tries 2 extra
> libraries: librt and libposix4, none of which I'd expect to see on
> MS-Windows in a MinGW installation.
>
> It could be something peculiar to MinGW64/MSYS2 build.  Are you sure
> libwinpthread dependency is not a requirement of the MinGW64 GCC port?
>
> So please look in config.log, and tell how did pthreads get into this
> test.


From config.log:

configure:24643: checking for library containing clock_gettime
configure:24674: gcc -I ../emacs/nt/inc -o conftest.exe -I/mingw64/include
-fomit-frame-pointer -O3 -g0 -mtune=corei7 -mtune=generic
 -I/mingw64/include -L/mingw64/lib conftest.c   >&5
configure:24674: $? = 0
configure:24691: result: none required
configure:24703: checking for clock_gettime
configure:24703: gcc -I ../emacs/nt/inc -o conftest.exe -I/mingw64/include
-fomit-frame-pointer -O3 -g0 -mtune=corei7 -mtune=generic
 -I/mingw64/include -L/mingw64/lib conftest.c   >&5
configure:24703: $? = 0
configure:24703: result: yes
configure:24703: checking for clock_settime
configure:24703: gcc -I ../emacs/nt/inc -o conftest.exe -I/mingw64/include
-fomit-frame-pointer -O3 -g0 -mtune=corei7 -mtune=generic
 -I/mingw64/include -L/mingw64/lib conftest.c   >&5
configure:24703: $? = 0
configure:24703: result: yes

Testing with a very short C file, it seems that libwinpthread-1.dll is
linked in by default and may be gets removed by the linker if no symbol is
referenced. I have asked for clarifications
on the msys2 list.

Anyway, I am afraid that some 3rd party libraries would require it anyway.
For example, --with-rsvg triggers the -pthread compile flag:

config.status:S["RSVG_CFLAGS"]="-pthread -mms-bitfields
-I/mingw64/include/librsvg-2.0 -I/mingw64/include/gdk-pixbuf-2.0
-I/mingw64/include/libpng16 -I/mingw64/include/cairo -I/min"\

>
> > I may add that a full blown emacs compiled with msys2
> > needs up to 57 dlls to run ( that is : all image formats dll,
> > gnutls, etc.) and this is what I copy in my emacs/bin directory.
>
> 57 DLLs sounds excessive.  I counted the ones I think Emacs uses on my
> system, and only got as far as 32.  Can you show a list of those 57
> libraries?
>

configure command is:

  $ ../emacs/configure --prefix=/c/Local/Emacs-25
--libexecdir=/c/Local/Emacs-25/bin --datarootdir=/c/Local/Emacs-25
--localstatedir=/c/Local/Emacs-25 --sysconfdir=/c/Local/Emacs-25/etc
--with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2
--with-gnutls --with-imagemagick --enable-checking=no

and the dll list is:

/c/Local/Emacs/bin/libasprintf-0.dll*
 /c/Local/Emacs/bin/libgmodule-2.0-0.dll*
/c/Local/Emacs/bin/libMagickWand-6.Q16HDRI-2.dll*
/c/Local/Emacs/bin/libbz2-1.dll*
/c/Local/Emacs/bin/libgmp-10.dll*
 /c/Local/Emacs/bin/libnettle-6-1.dll*
/c/Local/Emacs/bin/libcairo-2.dll*
/c/Local/Emacs/bin/libgnutls-30.dll*
/c/Local/Emacs/bin/libp11-kit-0.dll*
/c/Local/Emacs/bin/libcairo-gobject-2.dll*
/c/Local/Emacs/bin/libgnutlsxx-28.dll*
/c/Local/Emacs/bin/libpango-1.0-0.dll*
/c/Local/Emacs/bin/libcairo-script-interpreter-2.dll*
 /c/Local/Emacs/bin/libgobject-2.0-0.dll*
/c/Local/Emacs/bin/libpangocairo-1.0-0.dll*
/c/Local/Emacs/bin/libcharset-1.dll*
/c/Local/Emacs/bin/libgomp-1.dll*
 /c/Local/Emacs/bin/libpangoft2-1.0-0.dll*
/c/Local/Emacs/bin/libcroco-0.6-3.dll*
/c/Local/Emacs/bin/libgraphite2.dll*
/c/Local/Emacs/bin/libpangowin32-1.0-0.dll*
/c/Local/Emacs/bin/libdbus-1-3.dll*
 /c/Local/Emacs/bin/libgthread-2.0-0.dll*
/c/Local/Emacs/bin/libpcre-1.dll*
/c/Local/Emacs/bin/libexpat-1.dll*
/c/Local/Emacs/bin/libharfbuzz-0.dll*
 /c/Local/Emacs/bin/libpixman-1-0.dll*
/c/Local/Emacs/bin/libffi-6.dll*
/c/Local/Emacs/bin/libhogweed-4-1.dll*
/c/Local/Emacs/bin/libpng16-16.dll*
/c/Local/Emacs/bin/libfftw3-3.dll*
/c/Local/Emacs/bin/libiconv-2.dll*
/c/Local/Emacs/bin/librsvg-2-2.dll*
/c/Local/Emacs/bin/libfontconfig-1.dll*
 /c/Local/Emacs/bin/libidn-11.dll*
 /c/Local/Emacs/bin/libstdc++-6.dll*
/c/Local/Emacs/bin/libfreetype-6.dll*
 /c/Local/Emacs/bin/libintl-8.dll*
 /c/Local/Emacs/bin/libtasn1-6.dll*
/c/Local/Emacs/bin/libgcc_s_seh-1.dll*
/c/Local/Emacs/bin/libjpeg-8.dll*
 /c/Local/Emacs/bin/libtiff-5.dll*
/c/Local/Emacs/bin/libgdk_pixbuf-2.0-0.dll*
 /c/Local/Emacs/bin/liblcms2-2.dll*
/c/Local/Emacs/bin/libtiffxx-5.dll*
/c/Local/Emacs/bin/libgettextpo-0.dll*
/c/Local/Emacs/bin/liblqr-1-0.dll*
/c/Local/Emacs/bin/libwinpthread-1.dll*
/c/Local/Emacs/bin/libgif-7.dll*
/c/Local/Emacs/bin/libltdl-7.dll*
 /c/Local/Emacs/bin/libxml2-2.dll*
/c/Local/Emacs/bin/libgio-2.0-0.dll*
/c/Local/Emacs/bin/liblzma-5.dll*
 /c/Local/Emacs/bin/libXpm-noX4.dll*
/c/Local/Emacs/bin/libglib-2.0-0.dll*
 /c/Local/Emacs/bin/libMagickCore-6.Q16HDRI-2.dll*
 /c/Local/Emacs/bin/zlib1.dll*

GnuTLS, ImageMagick and RSVG add quite many.

Fabrice

[-- Attachment #2: Type: text/html, Size: 7776 bytes --]

  reply	other threads:[~2016-04-17 15:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 14:52 bug#22959: Emacs on Windows depends on libwinpthreads Phillip Lord
2016-03-09 16:20 ` Eli Zaretskii
2016-03-09 16:32   ` Phillip Lord
2016-03-09 16:59     ` Eli Zaretskii
2016-03-09 18:56       ` Phillip Lord
2016-03-09 19:16         ` Eli Zaretskii
2016-04-16 21:48 ` Fabrice Popineau
2016-04-17 14:37   ` Eli Zaretskii
2016-04-17 15:25     ` Fabrice Popineau [this message]
2016-04-17 16:42       ` Eli Zaretskii
2016-04-17 19:31         ` Fabrice Popineau
2016-04-18 18:58           ` Eli Zaretskii
2016-04-18 19:50             ` Fabrice Popineau
2016-04-21 16:25               ` Eli Zaretskii
2016-04-18 13:06     ` Phillip Lord
2016-04-18 13:41       ` Fabrice Popineau
2016-04-18 19:02         ` Eli Zaretskii
2016-04-19  7:26           ` Fabrice Popineau

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

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

  git send-email \
    --in-reply-to=CAFgFV9NNncvdieDd9TFdOoFqCTivONEKmmnj1xp6KcWdbVyJXw@mail.gmail.com \
    --to=fabrice.popineau@gmail.com \
    --cc=22959@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.