ubuntu makefile交叉编译报错:file not recognized: file format not recognized
Posted Dontla
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu makefile交叉编译报错:file not recognized: file format not recognized相关的知识,希望对你有一定的参考价值。
在linux ubuntu上编译netkit-ftp的时候报错:file not recognized: file format not recognized
[root@ubuntu /arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17]24# make
(cd ftp && make)
make[1]: Entering directory '/arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17/ftp'
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline glob.c -c
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline main.c -c
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline ruserpass.c -c
arm-linux-gnueabihf-gcc cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o -o ftp
cmds.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
Makefile:14: recipe for target 'ftp' failed
make[1]: *** [ftp] Error 1
make[1]: Leaving directory '/arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17/ftp'
Makefile:7: recipe for target 'ftp.build' failed
make: *** [ftp.build] Error 2
解决方法:make clean
一下
或者手动将之前编译生成的文件删除
参考文章:linux编译出现问题:file not recognized: File format not recognized
以上是关于ubuntu makefile交叉编译报错:file not recognized: file format not recognized的主要内容,如果未能解决你的问题,请参考以下文章
ubuntu交叉编译x264报错:‘X264_VERSION’ undeclared(已解决)运行version.sh
Ubuntu下用NDK中arm-linux-androideabi-gcc交叉编译报错,求助
ubuntu 16 LTS 安装32交叉编译工具报错:cannot execute binary file: Exec format error
基于MIPS ARM架构平台, Ubuntu20.xx版本下交叉编译Qt5.12.xtslib-1.4