Hi
I plan to develop an Qt Quick/QML application(with GPU support) for my Rock 5a board running this image. so I decided to compile (cross compile) Qt6.5.2 on Ubuntu 20(and also 23) host(x86) system.
followed these two tutorials:
- https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
- https://github.com/PhysicsX/QTonRaspberryPi
Downloaded latest version of ARM GNU toolchain for aarch64 linux and place it in /opt/arm-gnu-toolchain directory. set directory for cmake files and config parameters.
Qt for host(x64) compiled without problem. but when I want to cross compile it for my board, aarch64, I get this errors:
CMake Error at /snap/cmake/1329/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/opt/arm-gnu-toolchain/bin/aarch64-none-linux-gnu-g++"
is not able to compile a simple test program.
It fails with the following output:
mTC_f9681 && :
/opt/arm-gnu-toolchain/bin/…/lib/gcc/aarch64-none-linux-gnu/12.3.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
/opt/arm-gnu-toolchain/bin/…/lib/gcc/aarch64-none-linux-gnu/12.3.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/opt/arm-gnu-toolchain/bin/…/lib/gcc/aarch64-none-linux-gnu/12.3.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: cannot find -lm: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
and sometimes another error that says something like:
Could not compile simple OpenGL program
Any suggestion? should I even compile Qt by myself or there are other solutions?
Is it possible to build image with Qt6 qml module and compiler inside it from scratch?
Thanks…