classification
Title: Extension module builds can fail with Xcode 5 on OS X 10.8+
Type: Stage: resolved
Components: Distutils, Extension Modules, Macintosh Versions: Python 3.4, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ned.deily, python-dev, tarek
Priority: normal Keywords:

Created on 2013-10-25 22:55 by ned.deily, last changed 2013-10-25 23:09 by ned.deily. This issue is now closed.

Messages (3)
msg201299 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-10-25 22:55
On OS X 10.8 or 10.9 when using Xcode 5 and attempting to build an extension module using a universal Python that includes a PPC architecture (such as from one of the python.org 32-bit-only installers), the extension module build can fail with numerous compiler errors.  Recent python.org 32-bit-only installers attempt to remove unavailable PPC architectures when building extension modules.  Unfortunately, due to changes between Xcode 4 and Xcode 5, the test in Distutils does not work with Xcode 5 compilers.

The problem affects the current OS X 32-bit-only python.org installers for Python 3.3.2 and 2.7.5.  It is not a problem for OS X 64-bit/32-bit installers for 10.6+.

A workaround for the problem is to override the Distutils defaults by setting the ARCHFLAGS environment variable to the desired architectures, for example:

ARCHFLAGS="-arch i386" /usr/local/bin/python2.7 -m pip install ...
msg201300 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-25 23:05
New changeset 6cfb0f2815ce by Ned Deily in branch '2.7':
Issue #19400: Prevent extension module build failures with Xcode 5 on OS X
http://hg.python.org/cpython/rev/6cfb0f2815ce

New changeset e62a64507913 by Ned Deily in branch '3.3':
Issue #19400: Prevent extension module build failures with Xcode 5 on OS X
http://hg.python.org/cpython/rev/e62a64507913
msg201301 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-10-25 23:09
The problem is fixed in 6cfb0f2815ce for release in 2.7.6 and e62a64507913 for 3.3.3.  It was previously fixed in 3.4.0a4 by 73532f33fbb3.
History
Date User Action Args
2013-10-25 23:09:25ned.deilysetstatus: open -> closed
resolution: fixed
messages: + msg201301

stage: resolved
2013-10-25 23:05:40python-devsetnosy: + python-dev
messages: + msg201300
2013-10-25 22:55:59ned.deilycreate