Find the answer to your Linux question:
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 ...
  1. #1
    Just 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

  2. #2
    Linux 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

  3. #3
    Just 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

  4. #4
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...