[cfe-dev] Building clang 5 (for coroutines)
Kirit Sælensminde via cfe-dev
cfe-dev at lists.llvm.org
Wed Jun 14 21:55:28 PDT 2017
On 15/06/17 02:29, Shoaib Meenai wrote:
> I'm not too familiar with building with the monorepo, but does adding
> libcxxabi to LLVM_ENABLE_PROJECTS change anything? The missing references are
> to c++abi functions.
I started with the monorepo, but I'm now working with subversion
checkouts just to rule out a problem in the git repos. I'm also building
natively on an Ubuntu Zesty machine, g++ is 6.3.
I've remade anew the project using this command (into an empty directory):
CC=gcc CXX=g++ cmake ../svn/llvm
-DLLVM_ENABLE_PROJECTS="libcxxabi;llvm;clang;libcxx"
-DCMAKE_BUILD_TYPE=Release
I put the libcxxabi first just in case that made any difference. It
didn't. Below is the make verbose output for the relevant part of the
build.
Kirit
make[2]: Entering directory
'/home/kirit/Projects/language/clang-docker/llvm-build'
[ 64%] Linking CXX shared library ../../../lib/libc++.so
cd
/home/kirit/Projects/language/clang-docker/llvm-build/projects/libcxx/lib
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/cxx_shared.dir/link.txt --verbose=1
/usr/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time
-std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -Wno-long-long -Wno-maybe-uninitialized
-Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections
-fdata-sections -O3 -fPIC -nodefaultlibs -Wl,-z,defs -shared
-Wl,-soname,libc++.so.1 -o ../../../lib/libc++.so.1.0
CMakeFiles/cxx_objects.dir/__/src/algorithm.cpp.o
CMakeFiles/cxx_objects.dir/__/src/any.cpp.o
CMakeFiles/cxx_objects.dir/__/src/bind.cpp.o
CMakeFiles/cxx_objects.dir/__/src/chrono.cpp.o
CMakeFiles/cxx_objects.dir/__/src/condition_variable.cpp.o
CMakeFiles/cxx_objects.dir/__/src/debug.cpp.o
CMakeFiles/cxx_objects.dir/__/src/exception.cpp.o
CMakeFiles/cxx_objects.dir/__/src/functional.cpp.o
CMakeFiles/cxx_objects.dir/__/src/future.cpp.o
CMakeFiles/cxx_objects.dir/__/src/hash.cpp.o
CMakeFiles/cxx_objects.dir/__/src/ios.cpp.o
CMakeFiles/cxx_objects.dir/__/src/iostream.cpp.o
CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o
CMakeFiles/cxx_objects.dir/__/src/memory.cpp.o
CMakeFiles/cxx_objects.dir/__/src/mutex.cpp.o
CMakeFiles/cxx_objects.dir/__/src/new.cpp.o
CMakeFiles/cxx_objects.dir/__/src/optional.cpp.o
CMakeFiles/cxx_objects.dir/__/src/random.cpp.o
CMakeFiles/cxx_objects.dir/__/src/regex.cpp.o
CMakeFiles/cxx_objects.dir/__/src/shared_mutex.cpp.o
CMakeFiles/cxx_objects.dir/__/src/stdexcept.cpp.o
CMakeFiles/cxx_objects.dir/__/src/string.cpp.o
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o
CMakeFiles/cxx_objects.dir/__/src/thread.cpp.o
CMakeFiles/cxx_objects.dir/__/src/typeinfo.cpp.o
CMakeFiles/cxx_objects.dir/__/src/utility.cpp.o
CMakeFiles/cxx_objects.dir/__/src/valarray.cpp.o
CMakeFiles/cxx_objects.dir/__/src/variant.cpp.o -lpthread -lc -lm -lrt
-lgcc_s
CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o: In function
`std::__1::(anonymous
namespace)::__throw_runtime_error(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
locale.cpp:(.text.unlikely._ZNSt3__112_GLOBAL__N_1L21__throw_runtime_errorERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+0xf):
undefined reference to `__cxa_allocate_exception'
locale.cpp:(.text.unlikely._ZNSt3__112_GLOBAL__N_1L21__throw_runtime_errorERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+0x33):
undefined reference to `__cxa_throw'
locale.cpp:(.text.unlikely._ZNSt3__112_GLOBAL__N_1L21__throw_runtime_errorERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+0x3e):
undefined reference to `__cxa_free_exception'
CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o: In function
`std::__1::ctype_byname<wchar_t>::do_widen(char) const':
locale.cpp:(.text._ZNKSt3__112ctype_bynameIwE8do_widenEc+0x43):
undefined reference to `__cxa_call_unexpected'
CMakeFiles/cxx_objects.dir/__/src/locale.cpp.o: In function
`std::__1::ctype_byname<wchar_t>::do_widen(char const*,
More information about the cfe-dev
mailing list