为arm-linux-gnueabi构建libcurl:为什么curl忽略openssl? [英] Build libcurl for arm-linux-gnueabi: Why curl ignores openssl?

查看:432
本文介绍了为arm-linux-gnueabi构建libcurl:为什么curl忽略openssl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git clone https://github.com/openssl/openssl.git -b OpenSSL_1_1_1-stable --depth 1 openssl-1.1.1
cd openssl-1.1.1
./Configure --prefix=/usr linux-generic32 shared  \
      --cross-compile-prefix=arm-linux-gnueabihf-
make depend -j7
make -j7
make DESTDIR=/Volumes/lpd-dev/armhf/ install_sw install_ssldirs

2.建立curl

git clone https://github.com/curl/curl.git -b curl-7_64_1 --depth 1 curl-7.64.1
cd curl-7.64.1
./buildconf
./configure --host=arm-linux-gnueabihf --prefix=/usr --with-ssl=/Volumes/lpd-dev/armhf/usr

此输出:

...
configure: PKG_CONFIG_LIBDIR will be set to "/Volumes/lpd-
dev/armhf/usr/lib/pkgconfig"
checking for arm-linux-gnueabihf-pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: ""
configure: pkg-config: SSL_CPPFLAGS: ""
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink or --with-amissl to address this.
...

pkgconfig已找到,但警告:SSL已禁用

pkgconfig was found, but WARNING: SSL disabled

推荐答案

在编写问题时,我重读了./configure的输出,并理解为"/Volumes/lpd-dev/armhf/usr/lib/pkgconfig"指向--prefix=/usr,但是由于我们是交叉编译的,所以指向错误的位置!

During writing the question I reread ones more ./configure's output and understood that "/Volumes/lpd-dev/armhf/usr/lib/pkgconfig" points to --prefix=/usr but since we are cross-compiling is points to wrong location!

只需移动或删除.../armhf/usr/lib/pkgconfig已解决的问题.

Simply move or remove .../armhf/usr/lib/pkgconfig fixed problem.

    ...
curl version:     7.64.1-DEV
SSL:              enabled (OpenSSL)
SSH:              no      (--with-libssh2)
    ...

这篇关于为arm-linux-gnueabi构建libcurl:为什么curl忽略openssl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