用Qt编译Raspi交叉后无法找到crt1.o /crti.o /libpthread.so.0

时间:2018-10-19 08:45:44

标签: qt cross-compiling raspberry-pi3

最后,我确实使用Qt5.10进行了交叉编译,并使用此Wiki https://wiki.qt.io/RaspberryPi2EGLFS通过64位的Ubuntu 16.04扩展了Pi3。

配置Qt并运行一些项目(如打开Qt Widgets屏幕并在其上添加一些标签后,它运行良好)后,我能够在Raspi屏幕上看到编译后的输出。

但是现在我开始构建一个真实的项目,我为其运行qmake,它正常退出了。

当我运行build时,我在编译输出面板中得到了这个奇怪的错误!

/home/a-mathias/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
Makefile:275: recipe for target '_arm/out/exe/project_final
/home/a-mathias/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/a-mathias/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/arm-linux-gnueabihf/libpthread.so.0
/home/a-mathias/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/arm-linux-gnueabihf/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
make: *** [_arm/out/exe/project_final] Error 1
10:24:33: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project project_final (kit: Rpi3B)
When executing step "Make"

发布脚本!

:-1: error: cannot find crt1.o: No such file or directory
:-1: error: cannot find crti.o: No such file or directory
:-1: error: cannot find /lib/arm-linux-gnueabihf/libpthread.so.0
:-1: error: cannot find /usr/lib/arm-linux-gnueabihf/libpthread_nonshared.a
:-1: error: collect2: error: ld returned 1 exit status

我希望有人能提出建议!

1 个答案:

答案 0 :(得分:0)

由于@Felix建议sysroot错误,我对其进行了修复并解决了问题