0

我现在正在尝试安装可用的 ROOT 包

之后./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

或者根据Passing a gcc flag through makefile 添加到里面。bashrc, 我加:

export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"

但是,它们都不起作用!

这真的让我发疯了......我的情况与其他人的唯一区别是在这里我有 Python2.6 的问题,而其他人有其他库......

谁能帮我....

4

1 回答 1

2

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 against libpython2.6.a while you probably need to link it against libpython2.6.so. So the shared -lpython2.6 is either not installed or not found. Fix that.

于 2011-12-31T09:20:10.960 回答