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

Cross-Compile RPi3 with Qt5.7



  • the problem is same as others on RPi3 for a simple window with no word, no fonts needed:

    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).

    tool chain gcc-linaro-arm-linux-gnueabihf-raspbian-x64
    plattform: ubuntu 16.10 x64
    rpi3: raspbian jess, PIXEL - (2017-01-11 ), and many others

    Really do not know why everyone has the same problem even they followed the instructions

    Anyone who could sovlve it , please help. thanks



  • even I followed this instruction
    https://forum.qt.io/topic/75228/crosscompile-qt5-7-additional-dependencies

    on RPi3 it replied
    This application failed to start because it could not find or load the Qt platform plugin "eglfs"
    in "".
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
    Reinstalling the application may fix this problem.
    Aborted

    plattform: ubuntu 16.10 x64
    rpi3: raspbian jess, PIXEL - (2017-01-11 )


  • Lifetime Qt Champion

    Hi,

    You should run your application with the QT_DEBUG_PLUGINS environment variable set to 1 to see what is happening with the loading of the platform plugin.



  • Hi @SGaist thx for your suggestion

    on the RPi3
    1 export QT_DEBUG_PLUGINS=1
    2 ./qopenglwidget

    it replied the following, but how to deal with it?

    ================================================
    ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by ./qopenglwidget)
    ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by ./qopenglwidget)
    ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by ./qopenglwidget)
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "eglfs"
    ]
    },
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqkms.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqkms.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "kms"
    ]
    },
    "className": "QKmsIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("kms")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "linuxfb"
    ]
    },
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "minimalegl"
    ]
    },
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
    Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
    "Keys": [
    "xcb"
    ]
    },
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 328450
    }

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/platforms" ...
    loaded library "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
    QXcbConnection: Could not connect to display
    Aborted



  • tried ubuntu 16.04 x64
    same instructions with -qt-xcb
    still not work any way

    Hi @SGaist, I wonder it might be the problem with RPi3. Because most instructions are based on RPi2.
    thx


  • Lifetime Qt Champion

    Without any other indication the xcb plugin is loaded however it seems you don't have any X server running or do you ?



  • Hi @SGaist, thx
    Would you please give any instruction about the X server setting or something that could make the app run on the RPi3?
    Just follow the instruction from Qt, but it has no effect.

    thx


  • Lifetime Qt Champion

    Do you want to have your application running alone on your Pi or have it run in a desktop environment like on your desktop computer ?



  • Hi @SGaist, thx
    I wish the app could be cross-compiled on the x86 or x64 Desktop PC, and then it could run on the RPi3, full window or only window are both acceptable.
    1 running alone on RPi
    2 have it run in a desktop environment like on desktop computer
    So how should I do for these two kinds? I would like to try for this two different situations.
    Would you please give me some suggestion in detail? I am new to RPi cross-compile.
    thx


  • Qt Champions 2019

    @iiiwww Regarding2: do you have a desktop environment on your RPi? If not install one (for example Pixel or LXDE or whatever you like) and then try to run your app.
    See here https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691
    For LXDE:

    sudo apt-get install lxde-core lxappearance
    

  • Lifetime Qt Champion

    And for one you need to use one of the other backend, eglfs for example.



  • thx @jsulm I use raspbian with PIXEL

    @SGaist I have tried every way , but it seemed not work on my RPi 3, the error above were what I met even with raspbian PIXEL, really have no idea how to deal with them.
    so I wonder if you could give me some suggestion with detaileds.

    thx


Log in to reply