Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407295 - sys-devel/clang-9999 - -faddress-sanitizer can't find libclang_rt.asan-x86_64.a
Summary: sys-devel/clang-9999 - -faddress-sanitizer can't find libclang_rt.asan-x86_64.a
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 16:08 UTC by Peter Waller
Modified: 2012-03-08 17:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.73 KB, text/plain)
2012-03-07 16:08 UTC, Peter Waller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Waller 2012-03-07 16:08:33 UTC
Created attachment 304551 [details]
emerge --info

Minimal example to reproduce, and indeed there is no libclang_rt* anywhere on the system:

(clang-r152216 and llvm-r152227)

$ echo "int main(int argc, char* argv[]) { return 0; }" | clang -xc -faddress-sanitizer -fcatch-undefined-behavior - -o test -v
clang version 3.1 (trunk)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/pwaller -ferror-limit 19 -fmessage-length 177 -fcatch-undefined-behavior -faddress-sanitizer -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/--wS8twe.o -x c -
clang -cc1 version 3.1 based upon LLVM 3.1svn default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/bin/../lib/clang/3.1/include
 /usr/include
End of search list.
 "/usr/bin/x86_64-pc-linux-gnu-ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2 -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../.. -L/lib -L/usr/lib /tmp/--wS8twe.o /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a -lpthread -ldl -export-dynamic -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/crtend.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crtn.o
/usr/bin/x86_64-pc-linux-gnu-ld: cannot find /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Bernard Cafarelli gentoo-dev 2012-03-08 15:35:36 UTC
Thanks for the report!

asan support requires the compiler-rt subproject (found in upstream build instructions for clang SVN), I will update clang-9999 to also check out this module
Comment 2 Bernard Cafarelli gentoo-dev 2012-03-08 16:37:19 UTC
clang-9999 now also fetches compiler-rt trunk (we will see when 3.1 release gets ready if compiler-rt can be split in a separate package)

It also installs asan_symbolize.py, until this is added directly in compiler_rt
Comment 3 Peter Waller 2012-03-08 17:58:02 UTC
Fix confirmed. Thanks for the speedy fix!