RPATH problems in kdelibs

Thiago Macieira thiago at kde.org
Sun Nov 26 21:57:40 CET 2006


Hello

I have no idea how to solve this problem: the KDE libraries don't have the 
necessary RPATH information built into them. Example:

$ objdump -p ~/KDE4/lib/libkdeui.so.5 | grep RUNPATH
  RUNPATH     /usr/local/lib:/home/thiago/obj/troll/qt-main/lib

Since kdeui links to kdecore, the RPATH to kdecore should be present. It 
isn't.

I found this comment in KDE4Macros.cmake, which sheds some light:
# If RPATH is not explicitely disabled, libraries and plugins are built 
without RPATH, in
# the hope that the RPATH which is compiled into the executable is good 
enough.

Well, the comment is wrong. Libraries should have rpaths to their 
dependencies.

Anyways, this wouldn't be a problem if plugins didn't share the same 
problem:
$ objdump -p ~/KDE4/lib/kde4/kspell_aspell.so | grep RUNPATH
  RUNPATH     /usr/local/lib:/home/thiago/obj/troll/qt-main/lib

If that doesn't convince you, this should:
$ objdump -p ~/KDE4/lib/kde4/plugins/designer/kdewidgets.so | grep RUNPATH
  RUNPATH     /usr/local/lib:/home/thiago/obj/troll/qt-main/lib:/lib

kdewidgets.so is loaded by Qt. As such, it does not have RPATH to the 
library, as the comment above expected. This is a bug.

I fixed it by making KDE4_HANDLE_RPATH_FOR_LIBRARY not reset the 
INSTALL_RPATH to "". Any objections against committing this?

-- 
  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/20061126/f5474583/attachment.pgp 


More information about the Kde-buildsystem mailing list