Обсуждение: Réf. : Re: v8 on AIX5.2

Поиск
Список
Период
Сортировка

Réf. : Re: v8 on AIX5.2

От
frederic.germaneau@bull.net
Дата:
I'm trying to evaluate PostgreSQL on AIX 5L(5.2)

I have downloaded sources of PostgreSQL 8.0 beta 2.

As described in documentation,
I, first, launch "compile" then "gmake", and at least "gmake check".

Without the option "--enable-thread-safety" all works fine.

But in versions 5.2 and 5.3 of AIX "compile --enable-thread-safety" issues
with :
*** 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.


Contents of config.log is:
configure:16063: checking for the pthreads library -lpthreads
configure:16101: gcc -o conftest -O2 -fno-strict-aliasing       conftest.c
-lpth
reads  -lz -lreadline -lPW -lgen -lld -lnsl -ldl -lm  >&5
In file included from conftest.c:117:
/usr/include/pthread.h:556: parse error before `*'
/usr/include/pthread.h:559: parse error before `*'
/usr/include/pthread.h:563: parse error before `*'
/usr/include/pthread.h:566: parse error before `*'
/usr/include/pthread.h:569: parse error before `*'
/usr/include/pthread.h:572: parse error before `*'
/usr/include/pthread.h:575: parse error before `*'
/usr/include/pthread.h:578: parse error before `*'
/usr/include/pthread.h:581: parse error before `*'


thanks

Frédéric




Re: Réf. : Re: v8 on AIX5.2

От
Tom Lane
Дата:
frederic.germaneau@bull.net writes:
> Contents of config.log is:
> configure:16063: checking for the pthreads library -lpthreads
> configure:16101: gcc -o conftest -O2 -fno-strict-aliasing       conftest.c
> -lpth
> reads  -lz -lreadline -lPW -lgen -lld -lnsl -ldl -lm  >&5
> In file included from conftest.c:117:
> /usr/include/pthread.h:556: parse error before `*'
> /usr/include/pthread.h:559: parse error before `*'
> /usr/include/pthread.h:563: parse error before `*'

This looks like your version of pthread.h depends on some other system
header having been included first; but there's not nearly enough
information here to guess which one(s) it needs.

            regards, tom lane

Re: R?f. : Re: v8 on AIX5.2

От
Bruce Momjian
Дата:
Tom Lane wrote:
> frederic.germaneau@bull.net writes:
> > Contents of config.log is:
> > configure:16063: checking for the pthreads library -lpthreads
> > configure:16101: gcc -o conftest -O2 -fno-strict-aliasing       conftest.c
> > -lpth
> > reads  -lz -lreadline -lPW -lgen -lld -lnsl -ldl -lm  >&5
> > In file included from conftest.c:117:
> > /usr/include/pthread.h:556: parse error before `*'
> > /usr/include/pthread.h:559: parse error before `*'
> > /usr/include/pthread.h:563: parse error before `*'
>
> This looks like your version of pthread.h depends on some other system
> header having been included first; but there's not nearly enough
> information here to guess which one(s) it needs.

I wonder if this is the problem:

        # More AIX lossage: must compile with cc_r
        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})

This code is from acx_pthread.m4.  I figured any OS that required a
separate compiler for threading was really broken but this might be
needed still for AIX.  I hesitated to propogate this into our code
because it would require a new $(CC) for all thread builds and I didn't
want to go that far unless I had to.

If you set CC=cc_r, does it help?

--
  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