After installing llvm on Gentoo Prefix (CentOS 6.4 base OS), the embedded rpaths incorrectly only referred to ${EPREFIX}/usr/lib/llvm instead of ${EPREFIX}/usr/lib:${EPREFIX}/usr/lib/llvm. This meant that none of the llvm binaries would run (causing dependent ebuilds such as mesa to fail). Using chrpath to manually correct this solved the problem temporarily. Reproducible: Didn't try Steps to Reproduce: 1. emerge llvm 2. Attempt to run llvm binary, eg llvm-config 3. Confirm problem with chrpath -l and/or ldd Marking as have not tried to reproduce as have not yet emerge'd it for a second time.
Well, I'd guess this is because we're setting a new RPATH assuming all the default libdirs are supposed not to be needed. We could do an extra path for Prefix there... ...but honestly, I'd rather finally get rid of all the hacks and put everything in /usr/lib* like upstream expects us to rather than the custom Gentoo /usr/lib*/llvm. @voyageur, are you ok with this?
I've just removed the "llvm" sub-dir in llvm-9999, effectively fixing all the issues caused by it. If noone shouts at me, I will either use that in 3.4 release when it comes out or backport as 3.3-r2.
Original addition of llvm/ was for bug #337467 missing SONAMEs and a bunch of static libraries only used afterwards for clang merge (and following Debian packaging style too). With current merged ebuild the later is not a problem anymore (and may have been fixed for some time too) Current -9999 has missing sonames for: /var/tmp/portage/sys-devel/llvm-9999/image/usr/lib64/BugpointPasses.so /var/tmp/portage/sys-devel/llvm-9999/image/usr/lib64/LLVMHello.so /var/tmp/portage/sys-devel/llvm-9999/image/usr/lib64/LLVMgold.so /var/tmp/portage/sys-devel/llvm-9999/image/usr/lib64/libLTO.so We can disable the Hello example in build, the others are real libs so they should get a proper compilation line :)
(In reply to Bernard Cafarelli from comment #3) > We can disable the Hello example in build, the others are real libs so they > should get a proper compilation line :) Well, LLVMgold.so is just a plugin, so it may live without SONAME. Judging by the name, BugpointPasses.so is also loaded dynamically.
*llvm-3.3-r2 (28 Dec 2013) 28 Dec 2013; Michał Górny <mgorny@gentoo.org> +files/llvm-3.3-r2-gentoo-install.patch, +llvm-3.3-r2.ebuild: Backport all the fixes and install design changes from -9999 to -3.3. Fixes bugs #425844 (install CMake modules), #462554 (install bfd-plugins symlink), #489586 (multilib portage compat.), #488216, #492554 (RPATH issues).