Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41911 - [clang] -fsanitize=address: fails to link; /usr/bin/ld: cannot find /usr/bin/../lib/clang/3.5.0/lib/

Attached to Project: Arch Linux
Opened by Matthias Krüger (matthiaskrgr) - Wednesday, 10 September 2014, 13:39 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 10 September 2014, 17:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When I compiled a program with the flag -fsanitize=address, ld fails to link:


/usr/bin/ld: cannot find /usr/bin/../lib/clang/3.5.0/lib/linux/libclang_rt.asan_cxx-i386.a: No such file or directory
/usr/bin/ld: cannot find /usr/bin/../lib/clang/3.5.0/lib/linux/libclang_rt.asan-i386.a: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:233: recipe for target 'cppcheck' failed
make: *** [cppcheck] Error 1

clang 3.5.0-2



This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Wednesday, 10 September 2014, 17:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  clang 3.5.0-2.1
Comment by Matthias Krüger (matthiaskrgr) - Wednesday, 10 September 2014, 13:51 GMT
Hmm no, there were some other flags that probably play a role in this..
"-fsanitize=address" alone seems to work, but "-O2 -m32 -fno-omit-frame-pointer -fsanitize=address" fails.
Comment by Matthias Krüger (matthiaskrgr) - Wednesday, 10 September 2014, 13:58 GMT
I would guess it's the -m32 in combination with -fsanitize=address which causes the problem.
Comment by Evangelos Foutras (foutrelis) - Wednesday, 10 September 2014, 17:07 GMT
I just uploaded clang 3.5.0-2.1-x86_64 which includes 32-bit compiler-rt libraries.

Give that a try and let me know if it works for you.
Comment by Matthias Krüger (matthiaskrgr) - Wednesday, 10 September 2014, 17:35 GMT
Looks good, thank you.

Loading...