On 22 Jun, 2007, at 18:31, Phil Hystad wrote:

Is there a 64 bit version of Python for a dual-G5 running Mac OS X (Tiger)?

I posted about this a while back, with a (rather hackish) procedure to get it to compile:

<quote>
The build is universal, but for me only one of the two archictures
actually worked: I did my build on an Intel system and the 64-bit
build worked on that machine, but didn't work on a G5 mac. That's
probably something shallow, but as that machine doesn't have the
Xcode installed and is on the other side of a slow network connection
I haven't tried to debug this yet.

1) Edit the configure script, look for "-arch i386" and "-arch ppc"
and change that those to  "-arch ppc64" and "-arch x86_64". You'll
have to make multiple changes to the configure file.

2) Build using:

       $ mkdir build
       $ cd build
       $ CFLAGS="-arch ppc64 -arch x86_64" ../configure \
           --enable-universalsdk \
           --disable-toolbox-glue --prefix=/opt/python25-64bit
       $ make
       $ make install

3) Optionally: run "make testall" to run the unittests and check
pyconfig.h to check the various SIZEOF definitions.

You now have a 64-bit build of python in /opt/python25-64bit.

</quote>

The resulting binary is 2-way universal, but will actually only work correctly on the architecture where you did the build (that is, if you run the build on a PPC64 system the binary won't work correctly on x86-64 and v.v.). I'm pretty sure this is a shallow problem, caused by differences in vararg handling that are detected by the configure script.

Note that these instructions will give you an incomplete installation, a number of extensions in the standard library won't be build because they use a C library that is not available in 64-bit mode. If you want to use those libraries (openssl, zlib, bz2 and possibly others as well) you have to build the required C libraries in 64-bit mode as well.

And a final note: you can probably get the same effect by supplying the right OPT, CFLAGS and LDFLAGS arguments to configure instead of editing the configure script. I used the procedure mentioned earlier because I hoped to get a universal build as the development and test systems I was using at the time had different architectures (a macbook pro vs. a G5 xserve).

Ronald

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to