Re: [BUGS] 8.0.0beta1: -lpthread missing - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: [BUGS] 8.0.0beta1: -lpthread missing |
Date | |
Msg-id | 200408171522.i7HFM1k04107@candle.pha.pa.us Whole thread Raw |
Responses |
Re: [BUGS] 8.0.0beta1: -lpthread missing
|
List | pgsql-patches |
OK, I got it working now. Seems the code needed more help to loop than I though, and of course trying to change it as little as possible caused me to miss that. The attached, applied patch properly aggregates the thread flags. The bad news is that on my platform that needs _no_ thread flags or libraries I have: PTHREAD_CFLAGS = -Kthread -kthread -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS PTHREAD_LIBS = I assume those are just ignored for portability so I assume we are OK. --------------------------------------------------------------------------- Martin M�nstermann wrote: > Bruce Momjian wrote: > > OK, I found the cause. I forgot to run autoconf after the > > config/acx_pthread.m4 updated. I just did so. Please retest. Thanks. > > Ok, I did an cvs update and rerun configure. > Now it gives me an error: > > [...] > checking whether pthreads work with -pthread... no > checking whether pthreads work with -pthreads... yes > checking for the pthreads library -lpthread... yes > checking whether pthreads work with -mt... yes > checking for the pthreads library -lpthreads... yes > checking whether pthreads work without any flags... yes > checking whether pthreads work with -Kthread... yes > checking whether pthreads work with -kthread... yes > checking for the pthreads library -llthread... yes > checking whether pthreads work with -pthread... yes > checking whether pthreads work with -pthreads... yes > checking whether pthreads work with -mthreads... yes > checking for the pthreads library -lpthread... yes > checking whether pthreads work with --thread-safe... yes > checking whether pthreads work with -mt... yes > checking for joinable pthread attribute... unknown > configure: WARNING: we do not know how to create joinable pthreads > > [Oooops.] > > checking if more special flags are required for pthreads... no > checking for cc_r... gcc > checking pthread.h usability... yes > checking pthread.h presence... yes > checking for pthread.h... yes > checking for strerror_r... no > checking for getpwuid_r... no > checking for gethostbyname_r... no > checking whether getpwuid_r takes a fifth argument... no > checking whether strerror_r returns int... no > [...] > checking thread safety of required library functions... no > configure: error: > *** Thread test program failed. Your platform is not thread-safe. > *** Check the file 'config.log'for the exact reason. > *** > *** You can use the configure option --enable-thread-safety-force > *** to force threads to be enabled. However, you must then run > *** the program in src/tools/thread and add locking function calls > *** to your applications to guarantee thread safety. > > > Bruce, I will send you my config.log privately. > > Regards, > Martin > > > > > -------------------------------------------------------------------------= > > -- > > > > Martin M=FCnstermann wrote: > > > >>Bruce Momjian wrote: > >> > >>>>--> We need -lpthread on solaris, too. > >>> > >>>=20 > >>>=20 > >>>So the current CVS code is good? > >> > >>=20 > >>No. At least not for solaris8. > >>=20 > >>configure says: > >>checking whether pthreads work with -pthread... no > >>checking whether pthreads work with -pthreads... yes > >>checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE > >>checking if more special flags are required for pthreads... no > >>checking for cc_r... gcc > >>checking pthread.h usability... yes > >>checking pthread.h presence... yes > >>checking for pthread.h... yes > >>=20 > >>=20 > >>Makefile.global: > >>PTHREAD_CFLAGS =3D -pthreads -D_REENTRANT -D_THREAD_SAFE=20 > >>-D_POSIX_PTHREAD_SEMANTICS > >>PTHREAD_LIBS =3D > >>=20 > >>No -lpthread and the resulting binaries have no dependancy on=20 > >>libpthread.so, so at runtime only the stubs are being called. > >>=20 > >>Regards, > >> Martin > >>=20 > > > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
pgsql-patches by date: