Re: Build fails on OSX using wx 2.7.0 - Mailing list pgadmin-hackers

From Florian G. Pflug
Subject Re: Build fails on OSX using wx 2.7.0
Date
Msg-id 44F78EFC.9020809@phlo.org
Whole thread Raw
In response to Re: Build fails on OSX using wx 2.7.0  (Dave Page <dpage@vale-housing.co.uk>)
Responses Re: Build fails on OSX using wx 2.7.0
List pgadmin-hackers
Dave Page wrote:
>
>
> On 31/8/06 16:17, "Chris Campbell" <chris@bignerdranch.com> wrote:
>
>> On Aug 31, 2006, at 11:00, Dave Page wrote:
>>
>>> Yeah. They can include ppc64 as well. GCC will create them just
>>> fine, or
>>> you can build them individually and combine the resulting executables
>>> and libs using the lipo tool.
>> That's how I build my Universal PostgreSQL binaries (and any other
>> configure-based project). I "./configure && make && make install" on
>> both a PowerPC Mac and an Intel Mac (because configure looks at the
>> host system to make decisions), then lipo the results together
>> (that's how Xcode does it, BTW). It's worked beautifully thus far,
>> but it does require two machines.
>
> Yeah, that's the downside - and until I find another generous sponsor for
> the project we're stuck!!

I just played around a bit on my laptop running 10.4, and was able to
compile a universal version of libpq, pg_dum and pg_config.
What I did was:

1) export CFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk/"
2) export LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk/"
3) ./configure
4) cd src/interfaces/libpq; make
5) cd src/backend;  make ../../src/include/parser/parse.h
6) src/bin/pg_config; make
7) src/bin/pg_dump; make

The only problem I can see is that ld isn't able to generate universal binaries - it
can read them, but always strips all but one arch when generating output...
The apple gcc, however supports multiple archs just fine, and even knows that it
has to call ld repeatedly, and then merge the resuting files...
So, to build a complete postgres distribution, I believe one would have to somehow tell
configure to use gcc instead ld (if it doesn't already do that).

But for building pgadmin3, the parts I built above are sufficient - in fact, those
are exactly the parts of postgres that my buildaemon-postgres-update script builds ;-)
(Don't ask me why step (5) is necessary... It was quite a long time ago that I wrote
this script... ;-) ).

greetings, Florian Pflug

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Build fails on OSX using wx 2.7.0
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Build fails on OSX using wx 2.7.0