Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 555902

Summary: cmake-utils.eclass: please disable rpath for non-prefix builds
Product: Gentoo Linux Reporter: Andrew Savchenko <bircoph>
Component: EclassesAssignee: Gentoo KDE team <kde>
Status: RESOLVED WONTFIX    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: cmake-utils.eclass-rpath.patch

Description Andrew Savchenko gentoo-dev 2015-07-25 23:30:06 UTC
Created attachment 407628 [details, diff]
cmake-utils.eclass-rpath.patch

Hello,

cmake allows to disable RPATH linking (enabled by default), this leads to insecure rpath warning during install phase checks, logs show that build directory (-Wl,--rpath /var/tmp/portage/...) is added to linker options.

Many ebuilds fix this by adding one of the following or similar options:
-DCMAKE_SKIP_RPATH=ON
-DENABLE_RPATH=OFF
-DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF

I propose to add this functionality to the eclass, thus ebuilds can be simplified. See attached patch.
Comment 1 Johannes Huber (RETIRED) gentoo-dev 2015-07-26 08:48:49 UTC
It looks good to me but i would prefer if you send the patch to -dev ml to get a wider review.
Comment 2 Andrew Savchenko gentoo-dev 2015-07-26 09:49:28 UTC
Done (mail is sent to dev ml).
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-08-07 18:08:51 UTC
I responded on the mailing list why I disagree with the patch.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2015-11-18 09:48:46 UTC
(In reply to Michael Palimaka (kensington) from comment #3)
> I responded on the mailing list why I disagree with the patch.

For the record, my response was as follows:

This is usually a workaround for an underlying bug. Plus, this will
break any package that legitimately uses rpath.

As there were no further responses/discussion, I don't think we can proceed.