hostapd编译出错-20230307

hostapd编译出错

>>>>>>>>>>>>>>>>>>> hostapd compiling >>>>>>>>>>>>>>>>>>>
cd hostapd-2.5/hostapd; make DESTDIR=/home/lanfeiye/project/nt9667x/e93lod-c1-EAE/na51023_bsp_20190819_linux/application/external/__install install;
make[1]: Entering directory '/home/lanfeiye/project/nt9667x/e93lod-c1-EAE/na51023_bsp_20190819_linux/application/external/hostapd-2.5/hostapd'
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: config_file.o: Relocations in generic ELF (EM: 8)
config_file.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:989: recipe for target 'hostapd' failed
make[1]: *** [hostapd] Error 1
make[1]: Leaving directory '/home/lanfeiye/project/nt9667x/e93lod-c1-EAE/na51023_bsp_20190819_linux/application/external/hostapd-2.5/hostapd'
Makefile:113: recipe for target 'hostapd' failed
make: *** [hostapd] Error 2

这个错误看起来是由于编译过程中使用了错误的文件格式。可能是由于你的编译环境或文件路径设置出现了问题。建议先检查一下编译环境的设置是否正确,并确保使用了正确的文件路径和格式。还可以尝试重新下载并解压缩 hostapd-2.5,然后再次尝试编译。望采纳

该回答引用GPTᴼᴾᴱᴺᴬᴵ
这个错误信息显示是链接(hostapd)的时候出错了,具体原因是config_file.o文件中有错。可能是config_file.c文件没有成功编译导致的。请尝试重新编译config_file.c文件,然后再重新编译hostapd。如果问题仍然存在,请确保您的编译环境正确设置,特别是确保您正在使用正确的交叉编译器。另外,也可以尝试重新下载hostapd源代码,以确保您的源文件完整无误。

  • 关于该问题,我找了一篇非常好的博客,你可以看看是否有帮助,链接:hostapd 移植和使用