Building 5.23.02 on SL4.7, gcc 3.4.6

Dear rooters,
I am trying to build 5.23.02 on SL4.7, gcc 3.4.6 and get when linking gsl:

g++ -shared -Wl,-soname,libMathMore.so -m64 -O2 -o
....
/usr/lib64/libgsl.a /usr/lib64/libgslcblas.a

and get:

/usr/bin/ld: /usr/lib64/libgslcblas.a(sgemm.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libgslcblas.a: could not read symbols: Bad value

I wonder why it picks /usr/lib64/l/libgslcblas.a instead of /usr/lib64/libgslcblas.so
which is on our system.

Cheers
Otto

Hi,

by default ROOT uses the static version of GSL, and on a 64 bit machine you must compile it with -fPIC.
See for example root.cern.ch/phpBB2/viewtopic.php?t=6148

If you want to use the shared version of GSL re-configure ROOT with the option

–enable-gsl-shared

Best Regards

Lorenzo