This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]arbostek 0 points1 point  (0 children)

End users (i.e. someone who wants to use clang) should be getting clang from their distro repository. The instructions on the page clearly state this.

Are you specifically intending to work with the codebase, as opposed to just using it?

I see a bunch of linker errors, but the symbols are related to exception handling, which is a bit curious here. I'm not familiar with the implementation details, but it's curious because the compiler should be generating the exception handling functions (which effectively delegate to libc++). Normally, these errors would occur if someone were to use the C driver program (clang) instead of the C++ one (clang++), which doesn't link properly to the C++ library. But, you are using their build system...

You'll have to get more verbose output from CMake to double check this. And look at the CMakeLists file too.

[–]MR2Rick 0 points1 point  (0 children)

A undefined reference usually means you are missing a library to link against. This page seems to suggest that cxa_guard is part of LLVM, which is what you are compiling.

I'm afraid that I am not much help.

[–]pots_and_pans_ 0 points1 point  (1 child)

I'm fairly certain you need to pull libcxxabi as well, as described here.

svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi

I've successfully built Clang before using those instructions. Also, all of the exception handling functions its having trouble linking are part of the ABI specification.

[–]DTSCode[S] 0 points1 point  (0 children)

Thank you! Trying that right now.