QT cross-compile to Rpi4
-
Hello everyone.
I've looked in few diffrent tutorials, but get always stuck because they are not actualy for Raspi 4.Is there a good step by step guide for cross compiling qt for Raspberry Pi 4 on Linux (Ubuntu) ?
thanks for any hints.
-
Hello everyone.
I've looked in few diffrent tutorials, but get always stuck because they are not actualy for Raspi 4.Is there a good step by step guide for cross compiling qt for Raspberry Pi 4 on Linux (Ubuntu) ?
thanks for any hints.
@Jonas-Messerli said in QT cross-compile to Rpi4:
I've looked in few diffrent tutorials
Could you name/line them?
but get always stuck
Could you please describe the step(s) or the error(s)?
In addition, could you please tell about your environment, i.e. OS in RPi4, OS in host, tools for cross-compile, etc.
-
So here are the metrics
Raspberry Pi 4 with the Raspberry OS (Buster 2020-05-27)
Host PC:
VM with Ubuntu 20.04 LTSI followed this tutorial:
https://www.interelectronix.com/de/qt-auf-dem-raspberry-pi-4.htmlBut instead of qt 5.14 I used the 5.15 LTS version.
After some path problems I managed to configure, make and make install QT on the host pc.
By executing a compiled program however, I get
"Could not queue DRM page flip on screen DSI1 (Invalid argument)"Thanks for helping
-
So here are the metrics
Raspberry Pi 4 with the Raspberry OS (Buster 2020-05-27)
Host PC:
VM with Ubuntu 20.04 LTSI followed this tutorial:
https://www.interelectronix.com/de/qt-auf-dem-raspberry-pi-4.htmlBut instead of qt 5.14 I used the 5.15 LTS version.
After some path problems I managed to configure, make and make install QT on the host pc.
By executing a compiled program however, I get
"Could not queue DRM page flip on screen DSI1 (Invalid argument)"Thanks for helping
@Jonas-Messerli said in QT cross-compile to Rpi4:
make install QT on the host pc.
and then did you rsync the Qt libraries to the target device?
You're supposed to have done this step:
Die fertig kompilierten Qt-Bibliotheken werden abschließend noch mittels rsync auf den Raspberry Pi kopiert:
cd /opt/RaspberryQt
rsync -avz sysroot/usr/local/RaspberryQt root@:/usr/localBy executing a compiled program however, I get
"Could not queue DRM page flip on screen DSI1 (Invalid argument)"By executing where? Host or target device?
If in target, how did you run the Qt app? Have you stated any -platform argument?
You may have hit issue QTBUG-72538...
-
- Oh, didn't realize the tutorial was in German, however yes I rsync the compiled version of qt to the pi.
- How do I run a program with the -platform argument?
The error comes up when I start the program from the qt creator as well as when I start it directly on the pi.
However, I managed to get rid of this error message by export QT_QPA_EGLFS_ALWAYS_SET_MODE="1" on the pi. And the program/gui gets displayed.
source: https://www.raspberrypi.org/forums/viewtopic.php?t=252614
But I don't know what it does and I still get this error when I start the program over the qt creator.And I get this error message as well. It seems to be that the program doesnt run on the gpu as it is supposed to be:
Running on a software rasterizer (LLVMpipe), expect limited performance.Thanks for your help
-
- Oh, didn't realize the tutorial was in German, however yes I rsync the compiled version of qt to the pi.
- How do I run a program with the -platform argument?
The error comes up when I start the program from the qt creator as well as when I start it directly on the pi.
However, I managed to get rid of this error message by export QT_QPA_EGLFS_ALWAYS_SET_MODE="1" on the pi. And the program/gui gets displayed.
source: https://www.raspberrypi.org/forums/viewtopic.php?t=252614
But I don't know what it does and I still get this error when I start the program over the qt creator.And I get this error message as well. It seems to be that the program doesnt run on the gpu as it is supposed to be:
Running on a software rasterizer (LLVMpipe), expect limited performance.Thanks for your help
@Jonas-Messerli said in QT cross-compile to Rpi4:
when I start the program over the qt creator
Are you setting the same environment when running from Qt Creator that you set when running from the device?
i.e. by doing having QT_QPA_EGLFS_ALWAYS_SET_MODE="1" from Qt Creator? -
@Pablo-J-Rogina said in QT cross-compile to Rpi4:
@Jonas-Messerli said in QT cross-compile to Rpi4:
when I start the program over the qt creator
Are you setting the same environment when running from Qt Creator that you set when running from the device?
i.e. by doing having QT_QPA_EGLFS_ALWAYS_SET_MODE="1" from Qt Creator?How do I do that? I set the ssh user as user: pi and the environment var QT_QPA_EGLFS_ALWAYS_SET_MODE="1" get exported for the user pi. But do I have to set something in the QT Creator. I'm quite new in this Topic
-
Okay I figured it out. Just place the variables in to the qt creator in the build configuration.
Now everything is working.
Thanks for the help. -
Okay I figured it out. Just place the variables in to the qt creator in the build configuration.
Now everything is working.
Thanks for the help.@Jonas-Messerli said in QT cross-compile to Rpi4:
Now everything is working.
Great!, please don't forget to mark your post as solved then.