RPATH problems in kdelibs
Thiago Macieira
thiago at kde.org
Tue Nov 28 01:32:39 CET 2006
Alexander Neundorf wrote:
>Rationale: without any RPATH the libs get the RPATH from the executable
>(AFAIK). This means when running an uninstalled executable, it will link
> to the correct uninstalled libs. When the executable gets installed, it
> is relinked to the installed versions.
I don't think you should make a difference there. Just apply the same
behaviour for both executables and libraries.
Besides, why should the executable's RPATH have to contain a library's
library dependency path? What happens if you relink the library, and its
dependency changed paths -- but you haven't relinked the executable yet?
(Note that I am arguing for --as-needed too)
>Are kdewidget and maybe the styles, i.e. stuff which is loaded by Qt,
> the only problems ?
No. All plugins are. Anything that can be loaded can -- potentially -- be
loaded by a non-KDE program. In which case, the libraries aren't yet in
memory and must be found by RPATH.
>This is no issue on OS X where there is install_name_tool which has the
> same effect but works blazingly fast.
Technically, changing the ELF header to change the RPATH should be fairly
simple... I just don't know of a tool to do that.
>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.
That's the same as using khexedit. I meant a real tool that understood
what ELF is -- probably using libelf.
I'll look into that myself.
--
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/20061128/aba6c983/attachment.pgp
More information about the Kde-buildsystem
mailing list