Help: compiling error

Hi all,

I’m trying to install ROOT 5.20
Here is an error when I’m using ‘make’ and I don’t know who to fix it .

g++ -shared -Wl,-soname,libFFTW.so -m64 -O2 -o lib/libFFTW.so math/fftw/src/TFFTComplex.o math/fftw/src/TFFTComplexReal.o math/fftw/src/TFFTRealComplex.o math/fftw/src/TFFTReal.o math/fftw/src/G__FFTW.o -L/usr/local/lib -lfftw3
/usr/bin/ld: /usr/local/lib/libfftw3.a(plan-dft.o): relocation R_X86_64_32 against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libFFTW.so] Error 1

my system is Ubuntu 2008 x86_64 GNU/Linux
configure was successful, and I was using ‘./configure linuxx8664gcc’

Thanks,

Dan

nobody knows how to fix it ?
I’ve searched this problem and it may because of 32 bits software and 64 bits computer.
I’ve already install libfftw

/usr/lib/libfftw.a
/usr/lib/libfftw.la
/usr/lib/libfftw.so
/usr/lib/libfftw.so.2
/usr/lib/libfftw.so.2.0.5
/usr/lib/libfftw3.a
/usr/lib/libfftw3.la
/usr/lib/libfftw3.so
/usr/lib/libfftw3.so.3
/usr/lib/libfftw3.so.3.1.2
/usr/lib/libfftw3_threads.a
/usr/lib/libfftw3_threads.la
/usr/lib/libfftw3_threads.so
/usr/lib/libfftw3_threads.so.3
/usr/lib/libfftw3_threads.so.3.1.2
/usr/lib/libfftw3f.a
/usr/lib/libfftw3f.la
/usr/lib/libfftw3f.so
/usr/lib/libfftw3f.so.3
/usr/lib/libfftw3f.so.3.1.2
/usr/lib/libfftw3f_threads.a
/usr/lib/libfftw3f_threads.la
/usr/lib/libfftw3f_threads.so
/usr/lib/libfftw3f_threads.so.3
/usr/lib/libfftw3f_threads.so.3.1.2
/usr/lib/libfftw3l.a
/usr/lib/libfftw3l.la
/usr/lib/libfftw3l.so
/usr/lib/libfftw3l.so.3
/usr/lib/libfftw3l.so.3.1.2
/usr/lib/libfftw3l_threads.a
/usr/lib/libfftw3l_threads.la
/usr/lib/libfftw3l_threads.so
/usr/lib/libfftw3l_threads.so.3
/usr/lib/libfftw3l_threads.so.3.1.2

Thanks,

[quote]I’ve searched this problem and it may because of 32 bits software and 64 bits computer. [/quote]This is indeed the problem. You need to either disable the fftw3 (add --disable-fftw3) or install a 64 bit version of the fftw3 library (and make sure it is compiled with -fPIC).

Cheers,
Philippe.

[quote=“pcanal”][quote]I’ve searched this problem and it may because of 32 bits software and 64 bits computer. [/quote]This is indeed the problem. You need to either disable the fftw3 (add --disable-fftw3) or install a 64 bit version of the fftw3 library (and make sure it is compiled with -fPIC).

Cheers,
Philippe.[/quote]

the version I installed is a 64 version fftw3 library.
I’m using Ubuntu and use apt-get install libfftw3-dev to install this library.
the package I download is libfftw3-dev_3.1.2-3ubuntu1_amd64.deb

Did you compile the library with option -fPIC ?

Rene

I get the same error when trying to compile my ROOTv5.25.04 from source

/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libFFTW.so] Error 1
make: *** Waiting for unfinished jobs....
==> lib/libRLDAP.so done
/usr/bin/ld: /usr/local/lib/libgslcblas.a(sgemm.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/libgslcblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libMathMore.so] Error 1

I compiled fftw-3.2.2 and gsl-1.13 from source and I checked that -fPIC was on.
My system is a x86_64 running Fedora Core 11 with gcc 4.4.1 .

Any hint?

Maurizio

Hi Maurizio,

Did you also check that the new build created the .a files and copied them over into /usr/local/lib ?

Philippe.

Hi Philippe,

I’m not sure if this is what you want to know, hope it helps:

$ ll /usr/local/lib/libfftw3*
-rw-r--r--. 1 root root 2118382 2009-11-25 12:46 /usr/local/lib/libfftw3.a
-rwxr-xr-x. 1 root root     899 2009-11-25 12:46 /usr/local/lib/libfftw3.la
-rw-r--r--. 1 root root   45762 2009-11-25 12:46 /usr/local/lib/libfftw3_threads.a
-rwxr-xr-x. 1 root root     923 2009-11-25 12:46 /usr/local/lib/libfftw3_threads.la

$ ll /usr/local/lib/libgsl** -rw-r--r--. 1 root root 12546286 2009-11-25 12:43 /usr/local/lib/libgsl.a -rw-r--r--. 1 root root 1668170 2009-11-25 12:43 /usr/local/lib/libgslcblas.a -rwxr-xr-x. 1 root root 951 2009-11-25 12:43 /usr/local/lib/libgslcblas.la lrwxrwxrwx. 1 root root 20 2009-11-25 12:43 /usr/local/lib/libgslcblas.so -> libgslcblas.so.0.0.0 lrwxrwxrwx. 1 root root 20 2009-11-25 12:43 /usr/local/lib/libgslcblas.so.0 -> libgslcblas.so.0.0.0 -rwxr-xr-x. 1 root root 954376 2009-11-25 12:43 /usr/local/lib/libgslcblas.so.0.0.0 -rwxr-xr-x. 1 root root 919 2009-11-25 12:43 /usr/local/lib/libgsl.la lrwxrwxrwx. 1 root root 16 2009-11-25 12:43 /usr/local/lib/libgsl.so -> libgsl.so.0.14.0 lrwxrwxrwx. 1 root root 16 2009-11-25 12:43 /usr/local/lib/libgsl.so.0 -> libgsl.so.0.14.0 -rwxr-xr-x. 1 root root 7125980 2009-11-25 12:43 /usr/local/lib/libgsl.so.0.14.0

This is the first time I try to compile ROOT using fftw and gsl.

Maurizio

Hi,

So it appears you do have the new files … but apparently ld does not think that have been build with -fPIC (I have no clue why unless this is true for either the mentioned .o files itself or the .a itself).

Cheers,
Philippe.