美文网首页
libcurl交叉编译arm版本动态库

libcurl交叉编译arm版本动态库

作者: linanwx | 来源:发表于2018-01-30 18:53 被阅读0次

前言

最近由于项目需要要进行交叉编译libcurl以完成https通信。这里记录一下过程。

首先下载最新版本的源码文件,并解压,如下:

image.png

我用的deepin自带交叉编译工具链,sudo apt install gcc-5-arm-linux-gnueabihf安装就可以了。

arm-linux内容

image.png

在openssl目录下运行以下命令:

source ../arm-linux
./Configure --prefix=$(pwd)/../output shared no-asm linux-armv4
make -j4
make install

首先导入环境变量。然后进行编译,输出路径在output下面。

然后在libcurl 下运行以下命令

source ../arm-linux
./configure --with-ssl=$(pwd)/../output --prefix=$PWD/../output --build=x86_64-pc-linux-gnu --host=arm-linux-gnueabihf  CC=arm-linux-gnueabihf-gcc-5 --without-zlib

curl配置结果一览

  curl version:     7.58.0
  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /media/linan/72605383-b1ba-4c79-90fd-443514396fbc/curl_workdir/curl-7.58.0/output
  Compiler:         arm-linux-gnueabihf-gcc-5
  SSL support:      enabled (OpenSSL)
  SSH support:      no      (--with-libssh2)
  zlib support:     no      (--with-zlib)
  brotli support:   no      (--with-brotli)
  GSS-API support:  no      (--with-gssapi)
  TLS-SRP support:  enabled
  resolver:         POSIX threaded
  IPv6 support:     enabled
  Unix sockets support: enabled
  IDN support:      no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     no
  ca fallback:      no
  LDAP support:     no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support:    no      (--enable-ldaps)
  RTSP support:     enabled
  RTMP support:     no      (--with-librtmp)
  metalink support: no      (--with-libmetalink)
  PSL support:      no      (libpsl not found)
  HTTP2 support:    disabled (--with-nghttp2)
  Protocols:        DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP

然后在运行make 以及make install,在curl目录下就会出现output目录。

最终,我们需要的是openssl以及curl的动态库,分别是:libssl.so libcrypto.so libcurl.so

相关文章

  • libcurl交叉编译arm版本动态库

    前言 最近由于项目需要要进行交叉编译libcurl以完成https通信。这里记录一下过程。 首先下载最新版本的源码...

  • WebRTC arm-linux库编译

    安装交叉编译工具 WebRTC的工程已经支持arm-linux平台库的编译 编译环境ubuntu14.04 然后执...

  • Ubuntu安装ARM交叉编译

    1. 系统情况 Ubuntu版本:16.04 LTS x64交叉编译环境:arm-linux-gcc-4.4.3 ...

  • NDK(四):交叉编译

    上一篇文章中,详细介绍gcc的编译流程,以及静态库和动态库的区别。接下来,就介绍什么是交叉编译,怎样进行交叉编译,...

  • arm交叉编译

    1.arm 交叉编译的配置 sudo apt-get install build-essential 更新一下依赖...

  • mini2440移植madplay

    mini2440移植madplay madplay交叉编译 交叉编译器:arm-linux-gcc 3.4.1 P...

  • ppp与pppoe 交叉编译移植

    ppp 与 pppoe 交叉编译移植(交叉编译链为arm-hismall-linux-)转自 https://bl...

  • Linux下ARM程序的编译运行及调试

    Linux下ARM程序的编译运行及调试 环境:Ubuntu18.04 安装交叉编译环境arm-linux-gcc-...

  • tslib移植到arm(ubuntu 14)

    前提:安装好了交叉编译环境,参照:安装arm-linux- 交叉编译工具(ubuntu 14)。科普:Tslib是...

  • QT4 qrencode在arm的移植

    前提:安装好了交叉编译环境,参照:安装arm-linux- 交叉编译工具(ubuntu 14)。 安装 libpn...

网友评论

      本文标题:libcurl交叉编译arm版本动态库

      本文链接:https://www.haomeiwen.com/subject/yvnqzxtx.html