Results 1 to 4 of 4
HI,
I was trying to compile a program and got an error like:
#########: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
How to ...
- 03-19-2008 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 96
how to recompile with -fPIC?
HI,
I was trying to compile a program and got an error like:
#########: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
How to recompile with -fPIC? I normally use: ./configure, then, make, then, make install.
Thanks!
phsieh2005
- 03-19-2008 #2Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
Hi,
I found this link, it is for a gentoo dist. but maybe it will help.
Gentoo Linux Documentation -- HOWTO fix -fPIC errors
- 03-20-2008 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 96
Hi, wowbag1,
Thanks for the link.
The package I am compiling requires two libraries: openMPI and hypre.
When I did export CFLAGS=-fPIC, I was able to compile my package successfully with only openMPI. With both openMPI and hypre, I got the same error as before.
I am still struggling what to do based on the link you gave.
phsieh2005
- 03-21-2008 #4Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
I maybe starting to see the problem, have a look at these links to see if they help.
[CMake] relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
Open MPI User's Mailing List Archives
Shared library relocation R_X86_64_32 solution on amd64?


Reply With Quote