Qt for Raspberry Pi - Qt 5.14.2 cross compilation for Raspberry Pi 4 model B - Run Qt on Raspberry

Qt for Raspberry Pi - Qt 5.14.2 cross compilation for Raspberry Pi 4 model B - Run Qt on Raspberry

Ulas Dikme

5 лет назад

52,789 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@jairwen82
@jairwen82 - 26.01.2021 13:32

Greate video, since ubuntu release version for raspberry pi, how to cross compile for ubuntu server on rpi4 without X?

Ответить
@AhmedAbdelghany2
@AhmedAbdelghany2 - 05.03.2021 23:32

Hello, I am trying this solution on raspberry pi Ver 3.0 B model. when I try "rsync -avz pi@raspberry ip:/lib sysroot" it gives me : sent 27 bytes received 53 bytes 53.33 bytes/sec
total size is 7 speedup is 0.09
with no syncing
_
I Tried "rsync -avz pi@raspberry ip:/lib/ sysroot" notice I added the forward slash after "lib"instead it works but it copies what's inside the lib directory directly
_
I don't know what should I do to sync the lib as main directory

Ответить
@simonefiore7408
@simonefiore7408 - 22.03.2021 13:08

The guide works perfect with Ubuntu 20.04 LTS, Pi OS 10, QT 5.12.8! Thanks a lot!
I added only "mkdir sysroot sysroot/usr sysroot/opt" before rsync

Ответить
@andrewtschesnok5582
@andrewtschesnok5582 - 31.03.2021 19:39

First: Thank you so much. Next: There are 27 hits for "rsync" in the comments because of errors in your test file. I was able to solve by first creating the directories in sysroot AND adding a "/" after the path of the source (without the quotes). There seems to be no need for the --rsync-path. Hope this helps people.. Otherwise it only seems to setup a link..

Ответить
@iaggocapitanio7909
@iaggocapitanio7909 - 17.04.2021 19:27

thanks a lot

Ответить
@adamherczig543
@adamherczig543 - 20.04.2021 14:46

Hey Ulas ! Nice tuto! I have some question or poblem, I hope you have some advices. I have a project with guis and widgets. I can build it on windows and I can run it on windows fine. However the main goal is run on RPI3 or RPI4. I would like to compile the qmake on wsl 64 bit, then build my project without rsync back the qt5pi folder to rpi /usr/local. So many pages tell me this is an important step. How does it possible? I guess the configure needs some extra params. If I build directly on RPI the binary and move the binary to another "virgin" rpi it can run nicely. However after cross compiling there is always some QT_QPA problems with libqxcb or eglfs. I guess I have to statically add all gui libs (GLES, EGL, xcb, etc... ) But I have no idea how to do that... Thanks in advance

Ответить
@rodriescobar
@rodriescobar - 24.05.2021 05:38

Hi Ulas. Your video guide is very complete and clear. I'm stuck in a problem. I've managed to successfully compile qt, deploy a test program and your example but when I try to start editing the forms in the designer, the tab with QML Types is all white (empty) and there is a warning sign in the navigator tab besides "page" and "label" elements already inserted by the wizard that says "Item could not be created". It actually seems that you had errors as well when you create the empty project or open your example. I already tried to add qml path to .pro file in "QML_IMPORT_PATH" and "QML_DESIGNER_IMPORT_PATH" but then the designer crash with a message "Line 1: Qt Quick emulation layer crashed". Please help!!

Ответить
@jackyfang7817
@jackyfang7817 - 02.07.2021 06:14

Thank you so much for the detailed steps! Before your tutorials I have tried many times and all failed. Follow your tutorials, I got Qt working in my raspberrypi.

Ответить
@aryanjha3530
@aryanjha3530 - 12.07.2021 19:32

while cross compiling it says line 299: cmake: command not found.... any help?

Ответить
@steveevers6538
@steveevers6538 - 16.07.2021 03:59

Anyone experience the following OpenGL error at the end of the configure command?

WARNING: Tool flex is required to build QtWebEngine.

WARNING: Tool flex is required to build QtPdf.

WARNING: QtWebEngine will not be built.

WARNING: QtPdf will not be built.

ERROR: Feature 'opengles2' was enabled, but the pre-condition '(config.win32 && !features.opengl-dynamic) || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.

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.

Ответить
@fabianerquinigo9686
@fabianerquinigo9686 - 04.08.2021 20:45

What about rpi3

Ответить
@wkl3968
@wkl3968 - 24.08.2021 03:24

