Re: pthreads issue when compiling 7.4.8 on AIX 5.3

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: pthreads issue when compiling 7.4.8 on AIX 5.3
Date: 2005-06-16 20:28:00
Message-ID: 200506162028.j5GKS0O19411@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


I would look around in sys/types.h to see if there is a #define that is
preventing the symbol from being exported.

---------------------------------------------------------------------------

Andrew Hammond wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm seeing the following errors when compiling postgres 7.4.8 (vanilla)
> on AIX 5.3
>
> make[2]: Entering directory `/opt/src/postgresql-7.4.8/src/port'
> gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
> - -Wmissing-declarations -I../../src/include -I/opt/dbs/readline/include
> - -I/opt/dbs/zlib/include -I/opt/freeware/include -c thread.c
> In file included from thread.c:25:
> /usr/include/pthread.h:652: error: parse error before '*' token
> /usr/include/pthread.h:655: error: parse error before '*' token
> /usr/include/pthread.h:658: error: parse error before '*' token
> /usr/include/pthread.h:661: error: parse error before '*' token
> /usr/include/pthread.h:664: error: parse error before '*' token
> /usr/include/pthread.h:672: error: parse error before '*' token
> /usr/include/pthread.h:675: error: parse error before '*' token
> /usr/include/pthread.h:678: error: parse error before '*' token
> /usr/include/pthread.h:681: error: parse error before '*' token
> /usr/include/pthread.h:689: error: parse error before '*' token
> /usr/include/pthread.h:693: error: parse error before '*' token
> /usr/include/pthread.h:696: error: parse error before '*' token
> make[2]: *** [thread.o] Error 1
> make[2]: Leaving directory `/opt/src/postgresql-7.4.8/src/port'
>
> I've looked into pthread.h and it's refereing to pthread_barrier_t,
> pthread_barrierattr_t and pthread_spinlock_t. These do not exist in
> pthread.h on our 5.1 box. However they are defined in sys/types.h which
> is included up near the top pthread.h.
>
> I'm somewhat at a loss about where this could be going wrong.
>
> Configure options follow
>
> ./configure --prefix=/opt/dbs/pgsql748-slony105-AIX53-2005-06-13
> -
> --with-includes=/opt/dbs/readline/include:/opt/dbs/zlib/include:/usr/ccs/include:/opt/freeware/include:/usr/local/include
> -
> --with-libraries=/opt/dbs/readline/lib:/opt/dbs/zlib/lib:/usr/ccs/lib:/opt/freeware/lib:/usr/local/lib
> - --enable-thread-safety --enable-debug --enable-aix64
>
> Note that this binary will need to have slony support which is why the
> - --enable-thread-safety. We've had success compiling postgres on AIX 5.1
> with identical settings. We're using gcc 3.3.2
>
> The thread_test program fails identically:
>
> - -bash-2.05b$ make
> gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
> - -Wmissing-declarations -I../../../src/include
> - -I/opt/dbs/readline/include -I/opt/dbs/zlib/include
> - -I/opt/freeware/include -c -o thread_test.o thread_test.c
> In file included from thread_test.c:23:
> /usr/include/pthread.h:652: error: parse error before '*' token
> /usr/include/pthread.h:655: error: parse error before '*' token
> /usr/include/pthread.h:658: error: parse error before '*' token
> /usr/include/pthread.h:661: error: parse error before '*' token
> /usr/include/pthread.h:664: error: parse error before '*' token
> /usr/include/pthread.h:672: error: parse error before '*' token
> /usr/include/pthread.h:675: error: parse error before '*' token
> /usr/include/pthread.h:678: error: parse error before '*' token
> /usr/include/pthread.h:681: error: parse error before '*' token
> /usr/include/pthread.h:689: error: parse error before '*' token
> /usr/include/pthread.h:693: error: parse error before '*' token
> /usr/include/pthread.h:696: error: parse error before '*' token
> make: *** [thread_test.o] Error 1
>
> - --
> Andrew Hammond 416-673-4138 ahammond(at)ca(dot)afilias(dot)info
> Database Administrator, Afilias Canada Corp.
> CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFCsd5bgfzn5SevSpoRAhKzAKC0m1lTZ96bzkpDB4grSGfOTbh3QACggNjo
> E0PIJkYA5zSTD3Q3z7LQMmM=
> =ax+Z
> -----END PGP SIGNATURE-----
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Bruce Momjian 2005-06-16 20:28:40 Re: pthreads issue when compiling 7.4.8 on AIX 5.3
Previous Message Mohan, Ross 2005-06-16 20:25:59 Re: pthreads issue when compiling 7.4.8 on AIX 5.3