I recently upgraded OS X and now run into trouble building Sage. XCode displays the version number as Version 5.0.2 (5A3005).
When I try "make build" in my existing Sage (built before the upgrade), I get the following error:
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
(log available at
http://pastebin.com/WQ5ssXVi)
I checked my C compiler: gcc -v returns
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
and it successfully builds a hello_world.c. So I decided to try building from scratch, using a fresh sage-6.1 tarball. It errored with
sed: /usr/include/sys/cdefs.h: No such file or directory
(log available at
http://pastebin.com/G9Ajqs4n)
After running "sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /usr/include/" the build proceeded, with lots of warnings of the form
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stddef.h:84:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^
In file included from ../../src/gcc/graphite-scop-detection.c:25:
In file included from ../../src/gcc/tree-flow.h:27:
In file included from ../../src/gcc/basic-block.h:26:
In file included from ../../src/gcc/function.h:27:
../../src/gcc/vecprim.h:29:1: warning: using extended field designator is an extension [-Wextended-offsetof]
DEF_VEC_ALLOC_I(uchar,gc);
^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/gcc/vec.h:572:34: note: expanded from macro 'DEF_VEC_ALLOC_I'
DEF_VEC_ALLOC_FUNC_I(T,A) \
^
../../src/gcc/vec.h:1274:21: note: expanded from macro '\
DEF_VEC_NONALLOC_FUNCS_I'
(*vec_, alloc_, offsetof (VEC(T,A),base.vec), \
^ ~~~~
and some suspicious lines that looked like
/usr/bin/ranlib: file: libgcc_eh.a(unwind-sjlj.o) has no symbols
/usr/bin/ranlib: file: ../.././gcc/libgcc.a(_trampoline.o) has no symbols
Eventually it failed as before, with
checking for C compiler default output file name...
configure: error: in `/Users/roed/sage/sage6/local/var/tmp/sage/build/gcc-4.7.3.p1/gcc-build/x86_64-apple-darwin13.0.0/libgomp':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[5]: *** [configure-stage1-target-libgomp] Error 77
make[4]: *** [stage1-bubble] Error 2
make[3]: *** [all] Error 2
Something appears to be screwed up with my development environment, but I'm not sure what. Any ideas?
David