happyzaifly 2013-12-05 09:17 采纳率: 0%
浏览 2979

openssl交叉编译,hostapd移植出错,求帮助

hostapd编译的错误信息:
CC ../src/drivers/driver_common.c
/usr/bin/ld: /opt/wifi/tool/openssl/lib/libcrypto.a(ex_data.o): Relocations in generic ELF (EM: 40)
/usr/bin/ld: /opt/wifi/tool/openssl/lib/libcrypto.a(ex_data.o): Relocations in generic ELF (EM: 40)
/opt/wifi/tool/openssl/lib/libcrypto.a: could not read symbols: File in wrong format
collect2: ld 返回 1
make: *** [hostapd] 错误 1

我的移植是参考
http://blog.csdn.net/hinyunsin/article/details/6029749
文章来做的,移植openssl时我的步骤是:
$./config no-asm shared --prefix=/opt/wifi/tool/openssl/

makefile修改如下:
12 ##CC= gcc
13 CC= arm-none-linux-gnueabi-gcc
14 #CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
15 CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
16 DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT
17 PEX_LIBS=
18 EX_LIBS= -ldl
19 EXE_EXT=
20 ARFLAGS=
21 AR=arm-none-linux-gnueabi-ar $(ARFLAGS) r
22 RANLIB= arm-none-linux-gnueabi-ranlib
23 PERL= /usr/bin/perl
24 TAR= tar
25 TARFLAGS= --no-recursion
26 MAKEDEPPROG= gcc

$make ,$make install成功

在hostapd目录我makefile添加:
3 ##CC=gcc
4 CC=arm-none-linux-gnueabi-gcc

#################################################add
CFLAGS += -I/opt/wifi/tool/libnl/include/
CFLAGS += -I/opt/wifi/tool/openssl/include/

####################################add
LIBS += -L/opt/wifi/tool/libnl/lib/
LIBS += -L/opt/wifi/tool/openssl/lib/libssl.a /opt/wifi/tool/openssl/lib/libcrypto.a

make产生如下错误

错误信息
CC ../src/drivers/driver_common.c
/usr/bin/ld: /opt/wifi/tool/openssl/lib/libcrypto.a(ex_data.o): Relocations in generic ELF (EM: 40)
/usr/bin/ld: /opt/wifi/tool/openssl/lib/libcrypto.a(ex_data.o): Relocations in generic ELF (EM: 40)
/opt/wifi/tool/openssl/lib/libcrypto.a: could not read symbols: File in wrong format
collect2: ld 返回 1
make: *** [hostapd] 错误 1

试过make clean -w ;make -w仍然不行

求助

  • 写回答

1条回答

  • chasestat 2018-10-26 08:21
    关注

    提示你格式不对,利用readeld -h libcrypto.a看一下这是它是什么格式的

    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作