MacOS X 10.5.1 and compiling for multiple Architectures

From: Chris Ruprecht <chris(at)ruprecht(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: MacOS X 10.5.1 and compiling for multiple Architectures
Date: 2008-01-03 04:10:59
Message-ID: C76810EF-CE14-4090-82BA-C9B7504DBB22@ruprecht.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-01-03 05:41:05 Re: MacOS X 10.5.1 and compiling for multiple Architectures
Previous Message ivan.hou 2008-01-03 02:28:27 Re: What's the XID?