İsmail Dönmez via llvm-dev
2017-Aug-01 14:07 UTC
[llvm-dev] ubsan no longer compiles when libc++ is the default
Hi, Trying to compile llvm with the following configuration on Linux x86-64: cmake -G Ninja -DBUILD_SHARED_LIBS=ON \ -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold" \ -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=gold"\ -DCMAKE_BUILD_TYPE=RelWithDebInfo ' \ -DCMAKE_C_FLAGS="-O2 -g" \ -DCMAKE_CXX_FLAGS="-O2 -g" \ -DENABLE_LINKER_BUILD_ID=ON \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_ENABLE_PIC=ON \ -DLLVM_BINUTILS_INCDIR=/usr/include \ -DLLVM_TARGETS_TO_BUILD=host \ -DLLVM_TARGET_ARCH=host \ -DLLVM_LIBDIR_SUFFIX=64 \ -DCLANG_DEFAULT_CXX_STDLIB=libc++ \ -DLLVM_ENABLE_LIBCXX=ON .. results in the following build error: ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: error: undefined reference to 'typeinfo for std::type_info' ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: error: undefined reference to 'typeinfo for __cxxabiv1::__class_type_info' ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: error: undefined reference to '__dynamic_cast' [...] Looks like ubsan no longer links to libc++abi ? (I see -lgcc_s -lc -ldl -lrt -lpthread on the linker line.) This configuration has worked with r308719 so I am guessing this is a regression. Regards, ismail
Vedant Kumar via llvm-dev
2017-Aug-01 17:32 UTC
[llvm-dev] ubsan no longer compiles when libc++ is the default
> On Aug 1, 2017, at 7:07 AM, İsmail Dönmez via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > Trying to compile llvm with the following configuration on Linux x86-64: > > cmake -G Ninja -DBUILD_SHARED_LIBS=ON \ > -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold" > \ > -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=gold"\ > -DCMAKE_BUILD_TYPE=RelWithDebInfo ' \ > -DCMAKE_C_FLAGS="-O2 -g" \ > -DCMAKE_CXX_FLAGS="-O2 -g" \ > -DENABLE_LINKER_BUILD_ID=ON \ > -DLLVM_ENABLE_ASSERTIONS=ON \ > -DLLVM_ENABLE_PIC=ON \ > -DLLVM_BINUTILS_INCDIR=/usr/include \ > -DLLVM_TARGETS_TO_BUILD=host \ > -DLLVM_TARGET_ARCH=host \ > -DLLVM_LIBDIR_SUFFIX=64 \ > -DCLANG_DEFAULT_CXX_STDLIB=libc++ \ > -DLLVM_ENABLE_LIBCXX=ON .. > > results in the following build error: > > ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: > error: undefined reference to 'typeinfo for std::type_info' > ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: > error: undefined reference to 'typeinfo for > __cxxabiv1::__class_type_info' > ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: > error: undefined reference to '__dynamic_cast' > [...] > > Looks like ubsan no longer links to libc++abi ? (I see -lgcc_s -lc > -ldl -lrt -lpthread on the linker line.) > > This configuration has worked with r308719 so I am guessing this is a > regression.This might have done it: r309362 Support libc++abi in addition to libstdc++ Can you spot SANITIZER_CXX_ABI_LIBRARY, SANITIZER_CXX_ABI_LIBNAME, SANITIZER_CXX_ABI_INTREE, and SANITIZER_CXX_ABI_SYSTEM in your CMakeCache.txt? If so do they have the right values? vedant> > Regards, > ismail > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
İsmail Dönmez via llvm-dev
2017-Aug-02 08:47 UTC
[llvm-dev] ubsan no longer compiles when libc++ is the default
Hi, I see the following variables in the CMakeCache.txt: SANITIZER_CXX_ABI:STRING=default //STRINGS property for variable: SANITIZER_CXX_ABI SANITIZER_CXX_ABI-STRINGS:INTERNAL=none;default;libcxxabi;libstdc++ Regards, ismail On Tue, Aug 1, 2017 at 7:32 PM, Vedant Kumar <vsk at apple.com> wrote:> >> On Aug 1, 2017, at 7:07 AM, İsmail Dönmez via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> Trying to compile llvm with the following configuration on Linux x86-64: >> >> cmake -G Ninja -DBUILD_SHARED_LIBS=ON \ >> -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold" >> \ >> -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=gold"\ >> -DCMAKE_BUILD_TYPE=RelWithDebInfo ' \ >> -DCMAKE_C_FLAGS="-O2 -g" \ >> -DCMAKE_CXX_FLAGS="-O2 -g" \ >> -DENABLE_LINKER_BUILD_ID=ON \ >> -DLLVM_ENABLE_ASSERTIONS=ON \ >> -DLLVM_ENABLE_PIC=ON \ >> -DLLVM_BINUTILS_INCDIR=/usr/include \ >> -DLLVM_TARGETS_TO_BUILD=host \ >> -DLLVM_TARGET_ARCH=host \ >> -DLLVM_LIBDIR_SUFFIX=64 \ >> -DCLANG_DEFAULT_CXX_STDLIB=libc++ \ >> -DLLVM_ENABLE_LIBCXX=ON .. >> >> results in the following build error: >> >> ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: >> error: undefined reference to 'typeinfo for std::type_info' >> ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: >> error: undefined reference to 'typeinfo for >> __cxxabiv1::__class_type_info' >> ../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233: >> error: undefined reference to '__dynamic_cast' >> [...] >> >> Looks like ubsan no longer links to libc++abi ? (I see -lgcc_s -lc >> -ldl -lrt -lpthread on the linker line.) >> >> This configuration has worked with r308719 so I am guessing this is a >> regression. > > This might have done it: > r309362 Support libc++abi in addition to libstdc++ > > Can you spot SANITIZER_CXX_ABI_LIBRARY, SANITIZER_CXX_ABI_LIBNAME, SANITIZER_CXX_ABI_INTREE, and SANITIZER_CXX_ABI_SYSTEM in your CMakeCache.txt? If so do they have the right values? > > vedant > >> >> Regards, >> ismail >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Possibly Parallel Threads
- ubsan no longer compiles when libc++ is the default
- CommandLineParser problems with llvm trunk?
- Trying to create a pure LLVM toolchain on musl based distribution
- Building LLVM with LLVM with no dependence on GCC
- Building LLVM with LLVM with no dependence on GCC