qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Hello ,
I deploy my app on RPI3 with Raspbian OS .
when I try to run my App using XCB plugin I get this errorqt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
there is no XCB plugin .
What should I do !
thank you
-
@JonB When I run
QT_DEBUG_PLUGINS=1
there is no XCB plugin .
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqvnc.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqwebgl.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 330752 }
-
@dziko147
That would make your case different from every other person who has reported this error message....Since your diagnostic output reports no error and has nothing to say about xcb, who knows what might be required?
Let me verify one thing. Your error occurs when running the app deployed to RPi, right? So to be 100% sure, you are setting the environment variable on the RPi and running the diagnostic there, aren't you??
-
@dziko147 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
in Qtcreator
On RPi?
-
@dziko147 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
from source
Then probably XCB plug-in was not build because of missing dependencies. You should check config.log file to get more information.
-
@dziko147 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
in Host
Do you run your app from QtCreator remotely on your device?
-
@jsulm exact .
I checked my config.log
I found this :test config.qtbase_network.tests.openssl11 succeeded looking for library xkbcommon Trying source 0 (type pkgConfig) of library xkbcommon ... + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xkbcommon '>=' 0.5.0 + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion xkbcommon '>=' 0.5.0 > 0.8.2 + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L xkbcommon '>=' 0.5.0 > -L/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l xkbcommon '>=' 0.5.0 > -lxkbcommon + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags xkbcommon '>=' 0.5.0 + cd /home/**/raspi/config.tests/xkbcommon && PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /home/**/raspi/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/**/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/**/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/**/raspi/sysroot" -early "CONFIG += cross_compile" 'QMAKE_USE += xkbcommon' 'QMAKE_LIBS_XKBCOMMON = /home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so' /home/**/raspi/config.tests/xkbcommon + cd /home/**/raspi/config.tests/xkbcommon && MAKEFLAGS= /usr/bin/make > /home/**/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/**/raspi/sysroot --sysroot=/home/**/raspi/sysroot -O2 -std=gnu++11 -w -fPIC -I. -I/home/**/raspi/qt-everywhere-src-5.12.10/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o main.o main.cpp > /home/**/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/**/raspi/sysroot --sysroot=/home/**/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/**/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/**/raspi/sysroot/lib/arm-linux-gnueabihf -o xkbcommon main.o /home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so => source accepted. test config.qtbase_gui.libraries.xkbcommon succeeded looking for library xcb Trying source 0 (type pkgConfig) of library xcb ... + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xcb '>=' 1.9 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library xcb ... None of [libxcb.so libxcb.a] found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.xcb FAILED looking for library opengl_es2 Trying source 0 (type pkgConfig) of library opengl_es2 ... + PKG_CONFIG_SYSROOT_DIR=/home/**/raspi/sysroot PKG_CONFIG_LIBDIR=/home/**/raspi/sysroot/usr/lib/pkgconfig:/home/**/raspi/sysroot/usr/share/pkgconfig:/home/**/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors glesv2 pkg-config did not find package. => source produced no result.
-
@dziko147 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
I checked my config.log
I found this :What does it say about the xcb library? Does that give you any clues?