LIBSSH2移植

LIBSSH2移植

libssh2使用libgcrypto加密库实现加密(大部分会选择openssl库),gcrypto库依赖libgpg-error,以下是相关库的编译过程和遇到的问题。

libgpg-error-1.42编译:

./configure --prefix=/home/work/ssh2/build CC=/opt/peta_toolchain/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc --host=aarch64-linux  --build=aarch64-linux-gnu
make && make install

问题总结:
编译过程遇到gpg-error.h文件无法生成问题

./gpg-error.h.in:508: error including `./syscfg/lock-obj-pub.gnu-.h': No such file or directory
Makefile:1757: recipe for target 'gpg-error.h' failed

调整–host=aarch64-linux(原先为aarch64-linux-gnu-) 增加–build=aarch64-linux-gnu,可以识别出$(src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h)文件,以生成gpg-error.h

下面是官方回复的此问题解决方法:

Cross-Compiling

Libgpg-error needs to figure out some platform specific properties.
These are used to build the platform specific gpg-error.h file. The
detection is done during build time but can’t be done when
cross-compiling. Thus if you run into an error during building you
need to figure out these values. You may use these commands:

build=" ( b u i l d − a u x / c o n f i g . g u e

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值