This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tdsmith
Recipients dstufft, eric.araujo, ned.deily, ronaldoussoren, tdsmith
Date 2015-09-16.01:02:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In Xcode 7, Apple is replacing many of the .dylibs in SDKROOT with textual stubs. [1] These files exist on disk with filenames like:


They are short YAML documents that look like this: [2]

The same linker invocation that has always worked will continue to work with Xcode 7 (i.e. you still pass `-lz` to the linker), but this disrupts the checks that cpython's uses to determine if it can build extension modules. The dylibs physically exist on disk in /usr/lib, but since we've set -isysroot to the appropriate SDKROOT in CPPFLAGS, distutils searches for the dylibs in the sysroot path, and does not find them (since they have been replaced with .tbd stubs). Since distutils cannot find the libraries, declines to attempt to build any of the extension modules that depend on libraries in the OS X SDK, even though it would have succeeded if it had tried. Several Homebrew users have reported this while trialling Xcode 7 [3].

distutils should treat the .tbd files as a "real" library so that compiler.find_library_file succeeds and will proceed to attempt to build the extension modules.

The attached diff applies against the 3.5.0 release and allows extension modules to be built against Xcode 7 without installing the Command-Line Tools package.

If anyone is experiencing this issue, a workaround is to install the Xcode Command Line Tools package with `xcode-select --install` (which, among other things, installs headers to /usr/include), ensure the CLT is active with `xcode-select -s /Library/Developer/CommandLineTools`, and do not include `-isysroot` in CPPFLAGS when building python.

Date User Action Args
2015-09-16 01:03:03tdsmithsetrecipients: + tdsmith, ronaldoussoren, ned.deily, eric.araujo, dstufft
2015-09-16 01:03:03tdsmithsetmessageid: <>
2015-09-16 01:03:02tdsmithlinkissue25136 messages
2015-09-16 01:03:01tdsmithcreate