为树莓派 pi3 arm64 构建 qt

Build qt for raspberry pi3 arm64

我尝试为 raspberry-pi3 qt5.12 应用程序设置一个 cross 编译构建环境。目标将 运行 ubuntu 64 位(树莓派版本)os 和 host 运行s ubuntu 18.04 x86-64。我尝试了在互联网上找到的几个教程,例如: https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c

我尝试设置此环境以将 CI/CD 用于 raspi 应用程序,因此我想在没有将树莓物理连接到 host 的情况下进行设置,只有一个已安装的映像如果 possible 或 qemu 进程。

无论我尝试做什么,qt 配置都失败并出现以下错误:

$RPI_TOOLS/..../ld: cannot find crt1.o : No such file or directory
$RPI_TOOLS/..../ld: cannot find crti.o : No such file or directory
$RPI_TOOLS/..../ld: cannot find -lm

我试图导出一个 $LIBRARY_PATH 环境变量,其中包含 os 个文件的路径,但没有任何变化。

有没有人已经为 64 位树莓派 pi3 编译了 qt 5.12,并且可以给我一些 clues/tutorials/help 如何编译的信息?

谢谢大家

我在启动 qt 配置脚本时使用选项 -xplatform linux-aarch64-gnu-arm 解决了我的问题。在此之前,我使用 qemu-static chroot 到 raspi-rootfs 并使用 apt.

安装依赖项