[MacPorts] #27916: python27 runtime IOError due to MACOSX_DEPLOYMENT_TARGET
#27916: python27 runtime IOError due to MACOSX_DEPLOYMENT_TARGET -------------------------------+-------------------------------------------- Reporter: joshmoz@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: python27 -------------------------------+-------------------------------------------- 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> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Changes (by jmr@…): * owner: macports-tickets@… => jwa@… Comment: Please remember to cc the maintainer. -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Comment(by jmr@…): I doubt this is specific to MacPorts; the code in sysconfig.py raises an error any time the current MDT is lower than the one python was configured with. One workaround would be to use the (unsupported) macosx_deployment_target setting in macports.conf to build python27 targeting 10.5. -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Comment(by deric@…): The `python_select` port in macports will allow you to easily switch between different versions of python installed by macports and the apple supplied one. This checking of MACOSX_DEPLOYMENT_TARGET is a bit dubious imo. since the site module always is imported automatically during initializtion and the getuserbase call then will import the build configuration and bail. Basically any environment with MACOSX_DEPLOYMENT_TARGET set to something below what python2.7 was built with will not run. Another quick workaround is setting MACOSX_DEPLOYMENT_TARGET in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile since that's where sysconfig is getting the value from. -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Comment(by deric@…): This bug is captured by http://bugs.python.org/issue9516 -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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
#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 -------------------------------+-------------------------------------------- Comment(by pixilla@…): Replying to [comment:6 deric@…]:
This bug is captured by http://bugs.python.org/issue9516 [http://bugs.python.org/issue9516 issue9516] has status: closed, resolution: fixed.
-- Ticket URL: <https://trac.macports.org/ticket/27916#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Comment(by ryandesign@…): So what do we need to do to be able to close this ticket? Do we need to apply some upstream patch to our ports? Or have fixed versions already been released? -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 -------------------------------+-------------------------------------------- Comment(by nad@…): The last set of upstream fixes for Issue9516 were committed after Python 2.7.2 was released; they will be in 2.7.3 (release date TBD). But the specific problem documented in this issue (that of sysconfig being influenced by the MACOSX_DEPLOYMENT_TARGET) was fixed in the first set of fixes which are in 2.7.2. (All of the fixes for Python 3 were released in 3.2.2.) -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#27916: python27 runtime IOError due to MACOSX_DEPLOYMENT_TARGET --------------------------------+------------------------------------------- Reporter: joshmoz@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: Port: python27 | --------------------------------+------------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: Looks fixed to me. -- Ticket URL: <https://trac.macports.org/ticket/27916#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts