Issues with plugin and library loading on linux
-
I'm encountering some rather unexpected behaviour during application startup w.r.t. plugin and library loading.
When I don't create a plugins/platforms folder in the folder my application resides in, the plugins are loaded from /usr/local/Qt-5.13.2/plugins/platforms and everything seems to go fine.
When I create a plugins/platforms folder and copy libqlinuxfb.so into it (as one would do to deply the application to a different machine), I get the following error:Cannot load library /Development/Projects/Ariane/cmake-build-debug/AppName/plugins/platforms/libqlinuxfb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: symbol _ZTI14QMetaCallEvent version Qt_5_PRIVATE_API not defined in file libQt5Core.so.5 with link time reference) QLibraryPrivate::loadPlugin failed on "/Development/Projects/Ariane/cmake-build-debug/AppName/plugins/platforms/libqlinuxfb.so" : "Cannot load library /Development/Projects/Ariane/cmake-build-debug/AppName/plugins/platforms/libqlinuxfb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: symbol _ZTI14QMetaCallEvent version Qt_5_PRIVATE_API not defined in file libQt5Core.so.5 with link time reference)"
Indicating that the plugin is trying to use some Qt libraries that came pre installed on my system instead of the one it was built and linked with.
Does anybody know of a way to fix this? I've tried setting the Library path in qt.conf to . and tried to change the RUNPATH of libqlinuxfb.so with chrpath but all to no avail.
This is on Ubuntu 18.04.3LTS with a locally built Qt.