Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Why Qt platform plugin “xcb” cannot be loaded even though it was found?
Qt 6.12 LTS is out! See what's new in the release blog

Why Qt platform plugin “xcb” cannot be loaded even though it was found?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
18 Posts 5 Posters 17.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rrd0
    wrote on last edited by rrd0
    #3
    $ ldd /usr/local/qt5pi/plugins/platforms/libqxcb.so 
    	linux-vdso.so.1 (0x7ed71000)
    	/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76fb7000)
    	libQt5XcbQpa.so.5 => /usr/local/qt5pi/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x76e22000)
    	libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0x76dc7000)
    	libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x76d2c000)
    	libQt5Gui.so.5 => /usr/local/qt5pi/plugins/platforms/../../lib/libQt5Gui.so.5 (0x76846000)
    	libQt5DBus.so.5 => /usr/local/qt5pi/plugins/platforms/../../lib/libQt5DBus.so.5 (0x767c5000)
    	libQt5Core.so.5 => /usr/local/qt5pi/plugins/platforms/../../lib/libQt5Core.so.5 (0x76254000)
    	libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x7622f000)
    	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76206000)
    	libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x760e3000)
    	libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0x760d1000)
    	libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0x760b8000)
    	libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x76089000)
    	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76076000)
    	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x75f2e000)
    	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x75eaf000)
    	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x75e82000)
    	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x75d43000)
    	libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0x75d31000)
    	libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x75c29000)
    	libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0x75bf5000)
    	/lib/ld-linux-armhf.so.3 (0x76fcd000)
    	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x75bce000)
    	libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0x75b94000)
    	libdbus-1.so.3 => /lib/arm-linux-gnueabihf/libdbus-1.so.3 (0x75b41000)
    	libdouble-conversion.so.1 => /usr/lib/arm-linux-gnueabihf/libdouble-conversion.so.1 (0x75b1f000)
    	libEGL.so => /opt/vc/lib/libEGL.so (0x75ae6000)
    	libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x75abf000)
    	libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x75aa9000)
    	libvcos.so => /opt/vc/lib/libvcos.so (0x75a90000)
    	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x75a79000)
    	libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x75a6c000)
    	libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x75a57000)
    	libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x759de000)
    	libsystemd.so.0 => /lib/arm-linux-gnueabihf/libsystemd.so.0 (0x75964000)
    	libbsd.so.0 => /lib/arm-linux-gnueabihf/libbsd.so.0 (0x7593b000)
    	libselinux.so.1 => /lib/arm-linux-gnueabihf/libselinux.so.1 (0x75908000)
    	liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x758d7000)
    	liblz4.so.1 => /usr/lib/arm-linux-gnueabihf/liblz4.so.1 (0x758b6000)
    	libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0x757e5000)
    	libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x757c3000)
    

    Is something wrong?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Hi,

      Not seeing anything obvious right now.

      One thing you can do is start your application with the "QT_DEBUG_PLUGINS" environment variable set to 1 and you'll get information about what is going on with the plugins.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      3
      • SGaistS SGaist

        Hi,

        Not seeing anything obvious right now.

        One thing you can do is start your application with the "QT_DEBUG_PLUGINS" environment variable set to 1 and you'll get information about what is going on with the plugins.

        R Offline
        R Offline
        rrd0
        wrote on last edited by rrd0
        #5

        @SGaist

        Here's the whole output with QT_DEBUG_PLUGINS=1:

        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
        }
        
        
        Got keys from plugin meta data ("webgl")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqxcb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "xcb"
                ]
            },
            "archreq": 0,
            "className": "QXcbIntegrationPlugin",
            "debug": false,
            "version": 330752
        }
        
        
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins" ...
        QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory" ...
        QFactoryLoader::QFactoryLoader() looking at "/home/user/app-directory/app"
        "Failed to extract plugin meta data from '/home/user/app-directory/app'" 
                 not a plugin
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms/platforms" ...
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
        Got keys from plugin meta data ("eglfs")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so"
        Got keys from plugin meta data ("linuxfb")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so"
        Got keys from plugin meta data ("minimal")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so"
        Got keys from plugin meta data ("minimalegl")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so"
        Got keys from plugin meta data ("offscreen")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqvnc.so"
        Got keys from plugin meta data ("vnc")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqwebgl.so"
        Got keys from plugin meta data ("webgl")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory/platforms" ...
        Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
        Do you need "set solib-search-path" or "set sysroot"?loaded library "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        qt.qpa.xcb: could not connect to display 
        qt.qpa.xcb: could not connect to display 
        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" 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 (from /usr/local/qt5pi/plugins/platforms), linuxfb (from /usr/local/qt5pi/plugins/platforms), minimal (from /usr/local/qt5pi/plugins/platforms), minimalegl (from /usr/local/qt5pi/plugins/platforms), offscreen (from /usr/local/qt5pi/plugins/platforms), vnc (from /usr/local/qt5pi/plugins/platforms), webgl (from /usr/local/qt5pi/plugins/platforms), xcb (from /usr/local/qt5pi/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
        

        TL;DR:

        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqxcb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "xcb"
                ]
            },
            "archreq": 0,
            "className": "QXcbIntegrationPlugin",
            "debug": false,
            "version": 330752
        }
        
        
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins" ...
        QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory" ...
        QFactoryLoader::QFactoryLoader() looking at "/home/user/app-directory/app"
        "Failed to extract plugin meta data from '/home/user/app-directory/app'" 
                 not a plugin
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms/platforms" ...
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
        Got keys from plugin meta data ("eglfs")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so"
        Got keys from plugin meta data ("linuxfb")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so"
        Got keys from plugin meta data ("minimal")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so"
        Got keys from plugin meta data ("minimalegl")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so"
        Got keys from plugin meta data ("offscreen")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqvnc.so"
        Got keys from plugin meta data ("vnc")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqwebgl.so"
        Got keys from plugin meta data ("webgl")
        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory/platforms" ...
        Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
        Do you need "set solib-search-path" or "set sysroot"?loaded library "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
        qt.qpa.xcb: could not connect to display 
        qt.qpa.xcb: could not connect to display 
        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" 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 (from /usr/local/qt5pi/plugins/platforms), linuxfb (from /usr/local/qt5pi/plugins/platforms), minimal (from /usr/local/qt5pi/plugins/platforms), minimalegl (from /usr/local/qt5pi/plugins/platforms), offscreen (from /usr/local/qt5pi/plugins/platforms), vnc (from /usr/local/qt5pi/plugins/platforms), webgl (from /usr/local/qt5pi/plugins/platforms), xcb (from /usr/local/qt5pi/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
        
        Pablo J. RoginaP 1 Reply Last reply
        0
        • R rrd0

          @SGaist

          Here's the whole output with QT_DEBUG_PLUGINS=1:

          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
          }
          
          
          Got keys from plugin meta data ("webgl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqxcb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "xcb"
                  ]
              },
              "archreq": 0,
              "className": "QXcbIntegrationPlugin",
              "debug": false,
              "version": 330752
          }
          
          
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/user/app-directory/app"
          "Failed to extract plugin meta data from '/home/user/app-directory/app'" 
                   not a plugin
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms/platforms" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
          Got keys from plugin meta data ("eglfs")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so"
          Got keys from plugin meta data ("linuxfb")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so"
          Got keys from plugin meta data ("minimal")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so"
          Got keys from plugin meta data ("minimalegl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so"
          Got keys from plugin meta data ("offscreen")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqvnc.so"
          Got keys from plugin meta data ("vnc")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqwebgl.so"
          Got keys from plugin meta data ("webgl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory/platforms" ...
          Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
          Do you need "set solib-search-path" or "set sysroot"?loaded library "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          qt.qpa.xcb: could not connect to display 
          qt.qpa.xcb: could not connect to display 
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" 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 (from /usr/local/qt5pi/plugins/platforms), linuxfb (from /usr/local/qt5pi/plugins/platforms), minimal (from /usr/local/qt5pi/plugins/platforms), minimalegl (from /usr/local/qt5pi/plugins/platforms), offscreen (from /usr/local/qt5pi/plugins/platforms), vnc (from /usr/local/qt5pi/plugins/platforms), webgl (from /usr/local/qt5pi/plugins/platforms), xcb (from /usr/local/qt5pi/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
          

          TL;DR:

          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqxcb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "xcb"
                  ]
              },
              "archreq": 0,
              "className": "QXcbIntegrationPlugin",
              "debug": false,
              "version": 330752
          }
          
          
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/user/app-directory/app"
          "Failed to extract plugin meta data from '/home/user/app-directory/app'" 
                   not a plugin
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms/platforms" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
          Got keys from plugin meta data ("eglfs")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so"
          Got keys from plugin meta data ("linuxfb")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so"
          Got keys from plugin meta data ("minimal")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so"
          Got keys from plugin meta data ("minimalegl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so"
          Got keys from plugin meta data ("offscreen")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqvnc.so"
          Got keys from plugin meta data ("vnc")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqwebgl.so"
          Got keys from plugin meta data ("webgl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/user/app-directory/platforms" ...
          Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
          Do you need "set solib-search-path" or "set sysroot"?loaded library "/usr/local/qt5pi/plugins/platforms/libqxcb.so"
          qt.qpa.xcb: could not connect to display 
          qt.qpa.xcb: could not connect to display 
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" 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 (from /usr/local/qt5pi/plugins/platforms), linuxfb (from /usr/local/qt5pi/plugins/platforms), minimal (from /usr/local/qt5pi/plugins/platforms), minimalegl (from /usr/local/qt5pi/plugins/platforms), offscreen (from /usr/local/qt5pi/plugins/platforms), vnc (from /usr/local/qt5pi/plugins/platforms), webgl (from /usr/local/qt5pi/plugins/platforms), xcb (from /usr/local/qt5pi/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
          
          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #6

          @rrd0 from your error log please see entries like this

          qt.qpa.xcb: could not connect to display

          that coupled with the way you said you're starting your app

          when I try to run the same app from a remote debug session

          seems to me that you're not using a SSH session with X Forwarding... don't forget the -X parameter along with proper hosts authorization

          ssh -X user@hostname
          

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          R 1 Reply Last reply
          1
          • Pablo J. RoginaP Pablo J. Rogina

            @rrd0 from your error log please see entries like this

            qt.qpa.xcb: could not connect to display

            that coupled with the way you said you're starting your app

            when I try to run the same app from a remote debug session

            seems to me that you're not using a SSH session with X Forwarding... don't forget the -X parameter along with proper hosts authorization

            ssh -X user@hostname
            
            R Offline
            R Offline
            rrd0
            wrote on last edited by
            #7

            @Pablo-J.-Rogina

            I'm not using X forwarding. The app is displayed on the target. Just text (stdout and stderr, I guess) is displayed on my dev machine.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              You still have to configure things properly. You are starting your application remotely, so you have to configure your session so that your application tries to connect to the local X server.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              R 1 Reply Last reply
              1
              • SGaistS SGaist

                You still have to configure things properly. You are starting your application remotely, so you have to configure your session so that your application tries to connect to the local X server.

                R Offline
                R Offline
                rrd0
                wrote on last edited by rrd0
                #9

                @SGaist

                QtCreator has a tab to set Host, SHH port, username, key file, etc. But there's no box where I could enter that -X option.

                Could you give me some pointers?

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rrd0
                  wrote on last edited by
                  #10
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    I may be wrong but I don't think you currently can.

                    Out of curiosity, what is the reason for having a full X server running on your embedded target ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    R 1 Reply Last reply
                    0
                    • hskoglundH Offline
                      hskoglundH Offline
                      hskoglund
                      wrote on last edited by
                      #12

                      Hi, I also run Qt apps on my Raspberry Pi, and when I had problems using the -platform xcb to connect to them, I instead use -platform vnc works fine.
                      (On my PC I use vncviewer.exe to connect)

                      R 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        I may be wrong but I don't think you currently can.

                        Out of curiosity, what is the reason for having a full X server running on your embedded target ?

                        R Offline
                        R Offline
                        rrd0
                        wrote on last edited by rrd0
                        #13

                        @SGaist

                        I'm using X cause I tried (a lot) to run my apps on EGLFS with no success. I followed the RaspberryPi2EGLFS guide, from qt wiki, to build Qt for RPi, but never managed to make it work.

                        Do you know some other guide that could help me build Qt (EGLFS) for RPi?

                        P.S. Someone updated the RaspberryPi2EGLFS guide, so I'll give it a last try.

                        1 Reply Last reply
                        0
                        • hskoglundH hskoglund

                          Hi, I also run Qt apps on my Raspberry Pi, and when I had problems using the -platform xcb to connect to them, I instead use -platform vnc works fine.
                          (On my PC I use vncviewer.exe to connect)

                          R Offline
                          R Offline
                          rrd0
                          wrote on last edited by
                          #14

                          @hskoglund

                          I'll try that. Thanks!

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            Any chance you are having trouble using a Raspbian Stretch root filesystem ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            R 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Any chance you are having trouble using a Raspbian Stretch root filesystem ?

                              R Offline
                              R Offline
                              rrd0
                              wrote on last edited by
                              #16

                              @SGaist

                              What kind of trouble?

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #17

                                The EGLFS issue.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                R 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  The EGLFS issue.

                                  R Offline
                                  R Offline
                                  rrd0
                                  wrote on last edited by
                                  #18

                                  @SGaist

                                  Raspbian Stretch is the distribution used in RaspberryPi2EGLFS guide, and I followed each one of the steps described in that guide. So, I don't think there's something wrong with my root filesystem.

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt
                                  • Unsolved