MacOS X 10.5.1 and compiling for multiple Architectures - Mailing list pgsql-admin

From Chris Ruprecht
Subject MacOS X 10.5.1 and compiling for multiple Architectures
Date
Msg-id C76810EF-CE14-4090-82BA-C9B7504DBB22@ruprecht.org
Whole thread Raw
Responses Re: MacOS X 10.5.1 and compiling for multiple Architectures
Re: MacOS X 10.5.1 and compiling for multiple Architectures
List pgsql-admin
Hello all,

I am trying to build PG 8.3Beta4 for MacOS Leopard.
It works fine when using the default i386 architecture. However, this
is not an option as Apple, in their wisdom, have chosen to build
Apache as a 64-bit application and their PHP 5.2.4 module without PG
support as a Intel 32, Intel 64, PPC 32 and PPC 64 type module. For
those that don't know: Under MacOS, it is possible to build
executables that will run native on multiple architectures, all
contained in a single file - kind of weird, and pretty bloated.

Today, I managed to build PG as either i386 or x86_64 binaries, but
not both. The 'make' process crashed at this point:

gcc -no-cpp-precomp -arch x86_64 -arch i386 -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -
fno-strict-aliasing -I../../../../src/include   -c -o heaptuple.o
heaptuple.c
heaptuple.c: In function 'heap_fill_tuple':
heaptuple.c:250: error: duplicate case value
heaptuple.c:250: error: previously used here
heaptuple.c: In function 'DataFill':
heaptuple.c:383: error: duplicate case value
heaptuple.c:383: error: previously used here
lipo: can't figure out the architecture type of: /var/tmp//cc4ObL54.out
make[4]: *** [heaptuple.o] Error 1
make[3]: *** [common-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

When looking at the source line, I see:

store_att_byval(data, values[i], att[i]->attlen);

I have checked this using 8.2.5 as well, with the same results (except
that the errors are on different line numbers, but in the same file,
using the same function and arguments).

Any help is appreciated.

best regards,
chris
--
chris ruprecht
network grunt and bit pusher extraordinaíre






Attachment

pgsql-admin by date:

Previous
From: "ivan.hou"
Date:
Subject: Re: What's the XID?
Next
From: Tom Lane
Date:
Subject: Re: MacOS X 10.5.1 and compiling for multiple Architectures