[New-bugs-announce] [issue14602] OSX Build Target

Andrew Thompson report at bugs.python.org
Tue Apr 17 00:36:13 CEST 2012

New submission from Andrew Thompson <draft1967 at gmail.com>:

I could not get Python3 to build on my OSX 10.6.8 box as per the instructions on the website (or those in the README).  It "configures" , but does not "make" :
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.5" during configure
make: *** [Include/Python-ast.h] Error 1

I can fix this by issuing


It then configures and makes. But if I select a new terminal  (i.e. without the exported env variable, and "make clean ; configure ; make" it continues to make perfectly.    Not sure what is going on here.

**** To replicate this bug I had to get a fresh mercurial clone ****

Q: Is this the correct setting for the TARGET ?
Q: Does this happen for other OSX users (specifically !=10.6 users) ?

Q: Should this be documented to save grief for other newbie OSX devs ?

Full Stack Dump of error :

gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -I. -I./Include    -DPy_BUILD_CORE -o Python/_warnings.o Python/_warnings.c
./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site.py", line 553, in <module>
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site.py", line 535, in main
    known_paths = addusersitepackages(known_paths)
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site.py", line 268, in addusersitepackages
    user_site = getusersitepackages()
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site.py", line 243, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site.py", line 233, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/sysconfig.py", line 535, in get_config_var
    return get_config_vars().get(name)
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/sysconfig.py", line 434, in get_config_vars
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/sysconfig.py", line 313, in _init_posix
    raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.5" during configure
make: *** [Include/Python-ast.h] Error 1

components: Build, Devguide
messages: 158511
nosy: aft, ezio.melotti
priority: normal
severity: normal
status: open
title: OSX Build Target

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list