RPATH problems in kdelibs
Thiago Macieira
thiago at kde.org
Mon Dec 11 00:49:12 CET 2006
Alexander Neundorf wrote:
>It does if you set the RPATH related target properties correctly:
>
>set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} )
>set(CMAKE_SKIP_BUILD_RPATH TRUE)
>set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
>set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
>
>The last option is the one which makes cmake automatically use the paths
> to all used libs as RPATH. Yes, this is probably the most complicated
> combination of settings you have to do anywhere in cmake.
Thank you, I didn't know about them.
>I committed this as patch to kdelibs/kdewidgets/CMakeLists.txt
>I also added an option KDE4_USE_ALWAYS_FULL_RPATH to
> FindKDE4Internal.cmake. If you set this to TRUE, everything will be
> linked with the full RPATH.
This solved the problem. The widgets can now be loaded in Designer with
all the required libraries.
>Did you have luck with looking for a RPATH-editing tool ?
Not so much.
You had said:
>There is a tool called chrpath (http://freshmeat.net/projects/chrpath/)
> which can edit the RPATH in ELF files, the only problem is that it
> can't add an RPATH if there's no RPATH yet in the ELF file, and the new
> RPATH may not be longer than the already existing RPATH. Having
> something like that for ELF files would be really nice.
I have not found any tool to do that. I think I can come up with
something, but the problem is really that adding stuff to the ELF header
could cause a lot to move. I am not sure how much moving around I can do
in an ELF executable.
The alternative is to add a dummy rpath with lots of padding. That one we
can easily change. The only drawback is the adding of RPATH with no
RUNPATH, which seems to be the default on Linux: if this is the case,
LD_LIBRARY_PATH has no effect.
I still have seen no side-effect to using RUNPATH (as opposed to RPATH
only).
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20061211/1dcb0fa7/attachment.pgp
More information about the Kde-buildsystem
mailing list