针对本地符号重定位 R_X86_64_32 错误
我正在尝试安装具有 Apache 支持的 Subversion。 我使用 --enable-shared 安装了
标志。 但是,在尝试安装 subversion 时,我收到以下错误:apr
、apr-utils
、neon
和 OpenSSL
/usr/bin/ld: /usr0/software/openssl/ossl/lib/libssl.a(s23_clnt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr0/software/openssl/ossl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libserf-0.la] Error 1
make[1]: Leaving directory `/usr0/sources/svn/subversion-1.6.3/serf'
make: *** [external-all] Error 1
Subversion 常见问题解答中指出,如果收到此错误,我应该使用 --enable-shared
标志,它应该可以工作。 然而,这并没有帮助。 关于如何解决这个问题有什么想法吗?
I am trying to install Subversion with Apache support. I installed apr
, apr-utils
, neon
, and OpenSSL
with the --enable-shared
flag. However, I get the following error when trying to install subversion:
/usr/bin/ld: /usr0/software/openssl/ossl/lib/libssl.a(s23_clnt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr0/software/openssl/ossl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libserf-0.la] Error 1
make[1]: Leaving directory `/usr0/sources/svn/subversion-1.6.3/serf'
make: *** [external-all] Error 1
On the Subversion FAQ it is stated that if I get this error, I should use the --enable-shared
flag and it should work. However, that doesn't help. Any ideas on how to get around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现问题出在 openssl 安装上。 重新安装 openssl 并启用共享有效。
I figured out that the problem was with the openssl install. Reinstalling openssl with enable-shared worked.
我通过在 crypto\cryptolib.h 中向 OPENSSL_ia32cap_P 添加隐藏属性并重新编译来解决该问题。
I solve it with adding hidden attribute to OPENSSL_ia32cap_P in crypto\cryptolib.h and recompile.
我在其他几个非 openssl 场景中遇到过这个问题,我发现这通常与没有打开共享库有关。
将
--enable-shared
添加到您的配置行似乎可以修复它。I've run into this in a couple of other non-openssl scenarios, and I've found that this is generally related to not having shared libraries turned on.
Adding
--enable-shared
to your configure line seems to fix it.