QT cross-compile to Rpi4
-
wrote on 18 Jun 2020, 15:14 last edited by
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.
wrote on 18 Jun 2020, 15:46 last edited by@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.
-
wrote on 20 Jun 2020, 06:30 last edited by
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
wrote on 20 Jun 2020, 22:08 last edited by@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...
-
wrote on 21 Jun 2020, 08:27 last edited by Jonas Messerli
- 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
-
wrote on 22 Jun 2020, 14:32 last edited by
Hi there is a very good tutorial on YouTube search for Ulas Dikme he cross compiled to pi4.
-
- 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
wrote on 22 Jun 2020, 15:09 last edited by@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? -
wrote on 22 Jun 2020, 15:15 last edited by
@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
-
wrote on 3 Jul 2020, 07:09 last edited by
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.wrote on 3 Jul 2020, 12:23 last edited by@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.