[Pythonmac-SIG] building universal binaries
Ronald Oussoren
ronaldoussoren at mac.com
Fri Jan 27 09:08:59 CET 2006
On 27-jan-2006, at 4:22, bear wrote:
> Ronald Oussoren wrote:
>> That part is easy enough. If you want a framework build you'll
>> have to patch Makefile.pre.in because it contains a hardcoded '-
>> arch ppc' in the section that builds that actual framework.
>> Otherwise it should just build (assuming you have an intel mac of
>> course, cross-building from PPC to Intel will be hard because the
>> build process assumes you'll do a native build).
> ok, I found the relevant part in configure (and cofigure.in) that
> was putting -arch_only ppc into the Makefile and I've re-run
> configure and it seems happy - heck, even the compiling ran error
> free.
>
> But when it got to the link part - I get the following error:
You must replace the -arch ppc part by -arch i386. If you want to
build a universal binary you'll have to replace the call to libtool
by something more complex. I'll see if I can produce a patch later
today.
Ronald
>
> ...<snip>...
> ranlib libpython2.4.a
> /usr/bin/install -c -d -m 755 Python.framework/Versions/2.4
> libtool -o Python.framework/Versions/2.4/Python -dynamic
> libpython2.4.a \
> -lSystem -lSystemStubs -install_name
> /Users/bear/projects/osaf/chandler/trunk/external/release/Library/
> Frameworks/Python.framework/Versions/2.4/Python
> -compatibility_version 2.4 -current_version 2.4
> ld64 failed: in libpython2.4.a(__.SYMDEF), not a valid ppc64 mach-o
> file
> libtool: internal link edit command failed
> make: *** [Python.framework/Versions/2.4/Python] Error 1
>
> I must be missing something very basic. The following is a small
> script I've been using to test with:
>
> export SDK=/Developer/SDKs/MacOSX10.4u.sdk
> export TARGET_ARCH="" #" -arch i386 -arch ppc"
> export LDFLAGS="-L${PREFIX}/lib -isysroot ${SDK} ${TARGET_ARCH}"
> export PREFIX=/Users/bear/projects/release
>
> cd /Users/bear/projects/Python-2.4.2/build_release
>
> MACOSX_DEPLOYMENT_TARGET=10.4 \
> LDFLAGS=${LDFLAGS} \
> CPPFLAGS="-I${PREFIX}/include ${CPPFLAGS}" \
> ../configure --prefix=${PREFIX} \
> --enable-framework=${PREFIX}/Library/Frameworks \
> --with-readline=${PREFIX}/lib \
> --disable-ipv6 \
> --disable-dependency-tracking
>
> MACOSX_DEPLOYMENT_TARGET=10.4 make frameworkinstallframework
>
>
> any clues or thoughts appreciated
>
> -- bear
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20060127/7c725e16/attachment.bin
More information about the Pythonmac-SIG
mailing list