Thanks for the reply.... at last nights cocoahead meeting in NYC I asked and found a solution for libpq.a.

1. config and make on a ppc
2. config and make on intel

copy and rename the libpq.a from each system to a common directory and run 'lipo' on them:

lipo libpqppc.a libpqintel.a -output libpq.a

lipo will create the universal binary

man lipo:

LIPO (1) LIPO(1)

NAME
       lipo - create or operate on universal files

SYNOPSIS
lipo [-info] [-detailed_info] [-arch arch_type input_file] ... [ input_file] ... [-arch_blank arch_type] [-create] [-thin arch_type] [-replace arch_type filename] ... [-remove arch_type] ... [-extract arch_type] ... [-extract_family arch_type] ... [-output output_file]
       [-segalign arch_type value] ...

DESCRIPTION
The lipo command creates or operates on ``universal'' (multi- architec- ture) files. It only ever produces one output file, and never alters the input file. The operations that lipo performs are: listing the architecture types in a universal file; creating a single universal file from one or more input files; thinning out a single universal file to one specified architecture type; and extracting, replacing, and/or removing architectures types from the input file to create a single new
       universal output file.

On Dec 13, 2006, at 3:33 AM, Dave Page wrote:

Ted Petrosky wrote:
I am trying to create the libpq.a as a universal binary (both ppc and intel macs). Does anyone have any information on this process?

I use the following notes to build libpq and the bin/ tools to ship with pgAdmin. I know it is possible to build the entire server, as a Universal binary, but I could never make it work and haven't had time to spend on it. Comments welcome :-)

======
Building the entire server as a Universal binary doesn't seem to work at
present, so, we build the backend as an architecture specific build,
then create libpq and the tools as Universal binaries over the top.

# ./configure --with-openssl --prefix=/usr/local/
# make all; make install

# make distclean
# CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch
i386" LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk - arch ppc
-arch i386" ./configure --with-openssl --prefix=/usr/local
# make all

Note - this step will fail, but is required to complete the build of the tools.

# cd src/interface/libpq
# make all; make install
# cd ../../bin
# make all; make install
======

Regards, Dave


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to