Error linking shared library

Hi everyone. I am new to ubuntu so forgive me if my question is silly.
I am installing root v5-34-21 and I am having 2 problems:

  1. When I type ./configure --all --enable-shared it goes into an infinite loop.

  2. When i terminate it in the middle after i see the message “to build root: type make” and type make -j4 it compiles till 97% and then gives the following error:

[b]Linking CXX shared library ../../lib/libPyROOT.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(myreadline.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libPyROOT.so] Error 1
make[1]: *** [bindings/pyroot/CMakeFiles/PyROOT.dir/all] Error 2
make: *** [all] Error 2[/b]

Can anyone please help me?
Thanks.

Hi,

on what operating system are you?
If you are on linux, do you have a python shared library somewhere (libpython2.7.so)?
The issue is linked to the fact that libpython does not provide position independent code. A cause could be a statically linked python.

Cheers,
Danilo

Hi,

I met this problem, too.
Did you get this problem solved?

Nim

Next time, please open a new topic, instead of resurrecting a very old one.

As Danilo says, please make sure to link against the python shared library (.so) and not the static one (.a).