Ned Deily <n...@acm.org> added the comment: Explicitly defining CC during the installer build does seem to fix the extension build problem, at least for well-behaved extensions. I successfully tested building simplejson (using both easy_install and direct setup.py installs) and MySQLdb, both on 10.6 using a fat installer built on 10.5 with DEPTARGET=10.3 and 10.4u SDK, test cases that previously failed.
I've attached a patch to build-installer.py to support setting CC to appropriate values for distutils based on the value of deployment target: gcc-4.0 for DEPTARGET in [10.3, 10.4, 10.5], gcc-4.2 for 10.6. The patch also includes changes to the build process itself to use the appropriate gcc, including the recipes for the 3rd-party libs. This is in support of building installers on 10.6 with gcc-4.0 and 10.4u SDKs (however, there are still problems with this - see below). It also includes fixes for two unrelated build problems noted during testing: (1) the doc html files are installed in the wrong location in the framework (this was fixed in 3.x but not yet backported); and (2) the recently changed test for 10.4 or later was off by one (causing building to fail on 10.4 systems). Those fixes should go into 2.6.3 regardless. There are some open issues with the patch: 1. Should CXX (the distutils environ value for the c++ compiler) also be set? There are multiple paths through configure involving CC and CXX. 2. I chose not to implement a --cc argument to build-installer.py figuring it would be safer to hard code the appropriate CC values into the script for the time being. 3. While the script as is does not cause regressions for installer builds on 10.5 or 10.4 (that is, assuming the remaining builds and tests in progress complete normally - I'll update the status when they finish), as it stands I am still not able to build "standard" fat installers using the 10.4u SDK on 10.6. There seem to be problems up front in configure: a number of build options are coming out differently when using 10.4u on 10.6 than on 10.5, presumably causing the cc compile errors. It's not a release-blocker problem, anyway, since the plan is to build the installer on 10.5 but we do need to get a better idea what's going wrong there. (Unfortunately, I don't expect to have time to investigate this further prior to the 2.6.3 release.) ---------- Added file: http://bugs.python.org/file14981/issue-6957-force-gcc-4.0.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6957> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com