#27916: python27 runtime IOError due to MACOSX_DEPLOYMENT_TARGET -------------------------------+-------------------------------------------- Reporter: joshmoz@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: python27 -------------------------------+-------------------------------------------- Description changed by ryandesign@…: Old description:
I am a Mozilla developer, we recommend that our Mac OS X developers use MacPorts to get build dependencies (like Mercurial, libidl, autoconf213). Mozilla's build system will use python2.7 from MacPorts over the system python if it exists, which it does in my case because it was a dep for something else I installed via MacPorts. I get the following error when trying to build Firefox with a deployment target of MACOSX_DEPLOYMENT_TARGET=10.5:
checking for Python version >= 2.5 but not 3.x... Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 553, in <module> main() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 535, in main known_paths = addusersitepackages(known_paths) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 268, in addusersitepackages user_site = getusersitepackages() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 243, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 233, in getuserbase USER_BASE = get_config_var('userbase') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 535, in get_config_var return get_config_vars().get(name) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 434, in get_config_vars _init_posix(_CONFIG_VARS) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 313, in _init_posix raise IOError(msg) IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.6" during configure configure: error: Python 2.5 or higher (but not Python 3.x) is required. *** Fix above errors and then restart with "make -f client.mk build" make[1]: *** [configure] Error 1 make[1]: Leaving directory `/Volumes/MozillaBuilds/10_6/ff_200_debug_32' make: *** [/Volumes/MozillaBuilds/10_6/ff_200_debug_32/objdir- debug/Makefile] Error 2 make: Leaving directory `/Volumes/MozillaBuilds/10_6/ff_200_debug_32'
I assume this is because MACOSX_DEPLOYMENT_TARGET is set to 10.5 for the Firefox build but it was set to 10.6 for the python2.7 build. For some reason the current state of MACOSX_DEPLOYMENT_TARGET matters for python2.7 when it shouldn't.
If I force the Firefox build to use python26 from MacPorts (PYTHON=/opt/local/bin/python2.6) this problem doesn't happen so I think this problem is specific to python27 from MacPorts.
New description: I am a Mozilla developer, we recommend that our Mac OS X developers use MacPorts to get build dependencies (like Mercurial, libidl, autoconf213). Mozilla's build system will use python2.7 from MacPorts over the system python if it exists, which it does in my case because it was a dep for something else I installed via MacPorts. I get the following error when trying to build Firefox with a deployment target of MACOSX_DEPLOYMENT_TARGET=10.5: {{{ checking for Python version >= 2.5 but not 3.x... Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 553, in <module> main() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 535, in main known_paths = addusersitepackages(known_paths) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 268, in addusersitepackages user_site = getusersitepackages() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 243, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 233, in getuserbase USER_BASE = get_config_var('userbase') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 535, in get_config_var return get_config_vars().get(name) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 434, in get_config_vars _init_posix(_CONFIG_VARS) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 313, in _init_posix raise IOError(msg) IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.6" during configure configure: error: Python 2.5 or higher (but not Python 3.x) is required. *** Fix above errors and then restart with "make -f client.mk build" make[1]: *** [configure] Error 1 make[1]: Leaving directory `/Volumes/MozillaBuilds/10_6/ff_200_debug_32' make: *** [/Volumes/MozillaBuilds/10_6/ff_200_debug_32/objdir- debug/Makefile] Error 2 make: Leaving directory `/Volumes/MozillaBuilds/10_6/ff_200_debug_32' }}} I assume this is because MACOSX_DEPLOYMENT_TARGET is set to 10.5 for the Firefox build but it was set to 10.6 for the python2.7 build. For some reason the current state of MACOSX_DEPLOYMENT_TARGET matters for python2.7 when it shouldn't. If I force the Firefox build to use python26 from MacPorts (PYTHON=/opt/local/bin/python2.6) this problem doesn't happen so I think this problem is specific to python27 from MacPorts. -- -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS