[cfe-dev] Naive Mavericks Trunk Build Errors

support@goldencivet support at goldencivet.com
Thu Oct 31 01:00:24 PDT 2013


Hi there.

Building LLVM/Clang trunk on a default Mavericks install – i.e. one with all SDKs packaged within Xcode and no /usr/include – naively seems busted.

After getting the code and configuring for libc++…

$ ../llvm/configure --enable-libcpp --enable-keep-symbols

…the make runs fine until it hits compiler-rt, where the puking on missing <sys> headers begins…

COMPILE: clang_darwin/asan_osx_dynamic/i386: LLVM_PROJECT/llvm/projects/compiler-rt/lib/asan/asan_allocator2.cc
LLVM_PROJECT/build/Debug+Asserts/bin/clang -fno-exceptions -fPIC -funwind-tables -ILLVM_PROJECT/llvm/projects/compiler-rt/lib -ILLVM_PROJECT/llvm/projects/compiler-rt/include -arch i386 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -Werror -O3 -fomit-frame-pointer -mmacosx-version-min=10.6 -fno-builtin -gline-tables-only -DMAC_INTERPOSE_FUNCTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 -c -o LLVM_PROJECT/build/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx_dynamic/i386/SubDir.lib__asan/asan_allocator2.o LLVM_PROJECT/llvm/projects/compiler-rt/lib/asan/asan_allocator2.cc
In file included from LLVM_PROJECT/llvm/projects/compiler-rt/lib/asan/asan_allocator2.cc:17:
In file included from LLVM_PROJECT/llvm/projects/compiler-rt/lib/asan/asan_allocator.h:19:
In file included from LLVM_PROJECT/llvm/projects/compiler-rt/lib/asan/asan_interceptors.h:18:
LLVM_PROJECT/llvm/projects/compiler-rt/lib/interception/interception.h:90:10: fatal error:
'sys/cdefs.h' file not found
#include <sys/cdefs.h>  // For __DARWIN_ALIAS_C().
1 error generated.
make[5]: *** [LLVM_PROJECT/build/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx_dynamic/i386/SubDir.lib__asan/asan_allocator2.o] Error 1
make[4]: *** [BuildRuntimeLibraries] Error 2
make[3]: *** [compiler-rt/.makeall] Error 2
make[2]: *** [all] Error 1
make[1]: *** [clang/.makeall] Error 2
make: *** [all] Error 1

…which, again naively, seems a pretty mess.

Adding “/usr/include” – /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include – unsurprisingly leads to a whole other rabbit hole of conflicts and compile errors, presumably because that’s kinda what we’re trying not to do.

Has anybody actually tried this recently? If so, what’s the n00b in the above breaking the build?

Thanks!






More information about the cfe-dev mailing list