Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Compiling Qt5.14 for RaspberryPi4

  • Hi,

    I am trying to cross compile Qt5.14 ( git clone git:// -b 5.14) for the RaspberryPi4. I saw that in there is already an entry for linux-rasp-pi4-v3d-g++.

    I used Raspbian Buster installed via NOOBS to my raspberry, and mount the raspberry via sshfs to /opt/raspberry/sysroot/. In order to avoid problems with symbolic links I ran "sudo symlinks -cr ." in the root directory on my raspberry.

    For the toolchain I used (which should work according to

    This is the configure script I used:

    ./configure -release -opengl es2 -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=/opt/raspberry/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-  -sysroot /opt/raspberry/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /opt/raspberry/qt5pi -hostprefix /opt/raspberry/qt5pi_host -v

    However, configure reports the following problem

    ERROR: The OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
    QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

    Thus, I tried to follow the suggestion on and set the following variables in tbase/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf

    VC_LIBRARY_PATH         = $$[QT_SYSROOT]/opt/vc/lib
    VC_INCLUDE_PATH         = $$[QT_SYSROOT]/opt/vc/include
    QMAKE_INCDIR_EGL        = \
                            $${VC_INCLUDE_PATH} \
                            $${VC_INCLUDE_PATH}/interface/vcos/pthreads \

    and I also tried setting the following links:

    $ sudo ln -s
    $ sudo ln -s
    $ sudo ln -s
    $ sudo ln -s

    Still I get the same result.

  • Hi,

    did you have enabled fake kms driver through raspi-config?

  • What is KMS actually?

    I just tried to compile with enabling it in raspi-config, but it does not make a difference.

  • Read the full verbose log for the exact check that fails. Make sure you have all required development packages installed.

  • Ok,
    Start from scratch with the latest Raspian Image Light

    Enable fkms, by raspi-config -> Advanced -> GL Driver.
    Add more graphic memory (256 for examble) by raspi-config -> Advanced -> Memory Split

    Install these packages:

    # qtbase
    sudo apt-get install libboost1.58-all-dev libudev-dev libinput-dev libts-dev libmtdev-dev libjpeg-dev libfontconfig1-dev libssl-dev libdbus-1-dev libglib2.0-dev libxkbcommon-dev libegl1-mesa-dev libgbm-dev libgles2-mesa-dev mesa-common-dev
    # qtmultimedia
    sudo apt-get install libasound2-dev libpulse-dev gstreamer1.0-omx libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev  gstreamer1.0-alsa
    # qtwebengine
    sudo apt-get install libvpx-dev libsrtp0-dev libsnappy-dev libnss3-dev

  • I installed the suggested libraries, but it does not change anything. Does it have something to do with this?

  • Have you enabled fmks driver?
    Have you made a re-sync of the sysroot after have installed the plugins on the raspberry?
    Are you started from scratch?Make a git clean -dfx before execute the configure command.

  • Hm, I might be mistaken, I guess installing the above libraries changed something. I will report more later

  • I succeeded in compiling Qt 5.14. After I compiled, I tried to cross compile a program for the Raspberry. This also worked, but when executing the program on the Raspberry I got a complaint that it could not find I set LD_LIBRARY_PATH correctly, but in the lib directory, there are the Qt libraries but no library for QuickControls2. Do I need to set an option to build it? I also wonder how it was possible to compile if this library was missing

  • The problem was that cross compilation was successfull but make install had an error relating to qt3d, thus the quickcontrols2 dll did not get copied to the right directory

Log in to reply