Trouble building clang from scratch

Hello,

Since the version of clang that i downloaded won't run, i thought i should build clang from scratch. I need to anyway.

The error message is this:

Luna-6:code davidkristola$ clang -v test01.cpp
dyld: Symbol not found: ___ashldi3
Referenced from: /Users/davidkristola/Documents/CS527/checker-257/bin/clang
Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap

Following the instructions from: http://clang.llvm.org/get_started.html#build
I downloaded llvm and clang (revision 141528) then ran configure (and then re-ran it after changing the name of the broken clang executable so that it would fall back to gcc).

checking build system type... i386-apple-darwin9.8.0

make started out fine, then reported a few warning like:

llvm[1]: Compiling Path.cpp for Debug+Asserts build
/usr/local/llvm/llvm/include/llvm/Support/Endian.h:36: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

and:

llvm[1]: Compiling IRBuilder.cpp for Debug+Asserts build
/usr/local/llvm/llvm/lib/VMCore/IRBuilder.cpp: In member function ‘llvm::CallInst* llvm::IRBuilderBase::CreateLifetimeStart(llvm::Value*, llvm::ConstantInt*)’:
/usr/local/llvm/llvm/lib/VMCore/IRBuilder.cpp:126: warning: passing negative value ‘-0x00000000000000001’ for argument 1 to ‘llvm::ConstantInt* llvm::IRBuilderBase::getInt64(uint64_t)’
/usr/local/llvm/llvm/lib/VMCore/IRBuilder.cpp: In member function ‘llvm::CallInst* llvm::IRBuilderBase::CreateLifetimeEnd(llvm::Value*, llvm::ConstantInt*)’:
/usr/local/llvm/llvm/lib/VMCore/IRBuilder.cpp:141: warning: passing negative value ‘-0x00000000000000001’ for argument 1 to ‘llvm::ConstantInt* llvm::IRBuilderBase::getInt64(uint64_t)’

and then dies a horrible death with:

llvm[4]: Compiling Diagnostic.cpp for Debug+Asserts build
/usr/local/llvm/llvm/tools/clang/lib/Basic/../../include/clang/Basic/Diagnostic.h:590: error: ‘clang::DiagnosticsEngine::<anonymous enum> clang::DiagnosticsEngine::MaxArguments’ is private
/usr/local/llvm/llvm/tools/clang/lib/Basic/../../include/clang/Basic/PartialDiagnostic.h:36: error: within this context
/usr/local/llvm/llvm/tools/clang/lib/Basic/../../include/clang/Basic/Diagnostic.h:621: error: ‘clang::DiagnosticsEngine::<anonymous enum> clang::DiagnosticsEngine::MaxFixItHints’ is private
/usr/local/llvm/llvm/tools/clang/lib/Basic/../../include/clang/Basic/PartialDiagnostic.h:68: error: within this context
make[4]: *** [/usr/local/llvm/build/tools/clang/lib/Basic/Debug+Asserts/Diagnostic.o] Error 1
make[3]: *** [Basic/.makeall] Error 2
make[2]: *** [all] Error 1
make[1]: *** [clang/.makeall] Error 2
make: *** [all] Error 1

My gcc is set up to compile Ada. Once i got that working i stopped messing with it. Could that be part of my problem?

Luna-6:code davidkristola$ gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Luna-6:build davidkristola$ gnatmake --version
GNATMAKE 4.4.0 20080314 (experimental) [trunk revision 133226]
Copyright (C) 1995-2007, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thank you for your help,
David Kristola