Re: Build universal binary on Mac OS X 10.6? - Mailing list pgsql-general

From Tom Lane
Subject Re: Build universal binary on Mac OS X 10.6?
Date
Msg-id 27132.1259806617@sss.pgh.pa.us
Whole thread Raw
In response to Re: Build universal binary on Mac OS X 10.6?  (Israel Brewster <israel@frontierflying.com>)
Responses Re: Build universal binary on Mac OS X 10.6?  (Israel Brewster <israel@frontierflying.com>)
List pgsql-general
Israel Brewster <israel@frontierflying.com> writes:
> Well, I'm not trying to use the server or client programs from this
> build - I just want the universal libraries for my programs. My point
> in this last section, however, doesn't necessarily extend as far as
> actual function, but rather is just with the build. MySQL and SQLite
> build for multiple architectures quite happily, Postgres doesn't build
> at all except for single architectures (the way I am trying at least).

Well, it's been done.  Searching the PG archives for prior discussions
I find
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php
which describes success with multiple -arch flags in CFLAGS plus
hand creation of relevant .h files.  The first few steps in the
older recipe here
http://archives.postgresql.org/pgsql-general/2008-02/msg00200.php
show a reasonably plausible way to mechanically generate the required
.h files, although I wonder whether it's right in detail --- over here
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00898.php
I had found out that you also need --host if you want to fool configure
into generating .h files for a different architecture.  On the whole
I'd still recommend building the reference .h files on the actual target
arch rather than trusting cross-compile to create them correctly.

            regards, tom lane

pgsql-general by date:

Previous
From: Bill Todd
Date:
Subject: Re: quote string exactly as it is
Next
From: Craig Ringer
Date:
Subject: Re: Catastrophic changes to PostgreSQL 8.4