GNOME Bugzilla – Bug 738745
numpy fails to build with Cerbero on Mac OS X 10.9, 10.10
Last modified: 2014-10-20 08:43:07 UTC
numpy's build system seems to be trying to build a 32-bit/64-bit fat binary, but somehow ends up building two 64-bit subbinaries and then fails to combine them into a fat binary...? clang -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -L/Users/brion/cerbero/dist/darwin_x86_64/lib -headerpad_max_install_names -Wl,-headerpad_max_install_names -arch x86_64 -m64 -Wl,-arch,x86_64 -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -headerpad_max_install_names -Wl,-headerpad_max_install_names -arch x86_64 -m64 -Wl,-arch,x86_64 -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/brion/cerbero/dist/darwin_x86_64/include -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/brion/cerbero/dist/darwin_x86_64/include -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk build/temp.macosx-10.10-intel-2.7/numpy/core/src/dummymodule.o -Lbuild/temp.macosx-10.10-intel-2.7 -o build/lib.macosx-10.10-intel-2.7/numpy/core/_dummy.so ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.eprintf.a, file was built for archive which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.eprintf.a fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /var/folders/dz/tvcb3dv94nd24pm9_4hk6ds40000gn/T/-030169.out and /var/folders/dz/tvcb3dv94nd24pm9_4hk6ds40000gn/T/-432a51.out have the same architectures (x86_64) and can't be in the same fat output file clang: error: lipo command failed with exit code 1 (use -v to see invocation) ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.eprintf.a, file was built for archive which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.eprintf.a fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /var/folders/dz/tvcb3dv94nd24pm9_4hk6ds40000gn/T/-030169.out and /var/folders/dz/tvcb3dv94nd24pm9_4hk6ds40000gn/T/-432a51.out have the same architectures (x86_64) and can't be in the same fat output file clang: error: lipo command failed with exit code 1 (use -v to see invocation) error: Command "clang -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -L/Users/brion/cerbero/dist/darwin_x86_64/lib -headerpad_max_install_names -Wl,-headerpad_max_install_names -arch x86_64 -m64 -Wl,-arch,x86_64 -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -headerpad_max_install_names -Wl,-headerpad_max_install_names -arch x86_64 -m64 -Wl,-arch,x86_64 -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/brion/cerbero/dist/darwin_x86_64/include -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/brion/cerbero/dist/darwin_x86_64/include -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk build/temp.macosx-10.10-intel-2.7/numpy/core/src/dummymodule.o -Lbuild/temp.macosx-10.10-intel-2.7 -o build/lib.macosx-10.10-intel-2.7/numpy/core/_dummy.so" failed with exit status 1 Running command 'python setup.py install --prefix=/Users/brion/cerbero/dist/darwin_x86_64 --install-lib=/Users/brion/cerbero/dist/darwin_x86_64/lib/python2.7/site-packages' Recipe 'numpy' failed at the build step 'install' Select an action to proceed: [0] Enter the shell [1] Rebuild the recipe from scratch [2] Rebuild starting from the failed step [3] Skip recipe [4] Abort
Created attachment 288795 [details] [review] Patch to force single-arch build, seems to work on 10.9 and 10.10
Created attachment 288806 [details] [review] fixed patch (had arches reversed somehow, sorry) Fixed patch with right arches.
commit 80d79bff984b74317c3aef9d2d7161b7ec6d66c4 Author: Brion Vibber <brion@pobox.com> Date: Fri Oct 17 22:34:49 2014 -0700 Workaround for numpy build failure on OS X 10.9, 10.10 Force a single-arch build for numpy; it was somehow trying to do a universal 32/64-bit build but tried to combine two 64-bit builds. Just set to a single arch. https://bugzilla.gnome.org/show_bug.cgi?id=738745