DevHeads.net

Review Request: Don't set an RPATH when installed into multiarch dir

Review request for kdelibs.

Description
Don't set an RPATH when installed into a multiarch dir (e.g. /usr/lib/x86_64-linux-gnu).
On Debian and Ubuntu /usr/lib/<arch> are system lib dirs.

On a Kubuntu 11.10 system CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES contains
/lib
/usr/lib
/usr/lib32
/usr/lib64
and CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES contains
/usr/lib/gcc/x86_64-linux-gnu/4.6.1
/usr/lib/x86_64-linux-gnu
/usr/lib
/lib/x86_64-linux-gnu
/lib

Diffs
cmake/modules/FindKDE4Internal.cmake 6d65e61

Diff: <a href="http://git.reviewboard.kde.org/r/103422/diff/diff" title="http://git.reviewboard.kde.org/r/103422/diff/diff">http://git.reviewboard.kde.org/r/103422/diff/diff</a>

Testing

Thanks,

Felix Geyer

Comments

Re: Review Request: Don't set an RPATH when installed into multi

By Felix Geyer at 12/16/2011 - 04:41

(Updated Dec. 16, 2011, 8:41 a.m.)

Review request for kdelibs and Alexander Neundorf.

Description
Don't set an RPATH when installed into a multiarch dir (e.g. /usr/lib/x86_64-linux-gnu).
On Debian and Ubuntu /usr/lib/<arch> are system lib dirs.

On a Kubuntu 11.10 system CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES contains
/lib
/usr/lib
/usr/lib32
/usr/lib64
and CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES contains
/usr/lib/gcc/x86_64-linux-gnu/4.6.1
/usr/lib/x86_64-linux-gnu
/usr/lib
/lib/x86_64-linux-gnu
/lib

Diffs
cmake/modules/FindKDE4Internal.cmake 6d65e61

Diff: <a href="http://git.reviewboard.kde.org/r/103422/diff/diff" title="http://git.reviewboard.kde.org/r/103422/diff/diff">http://git.reviewboard.kde.org/r/103422/diff/diff</a>

Testing

Thanks,

Felix Geyer

Re: Review Request: Don't set an RPATH when installed into multi

By Commit Hook at 04/06/2012 - 06:02

This review has been submitted with commit 57c3f0c7b40c8d3aaee1e08138d4f2d061ff465d by Felix Geyer to branch KDE/4.8.

- Commit Hook

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Alexander Neundorf at 02/18/2012 - 10:43

Ship it!

You may consider to add checking also CMAKE_C_IMPLICIT_LINK_DIRECTORIES .
CMAKE_(C|CXX)_IMPLICIT_LINK_DIRECTORIES are new since cmake 2.8.0, so please check that it doesn't break when cmake 2.6.4 is used.

- Alexander Neundorf

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Alexander Neundorf at 02/18/2012 - 10:38

Ship it!

Ignore what I said before, the patch is the right thing to do.

This is related to cmake issues <a href="http://public.kitware.com/Bug/view.php?id=10238" title="http://public.kitware.com/Bug/view.php?id=10238">http://public.kitware.com/Bug/view.php?id=10238</a> and a bit to <a href="http://public.kitware.com/Bug/view.php?id=11751" title="http://public.kitware.com/Bug/view.php?id=11751">http://public.kitware.com/Bug/view.php?id=11751</a> .

- Alexander Neundorf

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Alexander Neundorf at 12/16/2011 - 12:40

Actually this looks more like a cmake bug, the contents of CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES seem to be quite wrong.
What version of cmake are you using ?

- Alexander Neundorf

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Modestas Vainius at 02/18/2012 - 08:16

CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES is static while CMAKE_{CXX,C}_IMPLICIT_LINK_DIRECTORIES are dynamic (preseeded with information from compiler). That's why it is more complete and correct.

- Modestas

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Alexander Neundorf at 02/18/2012 - 10:29

On Saturday 18 February 2012, Modestas Vainius wrote:

can you please create a minimal testcase (i.e. no KDE, if possible no Qt)
which shows the problem and post it here or better directly to the cmake list
?

Alex

Re: Review Request: Don't set an RPATH when installed into multi

By Rex Dieter at 02/08/2012 - 12:23

oh, and using cmake-2.8.7-4.fc16.x86_64 here

- Rex

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Rex Dieter at 02/08/2012 - 12:21

For what it's worth, on my fedora 16 x86_64 box:
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "/lib;/usr/lib;/usr/lib32;/usr/lib64"
CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/4.6.2;/usr/lib64;/lib64;/usr/lib"

so that matches reasonably with felix. though, thats besides the point here, which is to avoid rpath'ing CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES items too, right?

- Rex

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote:

Re: Review Request: Don't set an RPATH when installed into multi

By Alexander Neundorf at 02/08/2012 - 15:43

On Wednesday 08 February 2012, Rex Dieter wrote:
Please either post this to the cmake mailing list (<a href="mailto: ... at cmake dot org"> ... at cmake dot org</a>) or put it
in the cmake bug tracker: <a href="http://public.kitware.com/Bug" title="http://public.kitware.com/Bug">http://public.kitware.com/Bug</a>

If this is wrong, it has to be fixed in cmake, nowhere else.
I didn't implement the multiarch support, so I can't really help with this.
Please report this directly to cmake.

Alex

Re: Review Request: Don't set an RPATH when installed into multi

By Felix Geyer at 12/16/2011 - 12:49

2.8.5 (with this commit cerry-picked: <a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=317d077f" title="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=317d077f">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=317d077f</a>) and 2.8.6. Same output on both.
What should it look like?

- Felix

On Dec. 16, 2011, 8:41 a.m., Felix Geyer wrote: