Compiling PostgreSQL 8.1.5 with 64-bit on a G5

From: Brian Wipf <brian(at)clickspace(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Cc: Brendan Duddridge <brendan(at)clickspace(dot)com>, Guido Neitzer <lists(at)event-s(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Compiling PostgreSQL 8.1.5 with 64-bit on a G5
Date: 2006-11-27 19:53:31
Message-ID: AB6F2081-C828-43EF-88DD-641196C61F33@clickspace.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

I'm having difficulty compiling PostgreSQL 8.1.5 with 64-bit
instructions on a G5 running Mac OS X Server 10.4.8.

./configure --prefix=/usr/local/pgsql --enable-thread-safety CFLAGS='-
O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-
after-statement -Wendif-labels -fno-strict-aliasing -mcpu=970 -
mtune=970 -mpowerpc64 -mpowerpc-gpopt -arch ppc64' --without-readline
--without-zlib

I had to specify --without-readline and --without-zlib, because they
are presumably 32-bit on the system. The following error occurs when
calling configure as above:

checking thread safety of required library functions... no
configure: error:
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.

And the config.log has the following:

configure:22595: gcc -no-cpp-precomp -o conftest -O2 -Wall -Wmissing-
prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -
Wendif-labels -fno-strict-aliasing -mcpu=970 -mtune=970 -mpo
werpc64 -mpowerpc-gpopt -arch ppc64 -Wall -Wmissing-prototypes -
Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -
fno-strict-aliasing -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHR
EAD_SEMANTICS -DIN_CONFIGURE conftest.c -lresolv -ldl -lm >&5
In file included from conftest.c:131:
./src/tools/thread/thread_test.c:141: error: parse error before
'platform_is_threadsafe'
./src/tools/thread/thread_test.c:141: warning: type defaults to 'int'
in declaration of 'platform_is_threadsafe'
...

and line 141 of thread_test.c is:
static bool platform_is_threadsafe = true;

So I changed thread_test.c (lines 27 - 29) from

#ifndef bool
typedef char bool;
#endif

to

#undef bool
#ifndef bool
typedef char bool;
#endif

and then the configure went through successfully.

On to make. When I tried to make, I got the following errors:

In file included from ../../src/include/postgres.h:48,
from copydir.c:19:
../../src/include/c.h:194: error: parse error before '*' token
../../src/include/c.h:194: warning: type defaults to 'int' in
declaration of 'BoolPtr'
../../src/include/c.h:194: warning: data definition has no type or
storage class

So, then I made a similar change to c.h as I did to thread_test.c by
adding #undef bool before #ifndef bool.

and then make goes a lot further and comes up with a ton of "warning:
type defaults to 'int' in declaration of ..." errors. A full log of
the errors follow below. Any PostgreSQL developer have access to a G5
OS X box where they can specify 'arch ppc64' in the CFLAGS? Or, any
ideas I can try to get PostgreSQL 8.1.5 compiled with 64-bit
instructions on a G5 running OS X Tiger with the 'arch ppc64' flag?

I'd appreciate any suggestions.

Brian Wipf
<brian(at)clickspace(dot)com>

Errors trying to make:
In file included from ../../../../src/include/storage/spin.h:60,
from xlog.c:44:
../../../../src/include/storage/s_lock.h:806:2: error: #error
PostgreSQL does not have native spinlock support on this platform. To
continue the compilation, rerun configure using --disable-spinlocks.
However, performance will be poor. Please report this to pgsql-
bugs(at)postgresql(dot)org(dot)
In file included from ../../../../src/include/storage/spin.h:60,
from xlog.c:44:
../../../../src/include/storage/s_lock.h:863: warning: type defaults
to 'int' in declaration of 'slock_t'
../../../../src/include/storage/s_lock.h:863: error: parse error
before '*' token
../../../../src/include/storage/s_lock.h:873: warning: type defaults
to 'int' in declaration of 'slock_t'
../../../../src/include/storage/s_lock.h:873: error: parse error
before '*' token
xlog.c:382: error: parse error before 'slock_t'
xlog.c:382: warning: no semicolon at end of struct or union
xlog.c:383: warning: type defaults to 'int' in declaration of
'XLogCtlData'
xlog.c:383: warning: data definition has no type or storage class
xlog.c:385: error: parse error before '*' token
xlog.c:385: warning: type defaults to 'int' in declaration of 'XLogCtl'
xlog.c:385: warning: data definition has no type or storage class
xlog.c: In function 'XLogInsert':
xlog.c:525: error: request for member 'Insert' in something not a
structure or union
xlog.c:696: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:696: error: syntax error before '*' token
xlog.c:698: error: 'xlogctl' undeclared (first use in this function)
xlog.c:698: error: (Each undeclared identifier is reported only once
xlog.c:698: error: for each function it appears in.)
xlog.c:701: error: parse error before 'slock_t'
xlog.c:711: error: request for member 'XLogCacheByte' in something
not a structure or union
xlog.c:723: error: request for member 'Write' in something not a
structure or union
xlog.c:850: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:850: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:850: warning: statement with no effect
xlog.c:926: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:926: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:926: warning: statement with no effect
xlog.c:933: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:934: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:941: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:941: error: syntax error before '*' token
xlog.c:949: error: parse error before 'slock_t'
xlog.c: In function 'AdvanceXLInsertBuffer':
xlog.c:1152: error: request for member 'Insert' in something not a
structure or union
xlog.c:1153: error: request for member 'Write' in something not a
structure or union
xlog.c:1154: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:1170: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1176: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1181: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:1181: error: syntax error before '*' token
xlog.c:1183: error: 'xlogctl' undeclared (first use in this function)
xlog.c:1187: error: parse error before 'slock_t'
xlog.c:1228: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1237: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1238: error: request for member 'pages' in something not a
structure or union
xlog.c: In function 'XLogWrite':
xlog.c:1291: error: request for member 'Write' in something not a
structure or union
xlog.c:1337: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1337: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1337: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1340: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1341: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1344: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1447: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:1466: error: request for member 'pages' in something not a
structure or union
xlog.c:1484: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:1513: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:1566: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:1566: error: syntax error before '*' token
xlog.c:1568: error: 'xlogctl' undeclared (first use in this function)
xlog.c:1574: error: parse error before 'slock_t'
xlog.c: In function 'XLogFlush':
xlog.c:1624: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:1624: error: syntax error before '*' token
xlog.c:1626: error: 'xlogctl' undeclared (first use in this function)
xlog.c:1630: error: parse error before 'slock_t'
xlog.c:1638: error: request for member 'Write' in something not a
structure or union
xlog.c:1644: error: request for member 'Insert' in something not a
structure or union
xlog.c:1648: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:1651: error: request for member 'xlblocks' in something not a
structure or union
xlog.c: In function 'XLOGShmemInit':
xlog.c:3721: error: parse error before ')' token
xlog.c:3739: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:3740: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:3747: error: request for member 'pages' in something not a
structure or union
xlog.c:3748: error: request for member 'pages' in something not a
structure or union
xlog.c:3754: error: request for member 'XLogCacheByte' in something
not a structure or union
xlog.c:3756: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c:3757: error: request for member 'Insert' in something not a
structure or union
xlog.c:3757: error: request for member 'pages' in something not a
structure or union
xlog.c:3758: error: parse error before 'slock_t'
xlog.c:3758: error: request for member 'info_lck' in something not a
structure or union
xlog.c: In function 'StartupXLOG':
xlog.c:4491: error: request for member 'Insert' in something not a
structure or union
xlog.c:4678: error: request for member 'ThisTimeLineID' in something
not a structure or union
xlog.c:4700: error: request for member 'Insert' in something not a
structure or union
xlog.c:4702: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:4703: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:4714: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:4718: error: request for member 'Write' in something not a
structure or union
xlog.c:4720: error: request for member 'LogwrtResult' in something
not a structure or union
xlog.c:4722: error: request for member 'LogwrtRqst' in something not
a structure or union
xlog.c:4723: error: request for member 'LogwrtRqst' in something not
a structure or union
xlog.c:4730: error: request for member 'Write' in something not a
structure or union
xlog.c:4742: error: request for member 'Write' in something not a
structure or union
xlog.c:4742: error: request for member 'XLogCacheBlck' in something
not a structure or union
xlog.c: In function 'InitXLOGAccess':
xlog.c:4970: error: request for member 'ThisTimeLineID' in something
not a structure or union
xlog.c: In function 'GetRedoRecPtr':
xlog.c:4984: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:4984: error: syntax error before '*' token
xlog.c:4986: error: 'xlogctl' undeclared (first use in this function)
xlog.c:4989: error: parse error before 'slock_t'
xlog.c: In function 'CreateCheckPoint':
xlog.c:5055: error: request for member 'Insert' in something not a
structure or union
xlog.c:5118: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5118: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5118: warning: statement with no effect
xlog.c:5150: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5150: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5150: warning: statement with no effect
xlog.c:5165: error: nested functions are disabled, use -fnested-
functions to re-enable
xlog.c:5165: error: syntax error before '*' token
xlog.c:5167: error: 'xlogctl' undeclared (first use in this function)
xlog.c:5169: error: parse error before 'slock_t'
xlog.c: In function 'pg_stop_backup':
xlog.c:5718: error: request for member 'Insert' in something not a
structure or union
xlog.c:5743: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5743: error: request for member 'xlblocks' in something not a
structure or union
xlog.c:5743: warning: statement with no effect
make[4]: *** [xlog.o] Error 1
make[3]: *** [transam-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2006-11-27 20:48:55 Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5
Previous Message operationsengineer1 2006-11-27 03:47:21 Re: Which installer for Postgres on Windows?