[cfe-dev] libc++ fails to link

Csaba Raduly via cfe-dev cfe-dev at lists.llvm.org
Fri Apr 27 03:31:10 PDT 2018

Hi all,

I have LLVM + clang + clang extra tools + compiler-rt + libc++ checked
out as suggested by https://clang.llvm.org/get_started.html

After configuring with

cmake -G Ninja \

and running "ninja all check-all" , I get a bunch of errors like:

projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o: In
function `std::__1::(anonymous
std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
undefined reference to `__cxa_allocate_exception'
undefined reference to `__cxa_throw'
undefined reference to `__cxa_free_exception'
projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o: In
function `std::__1::ctype_byname<wchar_t>::do_widen(char) const':
undefined reference to `__cxa_call_unexpected'

(see the attachment)

This used to work 2-3 months ago ; the build would finish with the
unittests (of which five used to fail ; one got fixed since then).

Platform: Ubuntu 17.10
gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)

You can get very substantial performance improvements by not doing the
right thing.
   - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 111v
Type: application/octet-stream
Size: 162572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180427/d9433afd/attachment.obj>

More information about the cfe-dev mailing list