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

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Sun, 17 Apr 2016 17:25:23 +0200
> Cc: 22959@debbugs.gnu.org
> 
> >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.

So this is the reason for what you see: evidently, MinGW64 considers
libwinpthread DLL a necessary part of a MinGW64 linking.

We can easily prevent Emacs (in nt/mingw-cfg.site) from pulling
clock_gettime from libwinpthread, if we decide to do that.  But since
MinGW64 programs are evidently supposed to depend on that library, I
question the need for exempting just Emacs from this rule.

> I have asked for clarifications on the msys2 list.

I'm not sure they are the right crowd, it could be MinGW64 developers,
like Kai Tietz.

> 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"\

That's not the same: the librsvg dependency is not a static one,
i.e. Emacs will start up even if libwinpthread is not available, it
just won't be able to display SVG images.  By contrast, the dependency
you are talking about is _static_, recorded at link time; Emacs will
refuse to start if the DLL is not present.

> and the dll list is:
> 
> /c/Local/Emacs/bin/libasprintf-0.dll*

Shouldn't be needed.

> /c/Local/Emacs/bin/libp11-kit-0.dll*

You should tell whoever build that GnuTLS to omit libp11-kit, it's
generally useless on Windows, certainly with Emacs.

> /c/Local/Emacs/bin/libgnutlsxx-28.dll*

Shouldn't be required, as long as Emacs is not a C++ program.

> /c/Local/Emacs/bin/libcharset-1.dll*

Shouldn't be required.

>  /c/Local/Emacs/bin/libpangoft2-1.0-0.dll*
> /c/Local/Emacs/bin/libgraphite2.dll*
> /c/Local/Emacs/bin/libfontconfig-1.dll*
> /c/Local/Emacs/bin/libfreetype-6.dll*

Whoever built Cairo didn't take care of disabling features unneeded on
Windows for librsvg.  The result is a very fat build of Cairo, for no
good reason.

> /c/Local/Emacs/bin/libpcre-1.dll*
> /c/Local/Emacs/bin/libexpat-1.dll*
> /c/Local/Emacs/bin/libharfbuzz-0.dll*

Are these also from librsvg dependencies?  If so, they are just
ballast, AFAIK.

> /c/Local/Emacs/bin/libfftw3-3.dll*

Which library needs this one?

>  /c/Local/Emacs/bin/libidn-11.dll*

Which library needs this one?

>  /c/Local/Emacs/bin/libstdc++-6.dll*

??? Why?  Emacs is not a C++ program.  In any case, using
"-static-libstdc++" should fix this, I think.

> /c/Local/Emacs/bin/libgcc_s_seh-1.dll*

Use -static-libgcc (and ask library maintainers to avoid this
dependency).

>  /c/Local/Emacs/bin/liblcms2-2.dll*

Which library needs this?

> /c/Local/Emacs/bin/libtiffxx-5.dll*

This is for C++ program, AFAIK.

> /c/Local/Emacs/bin/libgettextpo-0.dll*

Shouldn't be needed.

> /c/Local/Emacs/bin/liblqr-1-0.dll*

What is this library?

> /c/Local/Emacs/bin/libltdl-7.dll*

Which library needs this one?





  reply	other threads:[~2016-04-17 16:42 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
2016-04-17 16:42       ` Eli Zaretskii [this message]
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=83shyk9ofg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22959@debbugs.gnu.org \
    --cc=fabrice.popineau@gmail.com \
    /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.