Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Application failed to start because it could not find or load the Qt platform plugin "linuxfb"
Forum Updated to NodeBB v4.3 + New Features

Application failed to start because it could not find or load the Qt platform plugin "linuxfb"

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 4 Posters 3.7k 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.
  • K Offline
    K Offline
    Kevin.Wu
    wrote on last edited by
    #1

    Hi Guys.
    I cross compiled the Qt5.5.1 source code on a Ubuntu machine, and run the executable file on a embedded ARM. All the .so files I need is accessed using NFS. I wrote a simple demo to check if the work is right , but I just got the error:
    Application failed to start because it could not find or load the Qt platform plugin "linuxfb" !

    I checked the environment variables I may need to change :
    export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
    export QT_DEBUG_PLUGINS=1
    export QTDIR=my NFS path/Qt5.5.1
    export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/platforms
    export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
    export QT_PLUGIN_PATH=$QTDIR/plugins/platforms/

    The log when I run the demo :

    QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 328961
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so"
    Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 328961
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 328961
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/mg-samples-3.0.12/src/qt/platforms" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/platforms" ...
    This application failed to start because it could not find or load the Qt platform plugin "linuxfd".
    
    Available platform plugins are: linuxfb (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms), minimal (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms), offscreen (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms).
    
    Reinstalling the application may fix this problem.
    Aborted
    

    I think I've placed the .so libs at the right place. But I don't know why I get this ? How can I fixed it ?
    Thanks.

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

      Hi, it says "linuxfd", if you started your app using the -platform switch, maybe there's a misspelling, say;
      "yourapp -platform linuxfd" instead of "yourapp -platform linuxfb"

      1 Reply Last reply
      1
      • K Offline
        K Offline
        Kevin.Wu
        wrote on last edited by
        #3

        Sorry for misspelling.. It's the same error when I corrected it..But this time the log says:

        QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms" ...
        QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so"
        Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "linuxfb"
                ]
            },
            "className": "QLinuxFbIntegrationPlugin",
            "debug": false,
            "version": 328961
        }
        
        
        Got keys from plugin meta data ("linuxfb")
        QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so"
        Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "minimal"
                ]
            },
            "className": "QMinimalIntegrationPlugin",
            "debug": false,
            "version": 328961
        }
        
        
        Got keys from plugin meta data ("minimal")
        QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so"
        Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "offscreen"
                ]
            },
            "className": "QOffscreenIntegrationPlugin",
            "debug": false,
            "version": 328961
        }
        
        
        Got keys from plugin meta data ("offscreen")
        loaded library "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so"
        QLibraryPrivate::loadPlugin failed on "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so" : "Cannot load library /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so: (**File not found**)"
        QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/mg-samples-3.0.12/src/qt/platforms" ...
        QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/platforms" ...
        This application failed to start because it could not find or load the Qt platform plugin "linuxfb".
        

        libqlinuxfb.so (FIle not found), but I got these libs at the env variable.
        ls /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms
        libqlinuxfb.so libqminimal.so libqoffscreen.so
        I don't know what happened..

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

          Hi,

          Might be a silly question but did you install your cross-compiled Qt on your device ?

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

          K 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Might be a silly question but did you install your cross-compiled Qt on your device ?

            K Offline
            K Offline
            Kevin.Wu
            wrote on last edited by
            #5

            @SGaist
            I installed my .so libs and app on the Ubuntu. And I run and loaded the libs using NFS.
            I found the function "load_sys" in qlibrary_unix.cpp:
            pHnd = dlopen(QFile::encodeName(attempt), dlFlags);
            always return NULL, the error is : File not Found...But the .so file is just here.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kevin.Wu
              wrote on last edited by
              #6

              I ‘ve fixed this error’. I add a third party .so in libqlinux.so, but I forgot to set the LD_LIBRARY_PATH to include that .so file. It's really a silly question..sry .

              Pablo J. RoginaP 1 Reply Last reply
              0
              • K Kevin.Wu

                I ‘ve fixed this error’. I add a third party .so in libqlinux.so, but I forgot to set the LD_LIBRARY_PATH to include that .so file. It's really a silly question..sry .

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @Kevin.Wu glad you figured out the fix. If your issue is solved please don't forget to mark your post as such. Thanks

                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

                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 Extensions
                • Unsolved