Qt on Raspberry pi3
-
Well, compilation works for 5.10, 5.9 - they simply compile and work. With Qt 5.11.1, I've just tried and there seems to be a bug in QGeoMap.
If you want to try with 5.10:
You have to set up your toolchain and sysroot correctly, though. Follow the guide https://wiki.qt.io/RaspberryPi2EGLFS and you should be fine.Remember to get all the dependencies and to run the symlink fix afterwards. You may throw in some extra libs just to be sure:
sudo apt build-dep qt5-default qt5-qmake sudo apt install libiconv-hook-dev libinput-dev libts-dev bluez libbluetooth-dev libgstreamer1.0-dev libegl1-mesa # Optionally if it somehow still does not work: sudo apt install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
And turn on OpenGL driver in
raspi-config
,Here is my compilation script, if it helps:
export QTVER=5101 wget https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz tar -xaf qt-everywhere-src-5.10.1.tar.xz mv qt-everywhere-src-5.10.1 $QTVER-src cd $QTVER-build ../$QTVER-src/configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \ -device-option CROSS_COMPILE=/path/to/toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /path/to/sysroot \ -opensource -confirm-license -make libs -no-use-gold-linker \ -prefix /home/pi/qt/$QTVER -extprefix /path/to/qt-pi/$QTVER \ -hostprefix /path/to/$QTVER-qmake \ -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d \ -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard \ -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin \ -skip qtwebsockets make -j 8 make install
-
@sierdzio
Thank you so much for the reply, I think i'm also seeing the issue with qgeomap when doing 'make install' for 5.11.0. I'm trying to build qgroundcontrol for the raspberry and apparently it needs 5.11.0.
Do you know a solution for the qgeomap bug? -
@chek said in Qt on Raspberry pi3:
@sierdzio
[...]
Do you know a solution for the qgeomap bug?Not yet, but I will check it out.
I don't see it reported on Qt bugtracker yet.
-
Hi, I've compiled 5.10.1 for the pi and it works, but when I try to open the qt-project qt-creator complains about my compiler: Unsuported Linux toolchain, only GCC 32- or 64-bit is supported.
I'm using "gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf"
Do you know what this could be? -
Have you added the linaro compiler in Qt Creator's settings?
-
Hm so it should work. Please check if the kit really points to your cross-compiled Qt. I've made a mistake of not checking that many times already :D And Qt Creator seems to auto-set the Qt version wrongly sometimes.
-
@sierdzio I successfully compile Qt 5.10.1 on my raspberry pi 3 using the device "linux-rasp-pi3-vc4-g++", however, after activating the OPENGL driver on raspi-cofnig, when running the qopenglwidget example, it shows the error "Failed to create service, already in use?", I checked on the internet and everybody suggest to disable the vc4 drivers to get rid of the error, however, if I do that the eglfs will complain that it cannot find any GBM, and indeed, I compile it to use those drivers, any idea how can I fix that?
-
Do you have X server running (Raspbian GUI) when you launch the example? If so, don't. Start the app directly from command line, without the X server. Not sure if it will help, but maybe.
I have not encountered that error myself.
-
@ronpetit said in Qt on Raspberry pi3:
@sierdzio I'm running it without X server, as I should
Now, I'm curious about this, what libs are you using for glesv2 and egl?, I'm using the ones in /opt/vc/lib folder, and I also cross compiled the Qt with those
Oh I don't remember to be honest. I think I didn't change anything from stock settings. I also didn't specify the OpenGL libs manually anywhere when building Qt or apps.