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.

classification
Title: Python 3.3.0a3 build fails on MacOS 10.7 with XCode 4.3.2
Type: compile error Stage: resolved
Components: Installation Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
View: 13241
Assigned To: Nosy List: Thomas.Robitaille, hynek
Priority: normal Keywords:

Created on 2012-05-28 10:57 by Thomas.Robitaille, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python3.3_log Thomas.Robitaille, 2012-05-28 10:57
Messages (4)
msg161765 - (view) Author: Thomas Robitaille (Thomas.Robitaille) Date: 2012-05-28 10:57
I can build Python 2.6 to 3.2 on MacOS 10.7 with XCode 4.3.2 using solely:

    ./configure
    make

But if I do this with Python 3.3 alpha 3 I get the following error:

    gcc   -framework CoreFoundation -o python.exe Modules/python.o libpython3.3m.a -ldl  -framework CoreFoundation     
    ./python.exe -SE -m sysconfig --generate-posix-vars
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    python.exe(92825) malloc: *** mmap(size=7310873954244194304) failed (error code=12)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    Could not import runpy module
    make: *** [Lib/_sysconfigdata.py] Segmentation fault: 11

The full log is attached.
msg161769 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-05-28 11:39
Hello Thomas,

I presume your gcc is Apple's llvm-gcc (gcc --version output starts with "i686-apple-darwin11-llvm-gcc-4.2"), which is unfortunately a known to miscompile Python 3.3.

If you want to compile the latest Python 3.3 on OS X, use clang ("CC=clang ./configure" or "./configure CC=clang") which is also part of Apple's dev tools and works fine.
msg161771 - (view) Author: Thomas Robitaille (Thomas.Robitaille) Date: 2012-05-28 11:56
Thanks for the quick reply - wouldn't it make sense to add a directive to the configure script so that if the compiler matches 'i686-apple-darwin11-llvm-gcc-4.2', clang is used instead?
msg161777 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-05-28 12:56
Have a look at issue13241 which is dedicated to this problem, especially at msg160081.
History
Date User Action Args
2022-04-11 14:57:30adminsetgithub: 59137
2012-05-28 12:56:31hyneksetmessages: + msg161777
2012-05-28 11:56:02Thomas.Robitaillesetmessages: + msg161771
2012-05-28 11:39:52hyneksetstatus: open -> closed

superseder: llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

nosy: + hynek
messages: + msg161769
resolution: duplicate
stage: resolved
2012-05-28 10:58:09Thomas.Robitaillesettype: compile error
2012-05-28 10:57:52Thomas.Robitaillecreate