From: | Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | CVS tip compiler error with --enable-thread-safety |
Date: | 2004-05-30 13:38:08 |
Message-ID: | 200405301908.08251.shridhar@frodo.hserus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Platform Slackware linux 9.1/ Linux 2.6.4
I did a make distclean and ./configure --enable-thread-safety. The build
aborted with following error messages
make[4]: Leaving directory `/home/shridhar/postgresql/pgsql/src/port'
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations
-DFRONTEND -I../../../src/interfaces/libpq -I../../../src/include
-D_GNU_SOURCE -c -o initdb.o initdb.c
rm -f exec.c && ln -s ../../../src/port/exec.c .
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations
-DFRONTEND -I../../../src/interfaces/libpq -I../../../src/include
-D_GNU_SOURCE -c -o exec.o exec.c
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations
initdb.o exec.o -L../../../src/interfaces/libpq -lpq -L../../../src/port
-Wl,-rpath,/usr/local/pgsql/lib -lz -lreadline -ltermcap -lcrypt -lresolv
-lnsl -ldl -lm -lpgport -o initdb
../../../src/interfaces/libpq/libpq.so: undefined reference to
`pthread_getspecific'
../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_once'
../../../src/interfaces/libpq/libpq.so: undefined reference to
`pthread_key_create'
../../../src/interfaces/libpq/libpq.so: undefined reference to
`pthread_setspecific'
collect2: ld returned 1 exit status
make[3]: *** [initdb] Error 1
make[3]: Leaving directory `/home/shridhar/postgresql/pgsql/src/bin/initdb'
The relevant configure messages read
-------------
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
-------------
Here is relevant portion of src/Makefile.global
-------------
PTHREAD_CFLAGS = -pthread -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS
PTHREAD_LIBS =
LIBS = -lz -lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm
-------------
It worked after I manually added -lpthread to LIBS and did a make clean;make
Regards
Shridhar
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-05-30 14:07:37 | Re: CVS tip compiler error with --enable-thread-safety |
Previous Message | Shridhar Daithankar | 2004-05-30 12:50:22 | Converting postgresql.conf parameters to kilobytes |