Build Qt 5.12 on RPi

Building Qt 5.10 for Raspberry Pi on Debian Stretch | TalOrg

wget http://download.qt.io/official_releases/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz

tar xf qt-everywhere-src-5.12.0.tar.xz

sudo apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libraspberrypi-dev

rpi-update

reboot

Outside of Qt root

mkdir build && cd build

Run configure NOTE: I you use some option other than linux-rasp-pi-g++ you may have trouble getting EGLFS working correctly. Also, by using this compiler you can run on all RPi platforms.

PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig \  
PKG_CONFIG_SYSROOT_DIR=/ \  
QMAKE_INCDIR_OPENGL=/opt/vc/lib \  
QMAKE_LIBDIR_OPENGL=/opt/vc/lib \  
QMAKE_INCDIR_OPENGL_ES2=/opt/vc/lib \  
QMAKE_LIBDIR_OPENGL_ES2=/opt/vc/lib \  
../qt-everywhere-src-5.12.0/configure -v -opengl es2 -eglfs -no-gtk \
-device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ \
-opensource -confirm-license -release -reduce-exports \
-force-pkg-config -no-kms -nomake examples -no-compile-examples -no-pch \
-skip qtwayland -skip qtwebengine -no-feature-geoservices_mapboxgl \
-qt-pcre -ssl -evdev -system-freetype -fontconfig -glib -prefix /opt/Qt5.12

Only use make -j2 to conserve memory
make -j2 make install

Done
qmake path /opt/Qt5.12/bin/qmake

comments powered by Disqus