* [w32] Build failure on master (pthread_sigmask.h)
@ 2019-05-30 13:04 Richard Copley
2019-05-30 14:12 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-05-30 13:04 UTC (permalink / raw)
To: Emacs Development
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
Emacs master fails to build in MinGW-W64 (MSYS2).
The cause seems to be that since the configuration changes in commit
"Update from Gnulib" of Wed May 29 16:33:51 2019 -0700, we now include
pthread_signal.h (<
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/include/pthread_signal.h>)
which does this:
#define pthread_sigmask(H, S1, S2) 0
The result:
gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc
-mtune=generic -MMD -MF deps/pthread_sigmask.d -MP -fno-common -O2 -I.
-I../src -I. -I./../src pthread_sigmask.c
In file included from
C:/msys64/mingw64/x86_64-w64-mingw32/include/signal.h:10,
from pthread_sigmask.c:20:
pthread_sigmask.c:34:1: error: expected identifier or '(' before numeric
constant
34 | pthread_sigmask (int how, const sigset_t *new_mask, sigset_t
*old_mask)
| ^~~~~~~~~~~~~~~
[-- Attachment #2: Type: text/html, Size: 1230 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [w32] Build failure on master (pthread_sigmask.h)
2019-05-30 13:04 [w32] Build failure on master (pthread_sigmask.h) Richard Copley
@ 2019-05-30 14:12 ` Eli Zaretskii
2019-05-30 15:54 ` Richard Copley
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-05-30 14:12 UTC (permalink / raw)
To: Richard Copley; +Cc: emacs-devel
> From: Richard Copley <rcopley@gmail.com>
> Date: Thu, 30 May 2019 14:04:26 +0100
>
> Emacs master fails to build in MinGW-W64 (MSYS2).
>
> The cause seems to be that since the configuration changes in commit "Update from Gnulib" of Wed May 29
> 16:33:51 2019 -0700, we now include pthread_signal.h
> (<https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/include/pthread_signal.h>)
> which does this:
>
> #define pthread_sigmask(H, S1, S2) 0
>
> The result:
>
> gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc -mtune=generic -MMD -MF
> deps/pthread_sigmask.d -MP -fno-common -O2 -I. -I../src -I. -I./../src pthread_sigmask.c
> In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/signal.h:10,
> from pthread_sigmask.c:20:
> pthread_sigmask.c:34:1: error: expected identifier or '(' before numeric constant
> 34 | pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
> | ^~~~~~~~~~~~~~~
This doesn't happen to me, but I don't use MinGW64.
Can you spot the part of the changes which caused us to include
pthread_signal.h? We shouldn't include any part of pthreads in the
Windows build.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [w32] Build failure on master (pthread_sigmask.h)
2019-05-30 14:12 ` Eli Zaretskii
@ 2019-05-30 15:54 ` Richard Copley
2019-05-30 18:44 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-05-30 15:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs Development
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On Thu, 30 May 2019 at 15:12, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Richard Copley <rcopley@gmail.com>
> > Date: Thu, 30 May 2019 14:04:26 +0100
> >
> > Emacs master fails to build in MinGW-W64 (MSYS2).
> >
> > The cause seems to be that since the configuration changes in commit
> "Update from Gnulib" of Wed May 29
> > 16:33:51 2019 -0700, we now include pthread_signal.h
> > (<
> https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/include/pthread_signal.h
> >)
> > which does this:
> >
> > #define pthread_sigmask(H, S1, S2) 0
> >
> > The result:
> >
> > gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc
> -mtune=generic -MMD -MF
> > deps/pthread_sigmask.d -MP -fno-common -O2 -I. -I../src -I. -I./../src
> pthread_sigmask.c
> > In file included from
> C:/msys64/mingw64/x86_64-w64-mingw32/include/signal.h:10,
> > from pthread_sigmask.c:20:
> > pthread_sigmask.c:34:1: error: expected identifier or '(' before numeric
> constant
> > 34 | pthread_sigmask (int how, const sigset_t *new_mask, sigset_t
> *old_mask)
> > | ^~~~~~~~~~~~~~~
>
> This doesn't happen to me, but I don't use MinGW64.
>
> Can you spot the part of the changes which caused us to include
> pthread_signal.h? We shouldn't include any part of pthreads in the
> Windows build.
>
Not beyond the obvious (it's the pthread_sigmask.m4 changes), no. Sorry.
Prior to this change, lib\pthread_sigmask.c wasn't compiled at all AFAICS.
[-- Attachment #2: Type: text/html, Size: 2272 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [w32] Build failure on master (pthread_sigmask.h)
2019-05-30 15:54 ` Richard Copley
@ 2019-05-30 18:44 ` Eli Zaretskii
2019-05-30 19:39 ` Richard Copley
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-05-30 18:44 UTC (permalink / raw)
To: Richard Copley; +Cc: emacs-devel
> From: Richard Copley <rcopley@gmail.com>
> Date: Thu, 30 May 2019 16:54:13 +0100
> Cc: Emacs Development <emacs-devel@gnu.org>
>
> > gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc -mtune=generic -MMD -MF
> > deps/pthread_sigmask.d -MP -fno-common -O2 -I. -I../src -I. -I./../src pthread_sigmask.c
> > In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/signal.h:10,
> > from pthread_sigmask.c:20:
> > pthread_sigmask.c:34:1: error: expected identifier or '(' before numeric constant
> > 34 | pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
> > | ^~~~~~~~~~~~~~~
>
> This doesn't happen to me, but I don't use MinGW64.
>
> Can you spot the part of the changes which caused us to include
> pthread_signal.h? We shouldn't include any part of pthreads in the
> Windows build.
>
> Not beyond the obvious (it's the pthread_sigmask.m4 changes), no. Sorry.
> Prior to this change, lib\pthread_sigmask.c wasn't compiled at all AFAICS.
We need to augment nt/mingw-cfg.site to bypass pthread_sigmask, there
are already some settings there to that effect, we need to adapt them
to this Gnulib change. Maybe try adding this line to mingw-cfg.site:
gl_cv_func_pthread_sigmask_macro=no
If that doesn't help, please show the relevant parts of your
config.log. Anything that matches "pthread".
(On my box the problem doesn't happen because I don't have the
pthread.h header polluting my system.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [w32] Build failure on master (pthread_sigmask.h)
2019-05-30 18:44 ` Eli Zaretskii
@ 2019-05-30 19:39 ` Richard Copley
2019-05-31 9:18 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-05-30 19:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs Development
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
On Thu, 30 May 2019 at 19:43, Eli Zaretskii <eliz@gnu.org> wrote:
We need to augment nt/mingw-cfg.site to bypass pthread_sigmask, there
are already some settings there to that effect, we need to adapt them
to this Gnulib change. Maybe try adding this line to mingw-cfg.site:
gl_cv_func_pthread_sigmask_macro=no
Yes, that works. (The build succeeds and no pthread_sigmask.o is generated.)
I'm impressed, thanks.
If that doesn't help, please show the relevant parts of your
config.log. Anything that matches "pthread".
(On my box the problem doesn't happen because I don't have the
pthread.h header polluting my system.)
One package's pollution is another's prerequisite. Easily eradicated:
pacman -R ${MINGW_PACKAGE_PREFIX}-libwinpthread-git
[-- Attachment #2: Type: text/html, Size: 982 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [w32] Build failure on master (pthread_sigmask.h)
2019-05-30 19:39 ` Richard Copley
@ 2019-05-31 9:18 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2019-05-31 9:18 UTC (permalink / raw)
To: Richard Copley; +Cc: emacs-devel
> From: Richard Copley <rcopley@gmail.com>
> Date: Thu, 30 May 2019 20:39:30 +0100
> Cc: Emacs Development <emacs-devel@gnu.org>
>
> gl_cv_func_pthread_sigmask_macro=no
>
> Yes, that works. (The build succeeds and no pthread_sigmask.o is generated.)
Thanks for testing, pushed.
> I'm impressed, thanks.
There's no magic: I looked into my config.log and saw that the above
variable was set to "no" because I didn't have pthreads.h.
> (On my box the problem doesn't happen because I don't have the
> pthread.h header polluting my system.)
>
> One package's pollution is another's prerequisite. Easily eradicated:
>
> pacman -R ${MINGW_PACKAGE_PREFIX}-libwinpthread-git
Right. FWIW, I've decided long ago that the trouble produced by
having pthreads headers and import libraries installed was way greater
than any advantages it gives. The Windows ports of pthreads are
simply not reliable enough, IME.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-31 9:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 13:04 [w32] Build failure on master (pthread_sigmask.h) Richard Copley
2019-05-30 14:12 ` Eli Zaretskii
2019-05-30 15:54 ` Richard Copley
2019-05-30 18:44 ` Eli Zaretskii
2019-05-30 19:39 ` Richard Copley
2019-05-31 9:18 ` Eli Zaretskii
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).