Problems when trying to build LLVM and Clang


I tried to build LLVM and Clang but am getting this error :

cp: cp: cp: cannot stat /home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/asan-i386/libcompiler_rt.a'cannot stat/home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/ubsan-x86_64/libcompiler_rt.a'cannot stat `/home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/ubsan-i386/libcompiler_rt.a': No such file or directory : No such file or directory: No such file or directory

I went through Cannot build LLVM and Clang but it doesn't seem to have any reasons why he had gotten a similar error (hence I am asking it again). I have tried to remove the -Werror flags in compiler-rt/make/ relevant files, since before that, it was stopping on this error :

/home/saurabh/Build/clang-build/llvm/projects/compiler-rt/lib/tsan/rtl/ error: comparison of constant 4294967295 with expression of type 'int' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (z == MutexTypeLeaf) { ~ ^ ~~~~~~~~~~~~~ 1 error generated.

I had asked on #llvm and had been suggested that. Any ideas what could be causing this ? Fwiw, I am on Ubuntu 12.10 64-bit.

You have to follow Be aware of the software dependencies you have to install. Also, check again if your --prefix=directory is set. If you cannot install Clang over LLVM (after you succeded to install LLVM), you can try install it using apt-get install clang and clang++. Therefore, you can compile your LLVM passes using this clang. For other corresponding packages, like VMkit for Java, you have to install ant and oracle jdk.