Skip site navigation (1) Skip section navigation (2)

Re: Build fails on OSX using wx 2.7.0

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: Chris Campbell <chris(at)bignerdranch(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Build fails on OSX using wx 2.7.0
Date: 2006-09-01 01:38:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Dave Page wrote:
> On 31/8/06 16:17, "Chris Campbell" <chris(at)bignerdranch(dot)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

In response to


pgadmin-hackers by date

Next:From: Florian G. PflugDate: 2006-09-01 01:49:57
Subject: Re: Build fails on OSX using wx 2.7.0
Previous:From: Dave PageDate: 2006-08-31 20:28:58
Subject: Re: Build fails on OSX using wx 2.7.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group