Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492554 - sys-devel/llvm-3.3-r1 has incorrect rpath on prefix
Summary: sys-devel/llvm-3.3-r1 has incorrect rpath on prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 22:21 UTC by Michael Curtis
Modified: 2013-12-28 14:08 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 Michael Curtis 2013-11-25 22:21:59 UTC
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.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-27 12:59:19 UTC
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?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-30 10:35:32 UTC
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.
Comment 3 Bernard Cafarelli gentoo-dev 2013-12-06 09:37:22 UTC
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 :)
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-08 11:21:19 UTC
(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.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-28 14:08:29 UTC
*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).