Re: Build universal binary on Mac OS X 10.6?

From: Israel Brewster <israel(at)frontierflying(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Build universal binary on Mac OS X 10.6?
Date: 2009-12-02 17:57:33
Message-ID: D1BA6D18-485D-473C-A94C-4D981E792796@frontierflying.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Dec 2, 2009, at 8:26 AM, Tom Lane wrote:

> Israel Brewster <israel(at)frontierflying(dot)com> writes:
>> That said, I did sort of get this to work. What I ended up doing was
>> building for each architecture separately (but on the same machine),
>> then using lipo to combine the resulting libraries. When I took all
>> but one architecture flag out of the configure string I used, it
>> worked- regardless of which architecture I left in. I haven't had a
>> chance to test this fully yet, but so far it seems to have worked -
>
> The server executables will probably not work, except on the arch you
> built on. The client programs might accidentally fail to fail;
> I'm not sure whether they contain any dependencies on the arch-
> specific
> values that are extracted by configure. You really need to create
> pg_config.h contents that are correct for the specific arch you're
> trying to compile for. The last time I tried this, the only good way
> to do that was by running configure on the particular architecture.
> (Maybe 10.6 has got some cute way around that, but I doubt it.)
>
>> I'm somewhat curious though. I didn't have any difficulties making
>> universal builds of MySQL and SQLite by simply passing multiple -arch
>> flags to CFLAGS and LDFLAGS.
>
> Can't speak to SQLite, but I know quite well that mysql has got
> essentially the same issues as PG with having arch-specific configure
> output. Have you actually tested those universal builds on any arch
> except where you built them?

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).
Granted, it's entirely possible that the server/client built by MySQL
doesn't work on other platforms, but the build does - thus my curiosity.

FWIW, I have tested a program of mine linked against the multi-
architecture builds of the MySQL and SQLite libraries on other
platforms, and they do work. But then, I didn't need to do any fancy
work with multiple builds and lipo with them. Actually, back when I
was on Mac OS 10.5 I managed to get a universal build of Postgres 8.2
that worked - there's an old thread of mine from when I was having
problems with that as well. But I'm trying to get updated here, and
seem to be running into all new problems :-)

>
> regards, tom lane

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

Attachment Content-Type Size
Israel Brewster.vcf text/directory 417 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-12-02 19:17:41 Re: import data from openoffice Calc
Previous Message Devrim GÜNDÜZ 2009-12-02 17:44:13 Re: Auto Vaccum