mips编译器交叉编译openssl

1.下载源码:

git clone https://github.com/openssl/openssl.git

2. 配置生成Makefile

./config  no-asm shared --prefix=$(pwd)/__install CROSS_COMPILE=mipsel-linux-

去掉Makefile中的 -m64

3 交叉编译

make

出现while loading shared libraries: libmpfr.so.4: cannot open shared object file:错误

原因是由于没有找到libmpfr.so.4,但是其实工具链是有该库的

解决方法手动指定库路径:export LD_LIBRARY_PATH=/root/buildroot-gcc464/usr/lib

再次make

./libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
./libcrypto.so: undefined reference to getcontext' ./libcrypto.so: undefined reference tosetcontext'
./libcrypto.so: undefined reference to `makecontext'

主要的原因是uclibc 本身这不支持这些接口

解决方法如下:

make clean

./config  no-asm  no-async shared --prefix=$(pwd)/__install CROSS_COMPILE=mipsel-linux-

去掉Makefile 中的 -m64

make &&  make install  编译通过。

root@vmuser-VirtualBox:~/openssl/__install# du -h
716K ./bin
1.6M ./include/openssl
1.6M ./include
16K ./lib/pkgconfig
20K ./lib/engines-1.1
8.5M ./lib
164K ./share/doc/openssl/html/man7
3.5M ./share/doc/openssl/html/man3
700K ./share/doc/openssl/html/man1
48K ./share/doc/openssl/html/man5
4.4M ./share/doc/openssl/html
4.4M ./share/doc/openssl
4.4M ./share/doc
212K ./share/man/man7
4.9M ./share/man/man3
808K ./share/man/man1
48K ./share/man/man5
5.9M ./share/man
11M ./share
4.0K ./ssl/private
20K ./ssl/misc
4.0K ./ssl/certs
64K ./ssl
21M .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌入式实操

希望博文有助于您,您不必加班。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值