Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue25136

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Python doesn't find Xcode 7 SDK stub libraries
Type:compile errorStage:resolved
Components:Build, Distutils, macOSVersions:Python 3.6, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: ned.deilyNosy List: afoglia, brett.cannon, dstufft, eric.araujo, ned.deily, python-dev, ronaldoussoren, tdsmith
Priority:normalKeywords:patch

Created on2015-09-16 01:03 bytdsmith, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
xcode-stubs.difftdsmith,2015-09-16 01:03Diff against 3.5.0 releasereview
xcode-stubs-2.7.patchtdsmith,2015-09-16 04:06Patch against 2.7 release branch
Messages (6)
msg250813 -(view)Author: Tim Smith (tdsmith)*Date: 2015-09-16 01:02
In Xcode 7, Apple is replacing many of the .dylibs in SDKROOT with textual stubs. [1] These files exist on disk with filenames like:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libz.tbdThey 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 setup.py 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, setup.py 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 setup.py 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.[1]:https://forums.developer.apple.com/thread/4572[2]:https://gist.github.com/474233e561e28e1a8866[3]:https://github.com/Homebrew/homebrew/issues/41085
msg250894 -(view)Author: Ned Deily (ned.deily)*(Python committer)Date: 2015-09-17 15:57
Thanks for the analysis and the patches, Tim. Now that Xcode 7 is released, we'll need to ensure we fully support the new stubs.  But, as you note, the workaround as always is to make sure that the current Command Line Tools are installed, the configuration that we test with.
msg260694 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2016-02-22 17:57
We should update thedevguide to specify that the command-line tools need to be installed and either explain or point to documentation on how to install the tools.
msg260803 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-02-24 14:00
New changeset59d797915dca by Ned Deily in branch '2.7':Issue#25136: Support Apple Xcode 7's new textual SDK stub libraries.https://hg.python.org/cpython/rev/59d797915dcaNew changesetb0490b8af7aa by Ned Deily in branch '3.5':Issue#25136: Support Apple Xcode 7's new textual SDK stub libraries.https://hg.python.org/cpython/rev/b0490b8af7aaNew changesetdb6c1308eb31 by Ned Deily in branch 'default':Issue#25136: merge from 3.5https://hg.python.org/cpython/rev/db6c1308eb31
msg260804 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-02-24 14:36
New changeset157eb9d40bf9 by Ned Deily in branch '2.7':Issue#25136: Add reference to 'xcode-select --install' to Mac README.https://hg.python.org/cpython/rev/157eb9d40bf9New changeset61752c7ea9c7 by Ned Deily in branch '3.5':Issue#25136: Add reference to 'xcode-select --install' to Mac README.https://hg.python.org/cpython/rev/61752c7ea9c7New changeset2c4448bbed1f by Ned Deily in branch 'default':Issue#25136: merge from 3.5https://hg.python.org/cpython/rev/2c4448bbed1f
msg260805 -(view)Author: Ned Deily (ned.deily)*(Python committer)Date: 2016-02-24 14:44
I've committed Tim's patches with some additional comments for release in 2.7.12, 3.5,2, and 3.6.0 and have added a note about using 'xcode-select --install' to theMac/README files.  (The Developer's Guide already documents this.)  Thanks again, Tim.
History
DateUserActionArgs
2022-04-11 14:58:21adminsetgithub: 69323
2016-02-24 14:44:52ned.deilysetstatus: open -> closed
versions: - Python 3.4
title: Python doesn't find Xcode 7 stub libraries -> Python doesn't find Xcode 7 SDK stub libraries
messages: +msg260805

resolution: fixed
stage: patch review -> resolved
2016-02-24 14:36:03python-devsetmessages: +msg260804
2016-02-24 14:00:18python-devsetnosy: +python-dev
messages: +msg260803
2016-02-23 19:22:19afogliasetnosy: +afoglia
2016-02-22 17:57:24brett.cannonsetnosy: +brett.cannon
messages: +msg260694
2016-02-15 08:37:47ned.deilylinkissue26265 superseder
2015-09-17 15:57:57ned.deilysetassignee:ned.deily
stage: patch review
messages: +msg250894
versions: + Python 2.7, Python 3.4, Python 3.5, Python 3.6
2015-09-16 04:06:21tdsmithsetfiles: +xcode-stubs-2.7.patch
2015-09-16 01:03:03tdsmithcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp