linux - 无法将 libCURL 与 OpenSSL 链接

标签 linux cross-platform openssl libcurl

构建和安装 OpenSSL 1.0.0.e 没有问题,我所要做的就是在 Makefile 中设置正确的编译器。

在没有 OpenSSL 的情况下编译 libCURL 工作正常,但是在使用 OpenSSL 编译时

./configure --host=mipsel-angstrom-linux PCRECONFIG=/usr/local/crosstoolchain/usr/local/bin/pcre-config --with-openssl

我收到以下错误消息:

ld: libssl.a(s2_clnt.o): relocation R_MIPS_HI16 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
libssl.a: could not read symbols: Bad value

我尝试用 -fPIC 编译 OpenSSL,也尝试为 libCURL 使用 -fPIC 无济于事。我该如何解决这个问题?

最佳答案

我认为这最有效,因为它不涉及破解文件。

./Configure linux-x86_64 -fPIC

我是通过运行找到的

./config -h

并做出一些猜测。我通过使用确认它有效

grep PIC Makefile

关于linux - 无法将 libCURL 与 OpenSSL 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8010024/

相关文章:

cocoa - 将 Cocoa 应用程序变成跨平台应用程序?

python - 我的 openssl 和 ssl 默认 CA 证书路径是什么?

ssl - HAproxy 没有返回 : Response not sent 的 OCSP 响应

linux - 在 Linux 上静态和动态链接同一个库

linux - 来自外部 Parquet 项目静态库的 "undefined reference"错误

java - line.separator 不替换\n

security - "an introduction to openssl programming."文章。过期证书

linux - 如何在 Windows 平台上从 Jenkins 运行 qnx 可执行文件?

linux - 编译FTDI内核模块

android - 我可以包含一个自动完成和跨平台(iOS/Android)的字符串文件吗?