QT application failed to start in Wand board.



  • I have compiled a QT application using QT 5.9.1 version.
    When I'm running the application on Wand board and I'm getting below error.

    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    
    Available platform plugins are: linuxfb, minimal, offscreen, xcb.
    
    Reinstalling the application may fix this problem. 
    Aborted (core dumped)
    

    I have followed below links still couldn't find the solution.

    https://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without
    https://stackoverflow.com/questions/29405689/qt-5-4-1-this-application-failed-to-start-because-it-could-not-find-or-load-th
    https://stackoverflow.com/questions/36117748/qt-linux-gcc-wl-rpath-origin-not-working-for-platform-plugin-xcb

    Please let me know any other details required.
    Thanks for the support.


  • Moderators

    @bani Start your app with QT_DEBUG_PLUGINS environment variable set and see what exactly is the problem.
    Do you have X server installed on the target?



  • Hi @jsulm
    Sorry for the late reply.

    Here is the log. Yes I have the X server installed.

    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqeglfs.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqeglfs.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "eglfs"
            ]
        },
        "className": "QEglFSIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqlinuxfb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimalegl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimalegl"
            ]
        },
        "className": "QMinimalEglIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqvnc.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqvnc.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "vnc"
            ]
        },
        "className": "QVncIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqxcb.so"
    Found metadata in lib /usr/lib/qt/plugins/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 329985
    }
    
    
    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/tmp/platforms" ...
    Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format)
    QLibraryPrivate::loadPlugin failed on "/usr/lib/qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format)"
    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, vnc, xcb.
    
    Reinstalling the application may fix this problem.
    Aborted (core dumped)
    
    

    Thanks,


  • Moderators

    @bani said in QT application failed to start in Wand board.:

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/tmp/platforms" ...
    Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format)
    QLibraryPrivate::loadPlugin failed on "/usr/lib/qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format)"
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".

    You said you compiled Qt by yourself, right? Where did you install it?
    I'm not sure why Qt looks in /tmp/platforms
    /usr/lib/qt/plugins/platforms/libqxcb.so cannot be loaded because of an undefined symbol in /usr/lib/libQt5XcbQpa.so.5

    Do you have more than one Qt version?



  • @jsulm said in QT application failed to start in Wand board.:

    QFactoryLoader

    Hi @jsulm

    I didn't compile QT and directly installed the commercial version via installer.
    However I'm running my sample app which is compiled using QT creator.
    The app is running from /tmp directory.


  • Moderators

    @bani Then your app is using wrong Qt libs:

    /usr/lib/qt/plugins
    /usr/lib/libQt5XcbQpa.so.5
    

    Those look like Qt5 installation provided by your Linux distribution.
    If you want start your app outside of QtCreator and let it use correct Qt then take a look at http://doc.qt.io/qt-5/linux-deployment.html as you need to deploy your app first.



  • @jsulm said in QT application failed to start in Wand board.:

    app

    You are correct. I have installed QT on wandboard Arch distribution using package manager. I'll follow the links and let you know.

    Thanks for the support.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.