Monday, February 1, 2010

Framework build of Python 2.6 on OS X

This is a short post. It turns out the reason for my trouble (discussed here), was a typo in the flags to configure:

./configure --enable-universalsdk --with-univeral-archs=64-bit

Some nice folks responded to my question on Stack Overflow and spotted the typo (I'm sure you can too, now). It could easily have been me who did this, but it turns out I copied and pasted from the readme file (in the Mac directory), and the typo is right there in the first example. So...configure just blows right by my flag and it looks OK until make chokes on shows that it's ignoring me by doing:

$ make
gcc -c -arch ppc -arch i386 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
In file included from //usr/include/architecture/i386/math.h:626,
from //usr/include/math.h:28,
from Include/pyport.h:235,
from Include/Python.h:58,
from ./Modules/python.c:3:
//usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.

So that's solved. A user named Ned Delly had some helpful comments (and others here). I know this name but Google hasn't been my friend---couldn't find out anything. Update: if I could spell: Ned Deily: DEILY

As he says:

The pythons are currently built only as 32-bit (i386 and ppc) and are compatible with OS X 10.3 through 10.6. To do that, they are built with the 10.4u SDK which is available via the 10.6 Xcode installer (on the 10.6 Installation DVD and elsewhere), however that SDK is not installed by default.

No comments: