[issue14499] Extension module builds fail with Xcode 4.3 on OS X 10.7 due to SDK move
Ronald Oussoren
report at bugs.python.org
Wed May 30 17:07:15 CEST 2012
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
What I'd prefer to look for the compiler:
* in distutils: if $CC is an absolute path and exists, use that
* look for clang on $PATH, use it if found
(default configure looks for GCC in preference of other compilers,
but with Apple's toolchain it is better to use clang)
* look for gcc on $PATH, use it if found
(needed to use the Fink compiler when Fink is on $PATH, alternative
for 3.3 is to document that configure will try to pick and Apple
compiler)
* use $(xcodebuild -find clang)
To look for the SDK:
* in distutils: if -isysroot is set, is not '/' and exists, use that
* in distutils: extract SDK version from -isysroot string (if set),
then use $(xcode-select) to find the root of the installation and
construct a path relative to that. If the requested SDK version exists,
use that
* if osx release < 10.5 and building universal:
- use /Developer/SDKs/MacOSX10.4u.sdk
(needed for universal builds on early releases of OSX 10.4)
* if /usr/include/stdint.h exists: use -isysroot /
(older Xcode, or Xcode >=4.3 with Command Line Tools installed)
* use $(xcodebuild -showsdks) to find list of SDKs and use most recent
one.
I haven't tried to capture this in code yet, and haven't tested the procedure on earlier releases (or even a 10.7 system with Xcode 4.3 without unix tools), but this should work.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14499>
_______________________________________
More information about the Python-bugs-list
mailing list