I get this error when compiling with clang++ and -fsanitize=address -m32
:
/usr/bin/ld: cannot find /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-i386.a: No such file or directory
/usr/bin/ld: cannot find /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan_cxx-i386.a: No such file or directory
What package do I need? I already tried with libclang-3.6-dev
I also got an error for clang 3.7 with -m64
:
/usr/bin/ld: cannot find /usr/lib/llvm-3.7/bin/../lib/clang/3.7.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /usr/lib/llvm-3.7/bin/../lib/clang/3.7.1/lib/linux/libclang_rt.asan_cxx-x86_64.a: No such file or directory
With clang 3.7 this seems to be a known problem, see https://llvm.org/bugs/show_bug.cgi?id=22757. With clang 3.6 I could link without a problem.
On Ubuntu these installation instructions worked for me: https://askubuntu.com/a/509223