ROOT 安装错误:使用 -fPIC 重新编译

发布于 2024-12-23 17:07:42 字数 1108 浏览 5 评论 0 原文

我现在正在尝试安装 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有问题,而其他人则对其他库有问题......

任何人都可以帮助我......

I'm now trying to install the ROOT package available from

After ./configure, make; I got errors like below:

/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

I really read a lot about this problem; seems it's caused by running 32-bit software on 64-bit machine and I need to re-configure with -fPIC.
So I tried to run

CFLAGS="-O3 -fPIC" ./configure

or
According to Passing a gcc flag through makefile
Add inside .bashrc, I add:

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

However, none of them works!

This really drives me crazy....Only difference of my case with others is here I have problem with Python2.6, while others with other libraries...

Can anyone help me....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南汐寒笙箫 2024-12-30 17:07:42

该错误告诉您使用 -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 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文