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

From Israel Brewster
Subject Re: Build universal binary on Mac OS X 10.6?
Date
Msg-id FB4D391D-1939-45F0-A151-B3C9BE3D909B@frontierflying.com
Whole thread Raw
In response to Re: Build universal binary on Mac OS X 10.6?  (Dave Page <dpage@pgadmin.org>)
Responses Re: Build universal binary on Mac OS X 10.6?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Dec 2, 2009, at 1:03 AM, Dave Page wrote:

> 2009/12/2 Grzegorz Jaśkiewicz <gryzman@gmail.com>:
>>
>>
>> On Tue, Dec 1, 2009 at 11:43 PM, Israel Brewster <israel@frontierflying.com
>> >
>> wrote:
>>>
>>> I am trying to create a static, universal (x86 and ppc at least -
>>> 64 bit
>>> architectures are optional) build of the PostgreSQL libraries on a
>>> Mac OS X
>>> 10.6 machine. The command line I am using is as follows:
>>
>> 10.6 is intel only, so why do you even bother with PPC ?
>
> 10.6 supports building of PPC binaries (in theory at least) for use on
> older OSs,

Exactly. If I was building for my own personal use, I wouldn't bother
with PPC, or even i386 - i'd just go with x86_64. However, as I am
developing software for wide distribution, I want it to be able to run
on as many machines/OS's as possible.

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 -
lipo reports all three architectures (I didn't bother with ppc64), and
in the initial compile phase at least Qt is happy (still dealing with
other unrelated compile issues there). Apparently PostgreSQL will
happily build for any one of the platforms under Mac OS X 10.6, but
trying to build for multiple platforms at once gives it heartburn.
Given that, I tend to think there was something wrong with the way I
was trying to do it - something missing/wrong from the CFLAGS or
LDFLAGS or the like.

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. It makes me wonder what PostgreSQL is
doing differently that causes problems? Thanks for the feedback and
advice!

>
> --
> Dave Page
> EnterpriseDB UK: http://www.enterprisedb.com
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

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




Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Roles with passwords; SET ROLE ... WITH PASSWORD ?
Next
From: akp geek
Date:
Subject: Auto Vaccum