views:

62

answers:

1

Hello all,

I have a problem when I try to build IcePy (from Ice 3.3.1) (for python 2.4.4). Compilation, testing and install of Ice itself (cpp version) is OK but when I tried to build the python interface ("py" directory) I get the following error (sorry for the truncated paths) :

.../lib/python2.4/config/libpython2.4.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be used when making
a shared object; recompile with -fPIC
.../lib/python2.4/config/libpython2.4.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Is anybody able to explain me what this problem of relocation means (or at least give me a link) ? Thank you in avdance for your help. Even if you don't know anything about Ice, your comments on the error message are welcome. (of course the compilation line already contained -fPIC so the "recompile with -fPIC" does not really help me...)

+1  A: 

The abstract.o was very likely not compiled with -fPIC, so the advice linker gave you is correct.

Go back to your build log, and verify that -fPIC is not there when libpython2.4.a was built. Note that -fPIC is needed for libpython2.4.a itself, not just for the IcePy.

If it is there, you have found a bug in GCC (which is somewhat unlikely).

You can learn about linkers and relocations here or here.

Employed Russian
Thank your for your answer. I think I will have definitely to recompile python (and it's not the first time but I wanted to avoid it). I will take a look at your links. That's exactly what I was looking for.
Elenaher