Clang crashing on OS X 10.5.8

I’ve been attempting to check out and build clang on my iMac for several days now, and when I run clang I get a crash with the following error message:

cd /Users/talin/Projects/tart/build-eclipse/tools/gendeps && /Users/talin/Projects/llvm-inst/bin/clang -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -mmacosx-version-min=10.5 -g -I/Users/talin/Projects/tart/build-eclipse -I/Users/talin/Projects/tart/trunk/compiler/include -I/Users/talin/Projects/tart/trunk/linker/include -I/Users/talin/Projects/llvm-inst/include -Wall -Wextra -Werror -Wcast-align -Wpointer-arith -Wno-deprecated -Wno-unused-parameter -fno-rtti -fno-exceptions -fPIC -o CMakeFiles/gendeps.dir/gendeps.cpp.o -c /Users/talin/Projects/tart/trunk/tools/gendeps/gendeps.cpp

UNREACHABLE executed!

Stack dump:

  1. Program arguments: /Users/talin/Projects/llvm-inst/bin/clang-3.0 -cc1 -triple i386-apple-macosx10.5.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name gendeps.cpp -pic-level 2 -mdisable-fp-elim -masm-verbose -target-cpu yonah -g -coverage-file CMakeFiles/gendeps.dir/gendeps.cpp.o -resource-dir /Users/talin/Projects/llvm-inst/bin/…/lib/clang/3.0 -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -D _GNU_SOURCE -I /Users/talin/Projects/tart/build-eclipse -I /Users/talin/Projects/tart/trunk/compiler/include -I /Users/talin/Projects/tart/trunk/linker/include -I /Users/talin/Projects/llvm-inst/include -Wall -Wextra -Werror -Wcast-align -Wpointer-arith -Wno-deprecated -Wno-unused-parameter -ferror-limit 19 -fmessage-length 220 -fblocks -fno-rtti -fdiagnostics-show-option -fcolor-diagnostics -o CMakeFiles/gendeps.dir/gendeps.cpp.o -x c++ /Users/talin/Projects/tart/trunk/tools/gendeps/gendeps.cpp

  2. /Users/talin/Projects/llvm-inst/include/llvm/User.h:51:21: current parser token ‘,’

  3. /Users/talin/Projects/llvm-inst/include/llvm/User.h:24:1: parsing namespace ‘llvm’

  4. /Users/talin/Projects/llvm-inst/include/llvm/User.h:32:1: parsing struct/union/class body ‘User’

clang-3: error: unable to execute command: Illegal instruction

clang-3: error: clang frontend command failed due to signal 1 (use -v to see invocation)

make[3]: *** [tools/gendeps/CMakeFiles/gendeps.dir/gendeps.cpp.o] Error 255

make[2]: *** [tools/gendeps/CMakeFiles/gendeps.dir/all] Error 2

make[1]: *** [CMakeFiles/check.dir/rule] Error 2

Any idea why this is happening? I’m having no problems on my linux box, only on OS X.

And in a stunning demonstration of the law of maximum embarassment, I figure out the problem only moments after hitting the ‘send’ button. Basically the version of clang that I was running wasn’t the version I thought I was running. :frowning: