Skip site navigation (1) Skip section navigation (2)

Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5

From: Brian Wipf <brian(at)clickspace(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org, Brendan Duddridge <brendan(at)clickspace(dot)com>, Guido Neitzer <lists(at)event-s(dot)net>
Subject: Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5
Date: 2006-11-28 00:38:58
Message-ID: D4E50A09-DE45-4244-BC93-0529A10A2A56@clickspace.com (view raw or flat)
Thread:
Lists: pgsql-ports
On 27-Nov-06, at 1:48 PM, Tom Lane wrote:
> So my suggestion is to get rid of that -mcpu=970, and maybe some  
> more of
> the -m flags too, until you don't get any definition of "bool" in the
> output from
> 	$ echo >foo.c
> 	$ gcc -E -dM <<all your other CFLAGS>> foo.c
Removing -mcpu=970 got rid of the #define bool bool, among other  
things, which allowed the configure to go through without modifying  
any code. The make still fails with what looks like identical errors.  
The only flag I'm now specifying in addition to a vanilla configure,  
is the -arch ppc64, which I believe is required for 64-bit.

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

Errors are, again, the same as before:
../../../../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
...
...

Here's a diff of the ouput of $ gcc -E -dM -arch ppc64 foo.c and $  
gcc -E -dm foo.c:

< #define __UINTMAX_TYPE__ long unsigned int
---
 > #define __UINTMAX_TYPE__ long long unsigned int
21a22
 > #define __ppc__ 1
36d36
< #define __LP64__ 1
39d38
< #define __ppc64__ 1
51c50
< #define __LONG_MAX__ 9223372036854775807L
---
 > #define __LONG_MAX__ 2147483647L
66,67c65
< #define _LP64 1
< #define __INTMAX_MAX__ 9223372036854775807L
---
 > #define __INTMAX_MAX__ 9223372036854775807LL
72c70
< #define __INTMAX_TYPE__ long int
---
 > #define __INTMAX_TYPE__ long long int
76,77c74
< #define __PTRDIFF_TYPE__ long int
< #define _ARCH_PPC64 1
---
 > #define __PTRDIFF_TYPE__ int



In response to

Responses

pgsql-ports by date

Next:From: Tom LaneDate: 2006-11-28 00:48:22
Subject: Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5
Previous:From: Tom LaneDate: 2006-11-27 20:48:55
Subject: Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group