RaspberryPi Qt 5.15.2: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" * failed to add service - already in use?
-
I know there are many similar questions, but all the solutions I tried did not work. I could find nothing wrong with the ldd command:
ldd /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/platforms/libqxcb.so linux-vdso.so.1 (0xbeee6000) /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f67000) libQt5XcbQpa.so.5 => /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0xb6e4c000) libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb6de7000) libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb6d44000) libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6d19000) libQt5Gui.so.5 => /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/platforms/../../lib/libQt5Gui.so.5 (0xb6761000) libQt5DBus.so.5 => /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/platforms/../../lib/libQt5DBus.so.5 (0xb66cb000) libQt5Core.so.5 => /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/platforms/../../lib/libQt5Core.so.5 (0xb615e000) libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0xb613f000) libEGL.so.1 => /usr/lib/arm-linux-gnueabihf/libEGL.so.1 (0xb6120000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb60f6000) libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0xb60e4000) libxcb-icccm.so.4 => /usr/lib/arm-linux-gnueabihf/libxcb-icccm.so.4 (0xb60d0000) libxcb-image.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-image.so.0 (0xb60bc000) libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0xb60a9000) libxcb-util.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-util.so.0 (0xb6094000) libxcb-keysyms.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb-keysyms.so.1 (0xb6081000) libxcb-randr.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-randr.so.0 (0xb6064000) libxcb-render-util.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render-util.so.0 (0xb6050000) libxcb-render.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render.so.0 (0xb6035000) libxcb-shape.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shape.so.0 (0xb6022000) libxcb-sync.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb-sync.so.1 (0xb600c000) libxcb-xfixes.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-xfixes.so.0 (0xb5ff5000) libxcb-xinerama.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-xinerama.so.0 (0xb5fe2000) libxcb-xkb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb-xkb.so.1 (0xb5fbd000) libxcb-xinput.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-xinput.so.0 (0xb5f93000) libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb5f64000) libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb5f45000) libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb5e23000) libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0xb5e0c000) libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0xb5de6000) libxkbcommon-x11.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon-x11.so.0 (0xb5dcf000) libxkbcommon.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0 (0xb5d86000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb5d73000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb5c2c000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb5baa000) libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb5b7d000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb5a2f000) libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0xb5a1d000) libglib-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb590d000) libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb58cc000) libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xb58b5000) /lib/ld-linux-armhf.so.3 (0xb6f8f000) libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0xb5879000) libdbus-1.so.3 => /lib/arm-linux-gnueabihf/libdbus-1.so.3 (0xb5828000) libicui18n.so.63 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.63 (0xb55da000) libicuuc.so.63 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.63 (0xb5454000) libicudata.so.63 => /usr/lib/arm-linux-gnueabihf/libicudata.so.63 (0xb3a56000) libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb39d7000) libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb39c4000) libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb39af000) libbsd.so.0 => /usr/lib/arm-linux-gnueabihf/libbsd.so.0 (0xb3987000) libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb3910000) libsystemd.so.0 => /lib/arm-linux-gnueabihf/libsystemd.so.0 (0xb3873000) librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb385c000) liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0xb382b000) liblz4.so.1 => /usr/lib/arm-linux-gnueabihf/liblz4.so.1 (0xb37ff000) libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0xb3725000) libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0xb36fb000)
The output of the ls command is the following:
ls -l /home/pi/qt-raspberrypi-configuration/build/qtbase/plugins/ total 36 drwxr-xr-x 2 pi pi 4096 Jul 10 18:52 bearer drwxr-xr-x 2 pi pi 4096 Jul 10 18:55 egldeviceintegrations drwxr-xr-x 2 pi pi 4096 Jul 10 18:53 generic drwxr-xr-x 2 pi pi 4096 Jul 10 18:52 imageformats drwxr-xr-x 2 pi pi 4096 Jul 10 18:50 platforminputcontexts drwxr-xr-x 2 pi pi 4096 Jul 10 18:55 platforms drwxr-xr-x 2 pi pi 4096 Jul 10 18:50 platformthemes drwxr-xr-x 2 pi pi 4096 Jul 10 18:51 sqldrivers drwxr-xr-x 2 pi pi 4096 Jul 10 18:55 xcbglintegrations
I have tried setting QT_DEBUG_PLUGINS to 1, but I got no additional information.
I downloaded and set up Qt 5.15.2 here. Please note that I have downloaded all the X11 suport.If it helps, my qt-everywhere-src-5.15.2 folder is in /home/pi and so is my qt-raspberrypi-configuration. My QtCreator version is Qt Creator 4.8.2
Based on Qt 5.11.3 (GCC 8.3.0, 32 bit).Does anyone know how to fix this? Anyone need more information?
-
Hi and welcome to devnet,
Did you call make install after building Qt ?
-
What did you got related to xcb in your plugins debug messages ?
-
@CaptainHatteras said in RaspberryPi Qt 5.15.2: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" * failed to add service - already in use?:
QT_DEBUG_PLUGINS
With it, you should have a truck load of messages on your console with regard to all the plugins being loaded. If not, there there's something off.
-
@CaptainHatteras said in RaspberryPi Qt 5.15.2: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" * failed to add service - already in use?:
Is this incorrect?
No, its wrong.
You need to put it in terminal where you start your app before you start it.
If you start your app in QtCreator then add it in "Projects/Run/Run Environment". -
@jsulm Hi, sorry for the wait. Thank you for the correction. Here is the last part of the QT_DEBUG_PLUGINS output:
QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/dev/cpp_projects/build-QtMotoFitAppBG-Desktop-Debug/egldeviceintegrations" ... loaded library "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" * failed to add service - already in use? QLibraryPrivate::unload succeeded on "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" QLibraryPrivate::unload succeeded on "/opt/Qt/5.15.2/plugins/platforms/libqeglfs.so"
Here is the full message:
QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/5.15.2/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqeglfs.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqlinuxfb.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqminimal.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqminimalegl.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqoffscreen.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqvnc.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platforms/libqwebgl.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/dev/cpp_projects/build-QtMotoFitAppBG-Desktop-Debug/platforms" ... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" loaded library "/opt/Qt/5.15.2/plugins/platforms/libqeglfs.so" QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/5.15.2/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/platformthemes/libqxdgdesktopportal.so" Found metadata in lib /opt/Qt/5.15.2/plugins/platformthemes/libqxdgdesktopportal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "xdgdesktopportal", "flatpak", "snap" ] }, "archreq": 0, "className": "QXdgDesktopPortalThemePlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("xdgdesktopportal", "flatpak", "snap") QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/dev/cpp_projects/build-QtMotoFitAppBG-Desktop-Debug/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/5.15.2/plugins/egldeviceintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" Found metadata in lib /opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_brcm" ] }, "archreq": 0, "className": "QEglFSBrcmIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_brcm") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-emu-integration.so" Found metadata in lib /opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-emu-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_emu" ] }, "archreq": 0, "className": "QEglFSEmulatorIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_emu") QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" Found metadata in lib /opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-kms-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms" ] }, "archreq": 0, "className": "QEglFSKmsGbmIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_kms") QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/dev/cpp_projects/build-QtMotoFitAppBG-Desktop-Debug/egldeviceintegrations" ... loaded library "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" * failed to add service - already in use? QLibraryPrivate::unload succeeded on "/opt/Qt/5.15.2/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" QLibraryPrivate::unload succeeded on "/opt/Qt/5.15.2/plugins/platforms/libqeglfs.so"
-
@CaptainHatteras
I'm afraid it means nothing to me, but Googlinglibqeglfs failed to add service already in use
do these help: