Qt 5.6 Linux Deployment, plugin xcb not fount libQt5XcbQpa.so.5
-
hello all
error
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
Reinstalling the application may fix this problem.
AbortedI while unsuccessfully trying to assemble a work package on Qt 5.6, we are working on version 4.2
i add
QMAKE_LFLAGS += -Wl,-rpath /opt/libitems/libx64/
and in main.cpp
QApplication::setLibraryPaths(QStringList("/opt/libitems/plugins"));
if run app command : QT_DEBUG_PLUGINS=1 LibItems
int main(int, char**) ("/opt/libitems/plugins") QFactoryLoader::QFactoryLoader() checking directory path "/opt/libitems/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqeglfs.so" Found metadata in lib /opt/libitems/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqlinuxfb.so" Found metadata in lib /opt/libitems/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqminimal.so" Found metadata in lib /opt/libitems/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqminimalegl.so" Found metadata in lib /opt/libitems/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqoffscreen.so" Found metadata in lib /opt/libitems/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/opt/libitems/plugins/platforms/libqxcb.so" Found metadata in lib /opt/libitems/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "className": "QXcbIntegrationPlugin", "debug": false, "version": 329216 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... loaded library "/opt/libitems/plugins/platforms/libqxcb.so" QLibraryPrivate::loadPlugin failed on "/opt/libitems/plugins/platforms/libqxcb.so" : "Cannot load library /opt/libitems/plugins/platforms/libqxcb.so: (libQt5XcbQpa.so.5: cannot open shared object file: No such file or directory)" This application failed to start because it could not find or load the Qt platform plugin "xcb" in "". Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb. Reinstalling the application may fix this problem. Aborted
why this library libQt5XcbQpa.so.5 is not loaded from the folder where other library? QMAKE_LFLAGS += -Wl,-rpath /opt/libitems/libx64/
how to solve this problem?
Thank you for attention. -
Hi, starting with Qt 5.5, the plugin file libqxcb.so has a rpath of its own (regardless of you specifying QMAKE_LFLAGS in your .pro file or not), that's why it doesn't see the libQt5XcbQpa.so file.
In Qt 5.6 and this can be fixed easy, by placing the .so files that libqxcb.so needs for itself together with it in the platforms subdirectory. So, in the platforms subdirectory, put these files
libqxcb.so libQt5XcbQpa.so.5 libQt5DBus.so.5
-
@hskoglund
Thank helped.