wespvp@syntegra.com wrote:
> On 4/24/04 9:15 PM, "Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
>
> > No, see pgsql/config/acx_pthread.m4. It does the THREAD_LIBS part
> > automatically, and the THREAD_SUPPORT part is gone. We run our thread
> > test as part of configure now.
>
> I must be missing something. I don't see a -lpthread anywhere. The libpq
> linking is:
>
> gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -bundle fe-auth.o fe-connect.o fe-exec.o fe-misc.o
> fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o
> fe-secure.o dllist.o md5.o ip.o wchar.o encnames.o noblock.o path.o thread.o
> -L../../../src/port -lssl -lcrypto -lkrb5 -lresolv -D_REENTRANT
> -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -o libpq.so.3.2
>
> How can this be linking in thread support without -lpthread?
In config/acx_pthreasd.m4, I see:
acx_pthread_flags="pthreads none -Kthread -kthread lthread \
-pthread -pthreads -mthreads pthread --thread-safe -mt pthread-conf
...
The configure test should be trying -lpthread as part of its work.
Can you check config.log to see why it is failing? Here is the code
that should be checking:
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
I don't have any flags here so I can't test that. Maybe I should try on
FreeBSd.
Also, I am not happy the -D flags appear after the C files. I might
need to fix that in the Makefiles.
--
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