Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Is it bug in src or I make mistook when install QT from git sources? qt.qpa.plugin: Could not load the Qt platform plugin "xcb".



  • Hello! Could you help me?
    I installed QT 5.15.2 from git source codes (). I run project and get the following message :

    00:02:48: Starting /home/pavel/programming/C++/build-mandelbrot-QT5_15_2-Debug/mandelbrot...
    qt.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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    
    00:02:48: The program has unexpectedly finished.
    00:02:48: The process was ended forcefully.
    00:02:48: /home/pavel/programming/C++/build-mandelbrot-QT5_15_2-Debug/mandelbrot crashed.
    

    I am using:
    Debian GNU/Linux 10 (buster) 4.19.0-12-amd64;
    QT 5.15.2;
    QT.png


  • Lifetime Qt Champion

    @xruss Set QT_DEBUG_PLUGINS before starting your app and check the output. See https://doc.qt.io/qt-5/debug.html



  • @xruss
    This gets asked over & over. First, Google for your message: there are many hits, both in this forum and elsewhere. I forget exactly what, but under Linux there is a particular package you have to apt-get, something about libxcb-xinerama.so I think is the most likely nowadays. Otherwise do export QT_DEBUG_PLUGINS=1 in a terminal/Qt Creator environment variables and launch your app for diagnostic information.



  • libxcb-xinerama0 (1.13.1-2) is already installed.
    The log of QT_DEBUG_PLUGINS is too long. I saved it here:
    term_qt_debug.txt


  • Lifetime Qt Champion

    @xruss You need to start your app after setting QT_DEBUG_PLUGINS, not QtCreator.



  • @jsulm In last string of log "Emergency Stop".

    pavel@dell-notebook:~/programming/C++/build-mandelbrot-Desktop-Debug$ export QT_DEBUG_PLUGINS=1
    pavel@dell-notebook:~/programming/C++/build-mandelbrot-Desktop-Debug$ ./mandelbrot 
    QFactoryLoader::QFactoryLoader() checking directory path "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqeglfs.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqminimal.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqvnc.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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 "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-egl.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-egl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-egl"
            ]
        },
        "archreq": 0,
        "className": "QWaylandEglPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-egl")
    QFactoryLoader::QFactoryLoader() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-generic.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-generic.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland"
            ]
        },
        "archreq": 0,
        "className": "QWaylandIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland")
    QFactoryLoader::QFactoryLoader() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-xcomposite-egl.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-xcomposite-egl"
            ]
        },
        "archreq": 0,
        "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-xcomposite-egl")
    QFactoryLoader::QFactoryLoader() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-xcomposite-glx.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-xcomposite-glx"
            ]
        },
        "archreq": 0,
        "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-xcomposite-glx")
    QFactoryLoader::QFactoryLoader() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqwebgl.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/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() looking at "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqxcb.so"
    Found metadata in lib /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 330499
    }
    
    
    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/home/pavel/programming/C++/build-mandelbrot-Desktop-Debug/platforms" ...
    Cannot load library /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
    QLibraryPrivate::loadPlugin failed on "/home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqxcb.so" : "Cannot load library /home/pavel/PO/qt5/qt5-build/target/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
    qt.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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    
    Аварийный останов
    
    

  • Lifetime Qt Champion

    Hi,

    Looks like you are mixing your system Qt 5 with your custom build.

    How did you setup your kit ?



  • @SGaist I try to rebuild QT by this instruction https://wiki.qt.io/Building_Qt_5_from_Git .
    Is IDE QTCreator including in this sources or not?


  • Lifetime Qt Champion

    No, Qt Creator is an independent project.



  • @SGaist Could you tell me where sources of QTCreator? when i try install it (apt install qtcreator) he pulls dependent packages (which are already built in QT):

    pavel@dell-notebook:~/Загрузки$ sudo apt install qtcreator
    [sudo] пароль для pavel: 
    Чтение списков пакетов… Готово
    Построение дерева зависимостей       
    Чтение информации о состоянии… Готово
    Будут установлены следующие дополнительные пакеты:
     gdb libbabeltrace1 libc6-dbg libipt2 libqbscore1.12 libqbsqtprofilesetup1.12
     libqt5concurrent5 libqt5quicktest5 libqt5script5 libqt5serialport5
     libqt5test5 libqt5xmlpatterns5 qbs-common qml-module-qtqml-models2 qmlscene
     qt3d5-doc qt5-doc qt5-qmltooling-plugins qtbase5-dev-tools qtbase5-doc
     qtcharts5-doc qtconnectivity5-doc qtcreator-data qtcreator-doc
     qtdeclarative5-dev-tools qtdeclarative5-doc qtgraphicaleffects5-doc
     qtlocation5-doc qtmultimedia5-doc qtquickcontrols2-5-doc
     qtquickcontrols5-doc qtscript5-doc qtsensors5-doc qtserialport5-doc
     qtsvg5-doc qttools5-doc qtvirtualkeyboard5-doc qtwayland5-doc
     qtwebchannel5-doc qtwebengine5-doc qtwebsockets5-doc qtwebview5-doc
     qtx11extras5-doc qtxmlpatterns5-dev-tools qtxmlpatterns5-doc
    
    

  • Lifetime Qt Champion



  • @SGaist Thank you all for your answers. after rebuilding QT everything works well.


Log in to reply