[Pythonmac-SIG] 32/64 bit intel universal build

Robin robince at gmail.com
Sun Oct 25 22:31:09 CET 2009


Hi,

I've been struggling with 32 vs 64 bit python on snow leopard. I built
an intel universal with:

./build-installer.py --sdk-path=/Developer/SDKs/MacOSX10.6.sdk/
--dep-target=10.6 --universal-archs=intel

It looks like it built correctly:

robin-mbp:bin robince$ file ./python2.6
./python2.6: Mach-O universal binary with 2 architectures
./python2.6 (for architecture i386):    Mach-O executable i386
./python2.6 (for architecture x86_64):  Mach-O 64-bit executable x86_64

But I am unable to select 32 vs 64 bit with arch:

robin-mbp:bin robince$ arch -x86_64 ./python2.6 -c "import sys; print
sys.maxint"
9223372036854775807
robin-mbp:bin robince$ arch -i386 ./python2.6 -c "import sys; print sys.maxint"
9223372036854775807

which does work with the system python:
robin-mbp:~ robince$ arch -i386 /usr/bin/python2.6 -c "import sys;
print sys.maxint"
2147483647
robin-mbp:~ robince$ arch -x86_64 /usr/bin/python2.6 -c "import sys;
print sys.maxint"
9223372036854775807

What am I missing?

Cheers

Robin


More information about the Pythonmac-SIG mailing list