在clang-7.0上缺少libclang_rt.tsan-x86_64.a

时间:2018-10-10 14:55:25

标签: clang llvm-clang thread-sanitizer

我正在尝试查找使用条件变量的多线程代码中的某些死锁。有人建议使用线程消毒剂。因此,我从source编译了LLVM并启用了线程清理器

LLVM CMake configuration

LLVM构建良好,但是当我尝试构建项目时,遇到了很多此类警告:

: && /home/dzenan/LLVM-rel/bin/clang++  -fsanitize=thread  -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Wno-undefined-var-template -Woverloaded-virtual  -w  -O2 -g -DNDEBUG  -fsanitize=thread Modules/ThirdParty/VNL/src/vxl/v3p/netlib/tests/CMakeFiles/netlib_lsmrTest2.dir/lsmrTest2.cxx.o  -o bin/netlib_lsmrTest2  -Wl,-rpath,/home/dzenan/ITK-git-clang/lib lib/libitkv3p_netlib-5.0.so.1 -lm && :
/usr/bin/ld: cannot find /home/dzenan/LLVM-rel/lib/clang/7.0.0/lib/linux/libclang_rt.tsan-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /home/dzenan/LLVM-rel/lib/clang/7.0.0/lib/linux/libclang_rt.tsan_cxx-x86_64.a: No such file or directory
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
[1507/5739] Building C object Modules/ThirdParty/VNL/src/vxl/v3p/netlib/CMakeFiles/itknetlib.dir/triangle.c.o
FAILED: bin/netlib_lsqrTest1

我在做什么错以及如何解决?

0 个答案:

没有答案