fixup_bundle removes runpath from qt shared libs?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

fixup_bundle removes runpath from qt shared libs?

Miklos Espak

I'd like to package a simple application on linux. One main executable, one shared lib, a few Qt shared libs and the xcb platform plugin.

I could package the app, but I can launch the it only if I set the LD_LIBRARY_PATH manually, or with a wrapper script that does that. Moreover, all the dependent libraries are copied into the bin folder of the package, the plugin is under bin/plugins/platforms that I find a bit messy.

From what I've learned, setting the RPATH should resolve the first issue. So, I set it to "$ORIGIN/", as everything is in 'bin'. However, the application still does not start without setting LD_LIBRARY_PATH manually, the xcb plugin cannot be loaded.

What I see with readelf:

1. The RPATH is set on the main executable.
2. The RPATH is not set on my shared lib.
3. The xcb plugin has a runpath set to '$ORIGIN/../../lib'. This is the original value from the qt installation, fixup_bundle did not touch it.
4. The other qt shared libs do not have either rpath or runpath, although they *did* have runpath in the Qt install directory from where they had been copied over.

Is this what should happen? 2. and 4. looks wrong to me. 3. is good, but it would be even better if I could instruct the fixup_bundle function to copy the libraries to the lib folder, not the bin, like with the install command.

Is there any way to get this work?

Thanks for any hints.



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: