| Issue |
69056
|
| Summary |
linker error in a new llvm build
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
mbelda
|
I am installing llvm in a clean build and I got a linker error when building it.
I have configured it with the following options.
~~~
cmake -S llvm -B build -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;polly" -DCMAKE_BUILD_TYPE=Release
~~~
And then when building it executing `cmake --build build` the following error appears.
~~~
[ 52%] Building CXX object projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_value.cpp.o
[ 52%] Built target RTUbsan.x86_64
[ 52%] Building CXX object projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-x86_64.dir/ubsan_init_standalone_preinit.cpp.o
[ 52%] Linking CXX static library ../../../../lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a
[ 52%] Built target clang_rt.ubsan_standalone-x86_64
[ 52%] Generating version list for clang_rt.ubsan_standalone-dynamic-x86_64
[ 52%] Building CXX object projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.o
[ 52%] Built target RTUbsan_dynamic_version_script_dummy.x86_64
[ 52%] Linking CXX shared library ../../../../lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone.so
/usr/bin/ld: CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.o: in function `findBaseAtOffset(__cxxabiv1::__class_type_info const*, long)':
/home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:174: undefined reference to `typeinfo for __cxxabiv1::__si_class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:174: undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:174: undefined reference to `__dynamic_cast'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:178: undefined reference to `typeinfo for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:178: undefined reference to `__dynamic_cast'
/usr/bin/ld: CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.o: in function `isDerivedFromAtOffset(__cxxabiv1::__class_type_info const*, __cxxabiv1::__class_type_info const*, long)':
/home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:137: undefined reference to `typeinfo for __cxxabiv1::__si_class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:137: undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:137: undefined reference to `__dynamic_cast'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:141: undefined reference to `typeinfo for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:141: undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:141: undefined reference to `__dynamic_cast'
/usr/bin/ld: CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.o: in function `__ubsan::checkDynamicType(void*, void*, unsigned long)':
/home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:245: undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:245: undefined reference to `typeinfo for std::type_info'
/usr/bin/ld: /home/mbelda/epfl/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:245: undefined reference to `__dynamic_cast'
collect2: error: ld returned 1 exit status
make[2]: *** [projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-dynamic-x86_64.dir/build.make:257: lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:38979: projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-dynamic-x86_64.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
~~~
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs