ROOT 安装错误:使用 -fPIC 重新编译
我现在正在尝试安装 http://root 提供的 ROOT 软件包
- 。 cern.ch/drupal/content/installing-root-source
在./configure之后,make
;我收到如下错误:
/usr/bin/ld: /share/lib/python2.6/config/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/share/lib/python2.6/config/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libPyROOT.so] Error 1
我确实阅读了很多有关此问题的内容;似乎是由于在 64 位计算机上运行 32 位软件引起的,我需要使用 -fPIC 重新配置。 所以我尝试运行
CFLAGS="-O3 -fPIC" ./configure
或
根据通过makefile传递gcc标志
在.bashrc
里面添加,我添加:
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
但是,它们都不起作用!
这真的让我发疯......我的情况与其他人的唯一区别是我对Python2.6有问题,而其他人则对其他库有问题......
任何人都可以帮助我......
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误告诉您使用
-fPIC
重新编译libpython2.6.a
,而不是您安装的软件。实际上,这意味着您正在尝试将共享库链接到libpython2.6.a
,而您可能需要将其链接到libpython2.6.so
。因此共享的-lpython2.6
要么没有安装,要么没有找到。解决这个问题。The error tells you to recompile
libpython2.6.a
with-fPIC
, not the software you install. Actually it means that you are trying to link a shared library againstlibpython2.6.a
while you probably need to link it againstlibpython2.6.so
. So the shared-lpython2.6
is either not installed or not found. Fix that.