Christopher Browne cbbrowne
Wed Jun 8 23:23:05 PDT 2005
John Liu wrote:

>I was able to compile the postgresql 7.4.5 by adding THREAD_SUPPORT=yes
>in the configure file, postgresql compiled and installed with
>--enable-thread-safty. 
>
>But failed in slony-I configure -
>
>./configure --with-pgsourcetree=/home/johnl/soft/postgresql-7.4.5
>checking build system type... powerpc-ibm-aix5.1.0.0
>checking host system type... powerpc-ibm-aix5.1.0.0
>checking which template to use... aix
>checking for gcc... gcc
>checking for C compiler default output... a.out
>checking whether the C compiler works... yes
>checking whether we are cross compiling... no
>checking for suffix of executables...
>checking for suffix of object files... o
>checking whether we are using the GNU C compiler... yes
>checking whether gcc accepts -g... yes
>checking for ld used by GCC... /usr/bin/ld
>checking if the linker (/usr/bin/ld) is GNU ld... no
>checking for the pthreads library -lpthreads... yes
>checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
>checking if more special flags are required for pthreads...
>-D_THREAD_SAFE
>checking for cc_r... cc_r
>configure: error:
>    ********************
>    * The sourcetree in /home/johnl/soft/postgresql-7.4.5
>    * does not appear to be built. Please make sure to build
>    * and install PostgreSQL from sources first.
>    ********************
>
>  
>
What you need to look at to do more diagnosis is the "config.log" file.

./configure goes off and tries compiling numerous little programs to
test the various options.

You'll presumably see some very tiny C program listed near the end of
the log, and see that there was some problem trying to compile it.

I was having this very difficulty last week...

The resolution, for me, was to add the environment variable
PTHREAD_LIBS, so my configure line looked like:

PTHREAD_LIBS="-lpthreads" ./configure --prefix=$PGHOME 
--enable-thread-safety --with-pgconfigdir=$PGHOME/bin
--with-pgbindir=$PGHOME/bin --with-pgincludedir=$PGHOME/include
--with-pglibdir=$PGHOME/lib --with-pgsharedir=$PGHOME/share

I'll bet that the problem lies with the attempt to compile a pthreads
test failing to use -lpthreads to add in the library...

But at any rate, the thing to look at is config.log; that's where you'll
find clues.  The output of ./configure only gives "vague impressions,"
in comparison.


More information about the Slony1-general mailing list