Message215307
CPython fails to build with LLVM's link-time optimization (LTO) in Mac OS. Very similar commands work on Linux.
I'm currently configuring CPython as follows:
on Linux:
RANLIB="ar -s --plugin=/path/to/llvm/lib/LLVMgold.so" CC=/path/to/llvm/bin/clang CXX=/path/to/llvm/bin/clang++ CFLAGS="-g -flto" LDFLAGS="-flto" ./configure
on Mac OS:
CC=/path/to/llvm/bin/clang CXX=/path/to/llvm/bin/clang++ CFLAGS="-g -flto" LDFLAGS="-flto" ./configure
The RANLIB variable should not be needed on Mac, because its toolchain does not need a GOLD plugin.
On Linux, the above builds correctly and passes most of the test suite. On Mac, I receive the following error (similar for other extensions):
building '_scproxy' extension
/usr/bin/clang -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -flto -I../cpython/Include -I. -I/usr/local/include -I../cpython/Include -I../cpython-lto-build -c ../cpython/Modules/_scproxy.c -o build/temp.macosx-10.9-x86_64-3.5/path/to/cpython/Modules/_scproxy.o
/usr/bin/clang -bundle -undefined dynamic_lookup -flto build/temp.macosx-10.9-x86_64-3.5/path/to/cpython/Modules/_scproxy.o -L/usr/local/lib -o build/lib.macosx-10.9-x86_64-3.5/_scproxy.so -framework SystemConfiguration -framework CoreFoundation
*** WARNING: renaming "_scproxy" since importing it failed: dlopen(build/lib.macosx-10.9-x86_64-3.5/_scproxy.so, 2): Symbol not found: __Py_NoneStruct
Referenced from: build/lib.macosx-10.9-x86_64-3.5/_scproxy.so
Expected in: flat namespace
in build/lib.macosx-10.9-x86_64-3.5/_scproxy.so |
|
Date |
User |
Action |
Args |
2014-04-01 12:11:00 | Sjlver | set | recipients:
+ Sjlver |
2014-04-01 12:11:00 | Sjlver | set | messageid: <1396354260.96.0.514432416417.issue21122@psf.upfronthosting.co.za> |
2014-04-01 12:11:00 | Sjlver | link | issue21122 messages |
2014-04-01 12:11:00 | Sjlver | create | |
|