Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-13 Thread Bruno Haible
Hi Tim, Thanks for the more verbose configure output. I misinterpreted the config.log output; I now see how it was produced even without --disable-threads. The logic in threadlib.m4 is as follows: - If no preference is given (no --enable-threads={posix|solaris|pth|windows} options), the

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-12 Thread Tim Rühsen
On 12.04.19 02:26, Bruno Haible wrote: > Hi Tim, > > The points to look at are: > - How does the configure script behave while running the expanded code > that comes from threadlib.m4? Try "sh -x ./configure ..." for this > exercise. > - Why does gl_lock_unlock expand to a call to

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Eric Blake
On 4/11/19 7:26 PM, Bruno Haible wrote: > Btw, I never build with mingw-pthreads installed. But even with mingw-pthreads > installed, gnulib modules ought to not use it; they ought to use the Windows > API instead. Jumping in late, but this reminded me of a patch I wrote years ago:

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Bruno Haible
Hi Tim, The points to look at are: - How does the configure script behave while running the expanded code that comes from threadlib.m4? Try "sh -x ./configure ..." for this exercise. - Why does gl_lock_unlock expand to a call to pthread_mutex_unlock? Only if USE_POSIX_THREADS is

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Tim Rühsen
On 11.04.19 20:56, Bruno Haible wrote: > Hi Tim, > >>> For analyzing this, we would need the generated >>> - config.log, >>> - config.status, >>> - config.h. >> >> Thanks, attached. > > You should also say which package you are building, and with which > configure options you configured

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Tim Rühsen
On 11.04.19 20:56, Bruno Haible wrote: > Hi Tim, > >>> For analyzing this, we would need the generated >>> - config.log, >>> - config.status, >>> - config.h. >> >> Thanks, attached. > > You should also say which package you are building, and with which > configure options you configured

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Bruno Haible
Hi Tim, > > For analyzing this, we would need the generated > > - config.log, > > - config.status, > > - config.h. > > Thanks, attached. You should also say which package you are building, and with which configure options you configured it. It looks like - you are building

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock

2019-04-11 Thread Bruno Haible
Hi Tim, > Running gnulib tests on MinGW (current Debian unstable) fail: > > /usr/bin/x86_64-w64-mingw32-ld: > libtests.a(localename.o):localename.c:(.text+0x10): undefined reference > to `pthread_mutex_lock' > /usr/bin/x86_64-w64-mingw32-ld: > libtests.a(localename.o):localename.c:(.text+0x83):