As many Python folks have discovered, upgrading to Snow Leopard can cause some pain for development. For the most part, this involves reinstalling a bunch of things (macports, python itself and whatever python packages you use). This has been a hassle for me, but up until today it was just time consuming, rather than actually difficult. Apparently if you upgrade xcode (like I did for the new iphone stuff), unless you explicitly choose the old SDK, xcode blows it away.
So today, while trying to compile multiprocessor on Python 2.5, I got this:
Compiling with an SDK that doesn’t seem to exist: /Developer/SDKs/MacOSX10.4u.sdk
Please check your Xcode installation
Which left me staring at the screen thinking “how the f**k do I fix THAT?” After poking through every file in multiprocessor and then googling quite a bit I finally found this message on the epd-users mailing list, which got me to the promised land.
From what I can gather there are two ways to fix this. One is to reinstall xcode and choose to include the older SDK. The other (and possibly scarier, depending on your taste for mucking around inside installed stuff) is to point distutils at the newer SDK. I did the latter: in a text editor, open up:
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile
Then find all the instances of MacOSX10.4u.sdk and change that to something you do have installed. To see them just do
$ ls -la /Developer/SDKs/
If there’s nothing there, well, then you need to install xcode or you’re SOL. There should be four places to make the change in the Makefile. Finally, the newer compiler doesn’t seem to like the “-Wno-long-double” flag, so I had to the delete that as well. And voila, multiprocessor compiled (and I hope any other Python package that I try to install that needed the gcc).