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 ned.deily
Recipients ned.deily, ronaldoussoren
Date 2009-09-21.11:05:56
SpamBayes Score 1.60982e-15
Marked as misclassified No
Message-id <>
Potential 2.6.3 release blocker

On OS X 10.6 (Snow Leopard), if you attempt to install a package with a 
extension module using a Python from a OS X installer (say, 
2.6.x or 3.1.x), the c compilation steps will likely fail in one of two 

1. Recent installers are built using the OS X 10.4 SDK so 
that one installer image will work on 10.4, 10.5 and now 10.6 (in 
theory, 10.3.x as well).  Building of extension modules also require gcc 
and the SDKs, which are included as part of Apple's Xcode tools.  
However, with 10.6 Xcode, the 10.4 SDK is not installed by default so 
the extension module build will fail due to missing include files. Once 
the problem is known, it can be solved easily by installing the SDK from 
the release DVD that comes with the system or upgrade.

2. Even with the 10.4 SDK installed on 10.6, the compilation fails with:

/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: 
stdarg.h: No such file or directory

This can be especially baffling to those unfamiliar with nested include 
files because the base file stdarg.h does exist in that directory.

The root cause here is that Snow Leopard now uses gcc-4.2 by default but 
the 10.4 SDK does not include headers for 4.2. The solution is to force 
use of gcc-4.0, the default on 10.4 and 10.5 and included in 10.6, by 
defining the CC environment variable:
  $ export CC=/usr/bin/gcc-4.0
  $ python install 
  $ easy_install xxx

Even for experienced developers, these can be non-trivial problems to 
resolve although the solutions, once known, are easy to implement.  
Unfortunately, all types of python users can run into these issues 
simply by trying to install and use a package that includes an extension 
module.  There are a growing number of hits on the web from people 
trying to install popular packages such as MySQLdb, PIL, and lxml using 
a Python on 10.6.  Note this isn't a problem for users of the 
Apple-supplied Pythons (2.6 and 2.5) on 10.6 since they do not use the 
10.4 SDK.

There are two separate issues here I think:
1. What, if anything, to do for users of installers already out in the 
2. What to do to mitigate the problems for yet-to-be released installers 
(e.g. 2.6.3)?

Documenting and publicizing the problems somehow may be the only viable 
option for 1.  For 2, there is the possibility of some additional 
actions, perhaps a warning in the installer readme or some such.  It 
probably would make sense to contact the maintainers of such packages so 
that they can add something to their web pages and documentation.
Date User Action Args
2009-09-21 11:06:01ned.deilysetrecipients: + ned.deily, ronaldoussoren
2009-09-21 11:06:00ned.deilysetmessageid: <>
2009-09-21 11:05:58ned.deilylinkissue6957 messages
2009-09-21 11:05:56ned.deilycreate