2011-12-31 93 views
0

现在我想从ROOT安装错误:与-fPIC

安装可用根包./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的,而另一些与其他图书馆...

谁能帮助我....

回答

2

该错误告诉您使用-fPIC重新编译libpython2.6.a,而不是您安装的软件。实际上,这意味着您正试图将共享库链接到libpython2.6.a,而您可能需要将其与libpython2.6.so链接。因此共享的-lpython2.6未安装或未找到。修复。