Cross-compile Qt 6.6.1 for Raspberry Pi 4 (aarch64)
-
Hi everyone, sorry for my English, I'm only studying this language.
I need help to cross-compile Qt 6.6.1 for Raspberry Pi 4 (aarch64). I tried to make it from different sources, but nothing succeeded.
Sometimes the build completes successfully but QT Creator does not want to compile the project.
Help me, please to solve this problem.
P.S. My host machine is Debian 12.
-
Hi everyone, sorry for my English, I'm only studying this language.
I need help to cross-compile Qt 6.6.1 for Raspberry Pi 4 (aarch64). I tried to make it from different sources, but nothing succeeded.
Sometimes the build completes successfully but QT Creator does not want to compile the project.
Help me, please to solve this problem.
P.S. My host machine is Debian 12.
@Sergey_85 If os is available on the raspberry pi then there should be installed qt need to be there. okay now make the cmake for your source code and give path of qt to your cmake and there build your source code and check with simple example.
-
@Sergey_85 If os is available on the raspberry pi then there should be installed qt need to be there. okay now make the cmake for your source code and give path of qt to your cmake and there build your source code and check with simple example.
@Qt-embedded-developer
I managed to launch the console application, but when I try GUI application it I get an error, although all the libraries are installed.16:09:14: Starting /usr/local/bin/rpi_gui on RPI Device...
Invalid MIT-MAGIC-COOKIE-1 key
qt.qpa.xcb: could not connect to display localhost:10.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: minimalegl, xcb, minimal, eglfs, linuxfb, vnc, offscreen.
16:09:14: /usr/local/bin/rpi_gui on RPI Device exited with code 255
-
@Qt-embedded-developer
I managed to launch the console application, but when I try GUI application it I get an error, although all the libraries are installed.16:09:14: Starting /usr/local/bin/rpi_gui on RPI Device...
Invalid MIT-MAGIC-COOKIE-1 key
qt.qpa.xcb: could not connect to display localhost:10.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: minimalegl, xcb, minimal, eglfs, linuxfb, vnc, offscreen.
16:09:14: /usr/local/bin/rpi_gui on RPI Device exited with code 255
@Qt-embedded-developer I used the host-machine Qt Creator 12.0.2
Based on Qt 6.6.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64 -
@Qt-embedded-developer
I managed to launch the console application, but when I try GUI application it I get an error, although all the libraries are installed.16:09:14: Starting /usr/local/bin/rpi_gui on RPI Device...
Invalid MIT-MAGIC-COOKIE-1 key
qt.qpa.xcb: could not connect to display localhost:10.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: minimalegl, xcb, minimal, eglfs, linuxfb, vnc, offscreen.
16:09:14: /usr/local/bin/rpi_gui on RPI Device exited with code 255
@Sergey_85 said in Cross-compile Qt 6.6.1 for Raspberry Pi 4 (aarch64):
qt.qpa.xcb: could not connect to display localhost:10.0
The compile is fine.
You're running it most likely from something like a remote ssh, or similar. Which means that the environment is not correct. Run
printenv
in a terminal started on the actual display to see what that means.You need to start it differently. Sorry, not a RPi user so I don't know how they made that work.