2011-12-31 91 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未安裝或未找到。修復。