Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417595 - sys-devel/clang looks for some of its libraries in /usr/lib while installed to native ABI dir
Summary: sys-devel/clang looks for some of its libraries in /usr/lib while installed t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-26 09:29 UTC by Michał Górny
Modified: 2013-06-17 14:04 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-26 09:29:50 UTC
$ clang -O4 -faddress-sanitizer a.c
/usr/bin/x86_64-pc-linux-gnu-ld: error: cannot open /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory
lto-llvm.o-WK9UAf:ld-temp.o:function asan.module_ctor: error: undefined reference to '__asan_init'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

That's because it looks for it in /usr/lib, while it is installed to /usr/lib64.

There's a lot of places in clang's sources where '../lib' is hardcoded. I wonder if it's easier to fix that all or just install clang into /usr/lib (much like gcc is installed on Gentoo).
Comment 1 Bernard Cafarelli gentoo-dev 2013-06-17 14:04:11 UTC
With the --with-clang-resource-dir configuration option and a few additional seds in makefiles (and one test), I have it working in 3.3_rc3 (and 9999 ebuild, though with hardcoded version there)