googleprojectzero / SockFuzzer

Other
356 stars 47 forks source link

clang-14 errors while compiling fuzz-introspector #10

Open tthtlc opened 2 years ago

tthtlc commented 2 years ago

While compiling inside the Docker, the "build_all.sh" script under fuzz-introspector got into the following errors:

[ 41%] Built target RTUbsan_cxx.x86_64 [ 41%] Linking CXX static library ../../../../lib/clang/14.0.4/lib/linux/libclang_rt.ubsan_standalone_cxx-x86_64.a [ 41%] Built target clang_rt.ubsan_standalone_cxx-x86_64 [ 41%] Generating version list for clang_rt.ubsan_standalone-dynamic-x86_64 [ 41%] Building CXX object projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.o [ 41%] Built target RTUbsan_dynamic_version_script_dummy.x86_64 [ 41%] Linking CXX shared library ../../../../lib/clang/14.0.4/lib/linux/libclang_rt.ubsan_standalone-x86_64.so /usr/bin/ld: CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.o: in function __ubsan::checkDynamicType(void*, void*, unsigned long)': /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:233: undefined reference totypeinfo for std::type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:233: undefined reference to typeinfo for __cxxabiv1::__class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:233: undefined reference todynamic_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)': /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:(.text+0x1b2): undefined reference to typeinfo for __cxxabiv1::__class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:(.text+0x1b9): undefined reference totypeinfo for cxxabiv1::si_class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:125: undefined reference to `dynamic_cast' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:129: undefined reference to typeinfo for __cxxabiv1::__class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:129: undefined reference totypeinfo for cxxabiv1::vmi_class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:129: undefined reference to __dynamic_cast' /usr/bin/ld: CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.o: in functionfindBaseAtOffset(cxxabiv1::class_type_info const*, long)': /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:(.text+0x344): undefined reference to typeinfo for __cxxabiv1::__class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:(.text+0x34b): undefined reference totypeinfo for cxxabiv1::si_class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:162: undefined reference to __dynamic_cast' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:166: undefined reference totypeinfo for cxxabiv1::class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:166: undefined reference to typeinfo for __cxxabiv1::__vmi_class_type_info' /usr/bin/ld: /fuzz-introspector/build/llvm-project/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:166: undefined reference to__dynamic_cast' clang-14: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-dynamic-x86_64.dir/build.make:253: lib/clang/14.0.4/lib/linux/libclang_rt.ubsan_standalone-x86_64.so] Error 1 make[1]: [CMakeFiles/Makefile2:21729: projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-dynamic-x86_64.dir/all] Error 2 make: *** [Makefile:156: all] Error 2