This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Christian.Tismer, ned.deily, ronaldoussoren
Date 2014-04-29.07:58:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398758293.07.0.621433750551.issue21381@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, it should be possible to build all Pythons for all recent OS X deployment targets but, normally, the safest way is to build a specific deployment target on the same OS X version; that should avoid any possibility of inadvertently linking with new features not available on the older deployment target system.  It is possible to use SDKs and tools from older versions of Xcode on newer systems to simulate building on an older system but that isn't foolproof.  Also, keep in mind that the deployment target is a minimum deployment target.  Pythons built with a deployment target of 10.n also work on 10.n+1 and generally 10.n+m, at least as long as there is no major compatibility break, like dropping support for running PPC architecture executables in 10.7.

However, the problem you've found here is an exception to that general rule.  The culprit appears to be the execution stack size increase at link time introduced by Issue18075 in b07ad4b5e349 for 3.4.0.  With the stack size increased to 16MB, when Python is built on 10.7, it seems to work fine on 10.7 but, if the same executable is moved to 10.8 or 10.9, it segfaults early in initialization.  The same behavior is observed with either debug or non-debug builds.  When the same executable is run under gdb or lldb, the interpreter doesn't segfault.  Likewise, the same behavior is seen when building on 10.8 or 10.9 and setting MACOSX_DEPLOYMENT_TARGET=10.7.  (Also, building with Xcode 4.6.3 (the current 10.7 toolchain) on 10.9 makes no difference.)

With dept target of 10.7, If the stack size increase in configure is commented out,

#LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"

then builds with dept target of 10.7 succeed and all tests pass.  In fact, at first glance it seemed that all tests passed with a dept target of 10.9 using the current Xcode 5.1.1 build tools so it's not clear whether the original problem reported in Issue18075 still exists.

I'm puzzled by this one: thanks, Chris!  We could certainly make the stack size increase conditional but it's odd that it only seems to be a problem with 10.7.  Ronald (or anyone else): any ideas?
History
Date User Action Args
2014-04-29 07:58:13ned.deilysetrecipients: + ned.deily, ronaldoussoren, Christian.Tismer
2014-04-29 07:58:13ned.deilysetmessageid: <1398758293.07.0.621433750551.issue21381@psf.upfronthosting.co.za>
2014-04-29 07:58:12ned.deilylinkissue21381 messages
2014-04-29 07:58:10ned.deilycreate