Thanks for the video!!! However, I ran into two problems: 1) the make install spit out some error on geoservice and location related. 2) I ran out from virtual machine disc space. any clue?

Ответить
@kutluyigitturk5952
@kutluyigitturk5952 - 31.08.2021 22:23

Hello, when I want to run a project with SSH connection, I get the following error line.

qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.
Aborted

Do you have anything to say about this error?

Ответить
@vishnuvardhanreddy220
@vishnuvardhanreddy220 - 06.10.2021 10:03

thank you! It works perfectly for qmake projects. CMake projects are not working. Any tips?

Ответить
@B1063N
@B1063N - 25.11.2021 06:06

Greetings from 2021, it doesnt work, shitload of errors. Dont waste your time.

Ответить
@celalceylan4662
@celalceylan4662 - 26.11.2021 10:24

benim aldığım bir problem var rasp4 için: eglfs x11, linux fb, vnc =yes fakat EGLFS Raspberry pi No olması gerekirken yes olarak görünüyor. ubuntu 18.04 raspery OS kullanıyorum bu seçeneklerle make ettiğim zaman libbrcm hataları alıyorum.
bu konuda yardımcı olabilecek varmı ??

Ответить
@mohamedibrahem3470
@mohamedibrahem3470 - 17.12.2021 21:54

at all this is great work!
but when I reach 9.36 when I write "sudo apt-get build-dep qt5-qmake " the OS asked to put some source URIs in the sources list
how can I fix this .

Ответить
@marunfaiv22
@marunfaiv22 - 29.12.2021 13:42

thanks for the great video sir, but i want to ask why is there no "arm-linux-gnueabihf" folder in my usr/bin/ raspberry pi?

Ответить
@chimezieeguzo376
@chimezieeguzo376 - 25.01.2022 15:00

rsync command returned this error. receiving incremental file list

sent 20 bytes received 60 bytes 10.67 bytes/sec
total size is 7 speedup is 0.09
Any idea how to solve this problem? it is clear that the remote and local are not synchronized

Ответить
@洪客
@洪客 - 30.01.2022 22:13

how to build in bullseye ?

Ответить
@SaurabhNishad1393
@SaurabhNishad1393 - 19.02.2022 23:56

Hi Ulas, I am trying to build QT 5.14 for Raspberry pi 4. I followed your video as its. But still getting error related opengles2 and EGL. Kindly help me. "ERROR: Feature 'opengles2' was enabled, but the pre-condition " "ERROR: Feature 'eglfs' was enabled, but the pre-condition " "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."

Ответить
@edwardchapman1914
@edwardchapman1914 - 14.03.2022 17:45

Anyone had luck with 64 bit bullseye release, looking to build everything including QWebengine, almost there.. Hung on crt.o stuff .. needing a good mkspec/device ..

Ответить
@aratipatil7708
@aratipatil7708 - 01.04.2022 09:35

My qmake file was not found plz help

Ответить
@abdurrazzak1612
@abdurrazzak1612 - 03.04.2022 23:15

A great tutorial

Ответить
@davutkaraca315
@davutkaraca315 - 09.04.2022 23:45

Ulas Bey merhaba. Qt6 için de kurulumu anlatabilir misiniz? Bir türlü kuramadım.

Ответить
@bra1nsen
@bra1nsen - 22.05.2022 12:41

Will this fix: No Module Named PySide Error?

Ответить
@MuhammadAwais-cf5vr
@MuhammadAwais-cf5vr - 04.07.2022 17:49

i am facing errors such like "error: ‘numeric_limits’ is not a class template qt"

Ответить
@chakrounimen7432
@chakrounimen7432 - 06.07.2022 11:53

Why did cat qt-everywhere-src-5.15.2 returns cat: qt-everywhere-src-5.15.2: est un dossier ?

Ответить
@bhagyesh_knowledgecity
@bhagyesh_knowledgecity - 15.03.2023 17:39

Is same steps/process applicable for Raspberry Pi 3 B+ model? If not, what changes need to do?

Ответить
@AyoubSAKHANA
@AyoubSAKHANA - 03.05.2023 19:53

Thank you for the detailed steps. I am following your tutorial and while trying to run build script, getting following error "ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken." any ideas what should i do ?

Ответить
@falgyo
@falgyo - 29.06.2023 05:04

If u get error on rsync, go check ur folder (/opt/qt5pl/) i see warning icon folder “sysroot” and delete that folder, then run rsync….. commands again, it worked

