Makefile 根目录安装错误:使用-fPIC重新编译

Makefile 根目录安装错误:使用-fPIC重新编译,makefile,root,fpic,Makefile,Root,Fpic,我现在正在尝试从安装根程序包 在/configure之后,进行;我得到如下错误: /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/co

我现在正在尝试从安装根程序包

/configure之后,进行
;我得到如下错误:

/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

或 根据 添加内部。
bashrc
,我添加:

export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
然而,它们都不起作用

这真的让我发疯了…我和其他人的唯一区别是我对Python2.6有问题,而其他人对其他库有问题


有人能帮我吗?

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