Hard to make clang+lldb work on centos7


I yum install clang, llvm-devel and lldb 3.4.2 on centos7. In order to add libc++ and libc++abi, I followed the guide in http://stackoverflow.com/questions/25840088/how-to-build-libcxx-and-libcxxabi-by-clang-on-centos-7. I only build libc++ without libc++abi and build libc++abi with libc++, and then workaround by copy /usr/include/c++/4.8.2/cxxabi.h to /usr/local/include/, otherwise cxxabi.h not be found.

With all these steps done, I am able to compile like clang++ -std=c++11 -stdlib=libc++ -lc++abi. OK, I used this to compile my own program, when the program runs, I found the following log “exception_ptr not yet implemented”. And I can’t find the root cause.

Also lldb doesn’t work. I tried to lldb a.out, set breakpoint, and run. But not able to reach the breakpoint.

Could you please give me some hints on how to solve this problem?

That documentation seems quite out of date. There also seems to be a lot of bad documentation within LLVM itself.

To fix these errors you should build libc++ against libc++abi. This is done automatically if you checkout libc++ and libc++abi into llvm/projects.

Please check out the new instructions which can be found here: http://libcxx.llvm.org/docs/BuildingLibcxx.html.
The LLVM documentation might be helpful as well: http://llvm.org/docs/GettingStarted.html


That’s cool. Thanks for the reply.

llvm/clang 3.4 is available in EPEL (
https://admin.fedoraproject.org/pkgdb/package/rpms/llvm/ ) and I have a
COPR with 3.7 ( daveisfera/llvm_3.7 Copr ).

Hi Dave,

llvm/clang EPEL version doesn’t include libc++ and libc++abi, I have to compile them alone where I encountered many issues. Does you COPR version with libc++ and libc++abi included?

No, the EPEL and COPR versions use the system C++ libraries for binary
compatibility with applications built with gcc.