我正在尝试在Ubuntu 16.04上使用boringssl构建curl。
我已经把boringssl构建好了。
对于curl 7.53,我使用以下命令进行配置:
./configure --with-ssl=/home/john/dev/boringssl输出显示“support: enabled (BoringSSL)”OK。
但是当我使用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);
^并以以下方式结束
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我不确定当curl配置为使用boringssl构建时是否应该使用这个/usr/include/openssl/ui.h头文件,这个文件似乎只存在于OpenSSL中,而不存在于boringssl中。
发布于 2017-02-22 20:38:46
在boringssl树中没有openssl/ui.h,您的构建显然找到了另一组包含文件(我猜是纯OpenSSL )。
这是我如何使用boringssl构建的:
构建钻探
$HOME/src是我在此示例中放置代码的位置。你可以随心所欲地挑选。
$ cd $HOME/src
$ git clone https://boringssl.googlesource.com/boringssl
$ cd boringssl
$ mkdir build
$ cd build
$ cmake ..
$ make设置构建树以通过curl的configure进行检测
在boringssl源码树根目录中,确保有一个lib和一个include目录。构建目录应该包含两个库(我将它们符号链接到lib目录)。默认情况下,include目录已经存在。如下所示创建并填充lib (在源代码树根目录中发出的命令,而不是在build/子目录中发出的命令)。
$ mkdir lib
$ cd lib
$ ln -s ../build/ssl/libssl.a
$ ln -s ../build/crypto/libcrypto.a配置curl
LIBS=-lpthread ./configure --with-ssl=$HOME/src/boringssl (在这里我指出了boringssl树的根)
验证在配置运行结束时,它应该显示检测到要使用的BoringSSL
构建卷曲
在curl源代码树中运行make
现在你可以用make install等来正常安装curl了。
https://stackoverflow.com/questions/42391088
复制相似问题