Missing crt1.o/crti.o for cross compilation

只谈情不闲聊 提交于 2020-05-17 06:27:06

问题


This question follow a problem on cross compilation: https://stackoverflow.com/posts/61433338/edit

I tried to compile Qt5 with gcc 8.3.0 (gnueabihf) but i get the following error while recompilling Qt5: (note this is only the command failing during configure)

$/usr/local/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/ftrefou/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/ftrefou/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/ftrefou/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o 
/usr/local/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/usr/local/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/usr/local/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm

If i check my sysroot, crt1.o and crti.o are present:

$ ls ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/crt*
/home/ftrefou/raspi/sysroot/usr/lib/arm-linux-gnueabihf/crt1.o
/home/ftrefou/raspi/sysroot/usr/lib/arm-linux-gnueabihf/crti.o
/home/ftrefou/raspi/sysroot/usr/lib/arm-linux-gnueabihf/crtn.o

edit: Found the same problem on Qt forum (not solved):

https://forum.qt.io/topic/91457/qt-5-10-cross-compilation-raspberry-pi-issue-cannot-find-crt1-o-cannot-find-lm

来源:https://stackoverflow.com/questions/61433765/missing-crt1-o-crti-o-for-cross-compilation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!