问题描述
编译yocto:
debian12
poky-yocto-5.1.1
bitbake core-image-minimal 报错:binutils failed with exit code '1'
-
解决方案
先查log,poky-yocto-5.1.1/scripts/cross-intercept/ar: line 10: ../native-intercept/ar: No such file or directory,发现不止一个地方用到ar
通过文件管理器查看该文件(存在)
增加调试代码,确认是相对路径的问题,当前文件夹不是poky-yocto-5.1.1/scripts/cross-intercept/
# echo "--------------------------BEGIN---------------------"
# echo "Checking absolute path of ar:"
# realpath "../native-intercept/ar"
# ls -all /home/one/Desktop/poky-yocto-5.1.1/scripts/native-intercept/ar
# echo "Current working directory: $(pwd)"
# echo "--------------------------END1---------------------"
# /home/one/Desktop/poky-yocto-5.1.1/scripts/native-intercept/ar #不要简单的该为绝对路径,不工作
# echo "--------------------------END2---------------------"
../native-intercept/ar
改为软连接,原先的脚ar_old
ln -s ../native-intercept/ar ar
编译成功