[Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips?

Irmen de Jong irmen at xs4all.nl
Sun May 1 23:26:13 CEST 2011


I recently ran into a problem installing a module because it needed to compile an
extension written in C. The compilation failed because the c extension needed a header
file+lib that gcc could not find. This was caused by the fact that distutils was adding
a '-isysroot' parameter to the gcc command line that pointed to the 10.4 SDK location on
my mac. That SDK location doesn't have the particular header file. The issue is almost
identical to this old message:

In the meantime, I worked around the problem by replacing the Python.org python by a
non-framework version that I built from source. Building the extension module was fine
because it could find the c-library dependency just fine from /usr/local/include this time.

This is on a mac mini powerpc, mac os 10.5.8, python.org python 2.7.1 for ppc+intel.

My questions are:
It's only recently that I discovered about the -isysroot option and I'm not sure how to
deal with it. What would be the right way to solve the error I experienced?
Can I compile+install custom c libraries in the SDK location? If so, how would I do
that? (I only seem to manage to compile+install them into /usr/local)

Irmen de Jong

More information about the Pythonmac-SIG mailing list