[Qbs] avoid RPATH pointing to Qt installation folder

Heiko Nardmann heiko.nardmann at itechnical.de
Tue Oct 8 11:39:09 CEST 2019


Am 08.10.19 um 10:51 schrieb Christian Kandeler:
> On Tue, 8 Oct 2019 09:53:32 +0200
> Heiko Nardmann <heiko.nardmann at itechnical.de> wrote:
>
>> I'm looking for a way to prevent the RPATH of an executable pointing to
>> the installed Qt. From the "core.qbs" file I see that cpp.rpaths is set
>> to libPath for Linux by default.
> There should probably be a Qt.core property that controls this. Until then, you'll have to force-override cpp.rpaths in your app product:
>
>     Properties {
>         condition: true
>         overrideListProperties: true
>         cpp.rpaths: [ /* full list of your rpaths */ ]
>     }
>
> (Of course, if you don't want any RPATH at all, then "cpp.useRPaths: false" is the way to go.)
>
>
> Christian

The question is whether to include Qt.core.libPath (as defined inside
core.qbs) into the list of rpaths. If I put it into the list then it
also is part of the binaries RPATH - which I want to avoid. I I leave it
out then I get ld error wrt. the ICU libs - which Qt.core is depending on.

Yes, probably there is a property missing that states which paths to use
for "-rpath-link": "-rpath" is for runtime while "-rpath-link" is for
link time. As I'm deploying the Qt libs together with the application I
need cpp.rpaths to control runtime. Just omitting the path to the
installed Qt and at the same time pleasing the linker is currently the
problem ...

Any workaround other than useRPaths: false and trying to completely
controlling linker flags?


/Kind regards,/

  Heiko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20191008/d820afdf/attachment-0001.html>


More information about the Qbs mailing list