postgreSQL-8.0.1 configure --enable-thread-safety with icc-8.1 on RHEL-AS3 Itanium-2 gives error - Mailing list pgsql-hackers

From Vikram Kalsi
Subject postgreSQL-8.0.1 configure --enable-thread-safety with icc-8.1 on RHEL-AS3 Itanium-2 gives error
Date
Msg-id ed5f0fd7050303220156e02ba3@mail.gmail.com
Whole thread Raw
Responses Re: postgreSQL-8.0.1 configure --enable-thread-safety with  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Hi,

I am trying to build postgresql-8.0.1 with icc-8.1.028 on a Linux
RHEL AS3 SMP Itanium2 machine and I get an error as follows when I run
configure --enable-thread-safety as follows-


------------------------------------------------------------------------------------------------------------------------------------
shell>export CC=icc
shell>export CFLAGS="-static -fPIC"
shell>export LDFLAGS="-L/opt/intel_cc_80/lib"
shell>export CPPFLAGS="-I/opt/intel_cc_80/include"

shell>configure --prefix=$MY_HOME/dbms/pgsql --enable-thread-safety
--disable-shared --with-low-memory --with-pgport=5410
......
......
......
configure:18836: icc -o conftest -static -fPIC -Wall
-Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
-Wold-style-definition -Wendif-labels -fno-strict-aliasing 
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE
-D_GNU_SOURCE  -L/opt/intel_cc_80/lib  conftest.c -lz -lreadline
-ltermcap -lcrypt -lresolv -lnsl -ldl -lm -lbsd   >&5

./src/tools/thread/thread_test.c(75): remark #1418: external
definition with no prior declaration char     *temp_filename_1;           ^
./src/tools/thread/thread_test.c(76): remark #1418: external
definition with no prior declaration char     *temp_filename_2;           ^
./src/tools/thread/thread_test.c(78): remark #1418: external
definition with no prior declaration pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER;                 ^
./src/tools/thread/thread_test.c(80): remark #1418: external
definition with no prior declaration volatile int thread1_done = 0;              ^
./src/tools/thread/thread_test.c(81): remark #1418: external
definition with no prior declaration volatile int thread2_done = 0;              ^
./src/tools/thread/thread_test.c(83): remark #1418: external
definition with no prior declaration volatile int errno1_set = 0;              ^
./src/tools/thread/thread_test.c(84): remark #1418: external
definition with no prior declaration volatile int errno2_set = 0;              ^
./src/tools/thread/thread_test.c(105): remark #1418: external
definition with no prior declaration bool          platform_is_threadsafe = true;               ^
/tmp/iccQ3B36U.o(.text+0x1d2): In function `main':
: undefined reference to `pthread_mutex_lock'
/tmp/iccQ3B36U.o(.text+0x202): In function `main':
: undefined reference to `pthread_create'
/tmp/iccQ3B36U.o(.text+0x232): In function `main':
: undefined reference to `pthread_create'
/tmp/iccQ3B36U.o(.text+0x2e2): In function `main':
: undefined reference to `pthread_mutex_unlock'
/tmp/iccQ3B36U.o(.text+0x302): In function `main':
: undefined reference to `pthread_join'
/tmp/iccQ3B36U.o(.text+0x322): In function `main':
: undefined reference to `pthread_join'
/tmp/iccQ3B36U.o(.text+0x602): In function `func_call_1':
: undefined reference to `pthread_mutex_lock'
/tmp/iccQ3B36U.o(.text+0x612): In function `func_call_1':
: undefined reference to `pthread_mutex_unlock'
/tmp/iccQ3B36U.o(.text+0x872): In function `func_call_2':
: undefined reference to `pthread_mutex_lock'
/tmp/iccQ3B36U.o(.text+0x882): In function `func_call_2':
: undefined reference to `pthread_mutex_unlock'
configure:18839: $? = 1
configure: program exited with status 1
configure: failed program was:
#line 18830 "configure"
#include "confdefs.h"
#include "./src/tools/thread/thread_test.c"
configure:18853: result: no
configure:18863: 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.

------------------------------------------------------------------------------------------------------------------------------------
The complete log is online at http://www.cse.psu.edu/~kalsi/files2/config.log

The same works when I use gcc(3.2.3) and configure also works with
icc-8.1 if I dont use --enable-thread-safety!

Can anybody see if I am doing it wrong? Any suggestions for resolving
this error?

Thanks,
-Vikram


pgsql-hackers by date:

Previous
From: Vikram Kalsi
Date:
Subject: Re: postgreSQL-8.0.1 compilation with icc-8.1 on Itanium-2 gives "error: asm statements not supported"
Next
From: Aaron Birkland
Date:
Subject: Re: Solving hash table overrun problems