Ответить
@mehmetaligundogdu7190
@mehmetaligundogdu7190 - 10.08.2023 22:01

from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h:44,
from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/qendian.h:1,
from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:7: error: ‘numeric_limits’ is not a class template
300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:77: error: expected template-name before ‘<’ token
300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:77: error: expected ‘{’ before ‘<’ token
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:344:18: error: ‘numeric_limits’ is not a class template
344 | template<> class numeric_limits<const QT_PREPEND_NAMESPACE(qfloat16)>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:344:69: error: ‘std::numeric_limits’ is not a template
344 | template<> class numeric_limits<const QT_PREPEND_NAMESPACE(qfloat16)>
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:345:28: error: expected template-name before ‘<’ token
345 | : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:346:18: error: ‘numeric_limits’ is not a class template
346 | template<> class numeric_limits<volatile QT_PREPEND_NAMESPACE(qfloat16)>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:346:72: error: ‘std::numeric_limits’ is not a template
346 | template<> class numeric_limits<volatile QT_PREPEND_NAMESPACE(qfloat16)>
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:347:28: error: expected template-name before ‘<’ token
347 | : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:348:18: error: ‘numeric_limits’ is not a class template
348 | template<> class numeric_limits<const volatile QT_PREPEND_NAMESPACE(qfloat16)>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:348:78: error: ‘std::numeric_limits’ is not a template
348 | template<> class numeric_limits<const volatile QT_PREPEND_NAMESPACE(qfloat16)>
| ^
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
| ^~~~~~~~~~~~~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:349:28: error: expected template-name before ‘<’ token
349 | : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
| ^
In file included from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/qendian.h:1,
from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::max()’:
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:30: error: ‘std::numeric_limits’ is not a template
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: incomplete type ‘std::numeric_limits’ used in nested name specifier
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::min()’:
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:30: error: ‘std::numeric_limits’ is not a template
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~
/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:54: error: incomplete type ‘std::numeric_limits’ used in nested name specifier
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~
gmake: * [Makefile:383: qutfcodec.o] Error 1

Ответить
@sc0or
@sc0or - 11.09.2023 11:43

40 minutes of watching a terminal with installation logs??? Are you kidding? Kompalishin...

Ответить
@tigrankato
@tigrankato - 25.09.2023 17:16

Big thanks for this guide! This is one of only available guides about this that I managed to find. I was able to compile Qt for Orange Pi 4 lts. I used linaro for aarch64-gnu-linux instead since my computer has 64 bit CPU unlike raspberry pi in this video. I also had to create my own device configuration in qtbase/mkspecs/devices/ since there are no configurations for orangepi, but it was pretty easy. I also used Qt 5.15.2 instead because the project I was porting used this version. For some reason, qtwebengine wasn't compiling due to some missing libraries, so I had to -skip it during configuration, but I don't think Ill need it.

Ответить
@verchik8848
@verchik8848 - 07.11.2023 13:41

You are the GOAT! Thank you very much!!!!

Ответить
@furkanaltay5200
@furkanaltay5200 - 20.12.2023 13:05

Merhaba Tutorial için teşekkürler, bütün adımları uyguladım çalıştı. Fakat, herhangi bir proje oluşturduğumda autocomplete özelliğinin çalışmadığını gördüm. Bu sorunu nasıl çözebilirim.
Hi, thanks for the tutorial, I have done all steps respectively and it finally works!. But I have recognized that autocomplete feature doesnt work when I created a sample project. Could you give me an advice about how to solve this problem ?

Ответить
@dalesmith8666
@dalesmith8666 - 08.02.2024 02:13

Sure would be nice if you could do this with the Microsoft 10 OS. Other words cross compile from windows 10 to RPI4 using the official RPI4 OS of the time.
I've done it with Linux a few years ago, and seems that many tutorials want you to use a VM. Not my way of doing things. Please consider and help, probably would be a benefit to many!

Ответить
@mayssaknani
@mayssaknani - 13.08.2024 17:30

i can't find the /opt/vc/ directory in my raspberry, and i couldnt also build it from source, what should i do ?

Ответить
@selcuk57
@selcuk57 - 14.09.2024 13:08

For rsync fault :
Your Raspberry Pi's pi user must either be granted root privileges, or you can set a root password and then configure the sshd_config file by setting PermitRootLogin yes.

Ответить
@Bachanginh
@Bachanginh - 09.05.2025 09:22

super super super luv u

Ответить