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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



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





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group