我正试图在Ubuntu 16.04上用boringssl构建curl.
我有无聊的建立好.
使用curl 7.53我配置使用:
./configure --with-ssl=/home/john/dev/boringssl
Run Code Online (Sandbox Code Playgroud)
输出显示"SSL支持:启用(BoringSSL)"确定.
但是当我make开始时,我会遇到错误
CC vtls/libcurl_la-openssl.lo
In file included from vtls/openssl.c:86:0:
/usr/include/openssl/ui.h:85:1: error: unknown type name ‘UI’
UI *UI_new(void);
^
/usr/include/openssl/ui.h:86:1: error: unknown type name ‘UI’
UI *UI_new_method(const UI_METHOD *method);
^
/usr/include/openssl/ui.h:86:25: error: unknown type name ‘UI_METHOD’
UI *UI_new_method(const UI_METHOD *method);
^
Run Code Online (Sandbox Code Playgroud)
并以.结尾
Makefile:2023: recipe for target 'vtls/libcurl_la-openssl.lo' failed
make[2]: *** [vtls/libcurl_la-openssl.lo] Error 1
make[2]: Leaving directory '/home/john/dev/curl-7.53.0/lib'
Makefile:734: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/john/dev/curl-7.53.0/lib'
Makefile:893: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Run Code Online (Sandbox Code Playgroud)
我不确定/usr/include/openssl/ui.h当curl配置为使用boringssl构建时是否应该使用此标头,似乎此文件仅存在于OpenSSL中,而不是枯燥乏味.
openssl/ui.h在boringssl树中没有,你的构建清楚地发现了另一组包含文件(我猜是普通的OpenSSL).
这就是我用boringssl构建的方式:
$ HOME/src是我在这个例子中放置代码的地方.你可以选择任何你喜欢的地方.
$ cd $HOME/src
$ git clone https://boringssl.googlesource.com/boringssl
$ cd boringssl
$ mkdir build
$ cd build
$ cmake ..
$ make
Run Code Online (Sandbox Code Playgroud)
在boringssl源树根中,确保有一个lib和一个includedir.该lib目录应该包含两个库(我让他们到符号连接的build目录).该include目录已经存在默认.lib 像这样制作和填充(在源树根中发出的命令,而不是在build/子目录中).
$ mkdir lib
$ cd lib
$ ln -s ../build/ssl/libssl.a
$ ln -s ../build/crypoto/libcrypto.a
Run Code Online (Sandbox Code Playgroud)
LIBS=-lpthread ./configure --with-ssl=$HOME/src/boringssl (我指出了无聊树的根)
验证在配置运行结束时,应该说它检测到要使用的BoringSSL
make在curl源代码树中运行
现在你可以正常安装curl make install等.
| 归档时间: |
|
| 查看次数: |
1513 次 |
| 最近记录: |