[cfe-dev] Building clang 5 (for coroutines)

Kirit Sælensminde via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 14 05:41:53 PDT 2017


Hi,

I've been trying to get a copy of clang 5 working so I can start to get 
to grips with the coroutines. I'm on Ubuntu Zesty for reference.

My first attempt was to dockerize the nightly packages using:

     deb http://apt.llvm.org/zesty/ llvm-toolchain-zesty main

But as far as I can tell there isn't any way to get the latest libc++ 
this way, at least no matter what I try I can't find the coroutine 
header on the image.

Next I've tried the git monorepo. I've tried to build with ninja and 
cmake using the instructions on 
<http://llvm.org/docs/GettingStarted.html>. I've tried to use the 
packaged versions  of both clang and gcc to do the build.

I've also tried to use the git repos from llvm-project on github and 
then finally the svn repositories. In all cases I get large numbers of 
link errors like the ones at the end of this message.

The latest cmake invokation I've tried is this one:

     CC=clang CXX=clang++ cmake ../svn/llvm 
-DLLVM_ENABLE_PROJECTS="llvm" -DCMAKE_BUILD_TYPE=Release

Should I be taking particular commits, or am I doing something idiotic? 
I don't develop using cmake, make or ninja, so I certainly don't know 
what to not do.


Thanks in advance,


Kirit


_11char_traitsIwEENS_9allocatorIwEEEEPm+0x16f): undefined reference to 
`__cxa_free_exception'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__112strstreambufE+0x0): 
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__110istrstreamE+0x0): 
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__110ostrstreamE+0x0): 
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__19strstreamE+0x0): 
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function 
`std::__1::generic_category()':
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNSt3__116generic_categoryEv+0x13): 
undefined reference to `__cxa_guard_acquire'
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNSt3__116generic_categoryEv+0x31): 
undefined reference to `__cxa_guard_release'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function 
`std::__1::__system_error_category::default_error_condition(int) const':
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNKSt3__123__system_error_category23default_error_conditionEi+0x27): 
undefined reference to `__cxa_guard_acquire'
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNKSt3__123__system_error_category23default_error_conditionEi+0x5f): 
undefined reference to `__cxa_guard_acquire'
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNKSt3__123__system_error_category23default_error_conditionEi+0x7d): 
undefined reference to `__cxa_guard_release'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function 
`std::__1::system_category()':
/home/kirit/Projects/language/clang-docker/svn/libcxx/src/system_error.cpp:(.text._ZNSt3__115system_categoryEv+0x13): 
undefined reference to `__cxa_guard_acquire'






More information about the cfe-dev mailing list