|
From: | De Reus, Jaap J SITI-ITIBHL |
Subject: | configure conflict with the PTHREAD_CFLAGS=500 |
Date: | Mon, 9 Aug 2004 23:35:38 +0200 |
Hi,
OS = AIX-5.2.0.0.1 ( Maintenance level 01 )
GCC version 3.3.3
BerkeleyDB version 4.2.52 ( Build OK )
My issue: After downloading CFENGINE 2.1.7 and un-tar-ed it, I ran configure. This seems to complete succesfully, it only complain about "unable to compile pthread.h succesfully, but it continues after the check whether The correct version of BerkeleyDB has been installed.
Next step make fails however with the following errors
/usr/include/pthread.h:554: error: parse error before '*' token
/usr/include/pthread.h:557: error: parse error before '*' token
/usr/include/pthread.h:561: error: parse error before '*' token
/usr/include/pthread.h:564: error: parse error before '*' token
/usr/include/pthread.h:567: error: parse error before '*' token
/usr/include/pthread.h:570: error: parse error before '*' token
/usr/include/pthread.h:573: error: parse error before '*' token
/usr/include/pthread.h:576: error: parse error before '*' token
/usr/include/pthread.h:579: error: parse error before '*' token
/usr/include/pthread.h:583: error: parse error before '*' token
/usr/include/pthread.h:586: error: parse error before '*' token
After searching the internet a lot I found a solution for, what it looks like, baing an AIX bug. The solution is to add the option -D_XOPEN_SOURCE=500, the reason being that there are checks like >=500. So I took a sample program for testing threads. After first using just the gcc command I got the same error as above. Adding this flag it compiled succesfully. I thought BINGO, just traslate this to the options available for configuring CFENGINE. Because I'm not very familair to configure and make it took some time but this is what I did
export CC=gcc
export PTHREAD_CPPFLAGS=-lpthread
export PTHREAD_CFLAGS=-D_XOPEN_SOURCE=500
./configure
Now the "thread" check are ok ( according to the config.log ), but it now fails to continue after checking the Berkeley version. It produces a lot of errors, like
/usr/local/BerkeleyDB.4.2/include/db.h:77: error: parse error before "db_pgno_t"
/usr/local/BerkeleyDB.4.2/include/db.h:77: warning: data definition has no type or storage class
/usr/local/BerkeleyDB.4.2/include/db.h:78: error: parse error before "db_indx_t"
/usr/local/BerkeleyDB.4.2/include/db.h:78: warning: data definition has no type or storage class
/usr/local/BerkeleyDB.4.2/include/db.h:81: error: parse error before "db_recno_t"
/usr/local/BerkeleyDB.4.2/include/db.h:81: warning: data definition has no type or storage class
/usr/local/BerkeleyDB.4.2/include/db.h:84: error: parse error before "db_timeout_t"
/usr/local/BerkeleyDB.4.2/include/db.h:84: warning: data definition has no type or storage class
/usr/local/BerkeleyDB.4.2/include/db.h:91: error: parse error before "roff_t"
/usr/local/BerkeleyDB.4.2/include/db.h:91: warning: data definition has no type or storage class
So I took the piece of code from the config.log ( just before line 8513 ) and compiled seperately, it failed. After removing the XOPEN flag is compiled and executed succesfully.
Could there be a conflict in the configure script? Am I doing something stupid? Could anybody give me some advice to solve this or work around it?
I would be very gratefull for anything to help me resolving this issue.
Jaap de Reus
Unix System Engineer
Shell Information Technology International B.V.
PO Box 1027, 2260 BA Leidschendam, The Netherlands
Tel: +31 70 303 4197
[Prev in Thread] | Current Thread | [Next in Thread] |