Differences between revisions 2 and 76 (spanning 74 versions)
Revision 2 as of 2007-11-25 07:03:24
Size: 1777
Comment: add info about flags and distutils
Revision 76 as of 2022-03-31 02:06:56
Size: 0
Editor: mkoeppe
Comment: outdated
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= OSX 64-bit =

 * export CFLAGS="-arch x86_64"

 * building python {{{
For some pointers on how to get python to build in 64 bit mode see

http://mail.python.org/pipermail/pythonmac-sig/2007-June/019045.html

To quote (which is actually about 64 bit on *Tiger*):

<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.
}}}


 * Cython {{{ 20:58 < mabshoff> There is also a bug in the way Cython builds its extensions.
20:58 < mabshoff> It needs to use the flags python was build with, not some random stuff people thing
20:58 < mabshoff> think is good.
20:58 < mabshoff> I told Robert about it.

But:

[06:36] <mabshoff> But it doesn't match the python flags. I checked on it once.
[06:37] <was_> It's distutils.
[06:37] <was_> Cython doesn't have anything to do with the flags.
}}}