classification
Title: $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure
Type: Stage: resolved
Components: Build Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure
View: 9516
Assigned To: ned.deily Nosy List: ned.deily, ronaldoussoren, sdaoden
Priority: normal Keywords:

Created on 2011-04-09 14:55 by sdaoden, last changed 2011-04-11 10:22 by sdaoden. This issue is now closed.

Messages (5)
msg133395 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-04-09 14:55
Hello Mac OS X gurus, if i


else
	DEBUG='--with-pydebug'
	echo Using --with-pydebug
fi
./configure --prefix="$HOME/usr/opt/$PREFIX" $DEBUG
make -j2 all


i get this


/usr/bin/gcc -c -fno-strict-aliasing -g -O0 -Wall -Wstrict-prototypes -O2 -O2  -I. -IInclude -I./Include    -DPy_BUILD_CORE \
	      -DHGVERSION="\"`LC_ALL=C hg id -i .`\"" \
	      -DHGTAG="\"`LC_ALL=C hg id -t .`\"" \
	      -DHGBRANCH="\"`LC_ALL=C hg id -b .`\"" \
	      -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in addusersitepackages
    user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in get_config_var
    return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
    raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during configure
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in addusersitepackages
    user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in get_config_var
    return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
    raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during configure
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in addusersitepackages
    user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in get_config_var
    return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
    raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during configure
msg133396 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-04-09 14:56
P.S.: this does not happen if i use


./configure --prefix="$HOME/usr/opt/$PREFIX" $DEBUG MACOSX_DEPLOYMENT_TARGET=10.6
msg133397 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-04-09 15:03
The problem goes away if i comment out all
the Mercurial queries in Makefile:


HGVERSION=      #hg id -i $(srcdir)
HGTAG=          #hg id -t $(srcdir)
HGBRANCH=       #hg id -b $(srcdir)
msg133399 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-04-09 15:58
Thanks for the report.  This is another case of the problem described in Issue9516, in particular msg130666 except now it is hg invoking another Python during the build process.  The sysconfig part of the patch for Issue9516 applied to the "build" Python 2.7 used by hg will avoid the problem.  Or, as you found, as a workaround, ensure that the MACOSX_DEPLOYMENT_TARGET of the "build" Python matches that of the Python being built.  It's also only a problem if the "build" Python is 2.7 or 3.2.

By the way, since you've asked about it before, MACOSX_DEPLOYMENT_TARGET is a standard feature of the Apple gcc tool chain and is used to support builds for multiple versions.  See -mmacosx-version-min in the OS X man (1) gcc and http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
msg133509 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-04-11 10:22
On Sat, Apr 09, 2011 at 03:58:11PM +0000, Ned Deily wrote:
> By the way, since you've asked about it before, 
> MACOSX_DEPLOYMENT_TARGET is a standard feature of the Apple gcc 
> tool chain and is used to support builds for multiple versions.  
> See -mmacosx-version-min in the OS X man (1) gcc and 
> http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

P.S.:
Thank you for this information. 
You know, we here (and i personally too) don't fiddle around 
with this, because there is no time left over for such things.

We have discovered flags which work (especially hairy for ld(1) 
and dynamic libraries and concurrent installs), wrote a bunch of 
Perl configure scripts which use '$^O eq' and, for performance, 
&$COMPILE_PTF($TCC, $TEXE, 'sysdeps/generic/x86/cnf.cpuid.c'), 
and try to realize the rest with good coding style. 
No '.weak' and other maybe object file format dependend stuff 
around here.

And i just wanted to try Mac OS once, so i bought a MacBook. 
It looks beautiful and fancontrol is automatic and fantastic and 
i try hard to forget that i'm looking at OpenGL and myriads of 
floating-point calculations.

But i was out of this game once i've written an OGG player (there 
was none and no /dev/whatever accessible here), trying AudioUnit 
and CoreAudio, which confirm something in an event handler and 
have forgotten it after that returns.  And then there was a crash 
and i discovered that Mazzoni's Audacity includes comments on this 
crash in the Mac OS sources from a *long* time ago. 
And so i decided that i don't want to do Apple, and lucky me 
i don't need to make money with doing so nonetheless.

And now i think you have the complete picture on that. 
Thanks again.
:)
History
Date User Action Args
2011-04-11 10:22:32sdaodensetmessages: + msg133509
2011-04-09 15:58:11ned.deilysetstatus: open -> closed
superseder: sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure
messages: + msg133399

assignee: ned.deily
resolution: duplicate
stage: resolved
2011-04-09 15:03:24sdaodensetmessages: + msg133397
2011-04-09 14:56:29sdaodensetmessages: + msg133396
2011-04-09 14:55:31sdaodencreate