[email protected] wrote:

> I keep having problems with fftw, which really surprises me. I get:

> If I go into: /home/teaiii/rgrass_dir/grass-6.4.1/lib/gmath and make, I get:
> 
> gcc -shared -o 
> /home/teaiii/rgrass_dir/grass-6.4.1/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.6.4.1.so
>  -L/home/teaiii/rgrass_dir/grass-6.4.1/dist.x86_64-unknown-linux-gnu/lib 
> -Wl,--export-dynamic 
> -Wl,-rpath-link,/home/teaiii/rgrass_dir/grass-6.4.1/dist.x86_64-unknown-linux-gnu/lib
>  -L/usr/local/pgsql/lib   OBJ.x86_64-unknown-linux-gnu/brent.o 
> OBJ.x86_64-unknown-linux-gnu/dalloc.o OBJ.x86_64-unknown-linux-gnu/del2g.o 
> OBJ.x86_64-unknown-linux-gnu/eigen.o 
> OBJ.x86_64-unknown-linux-gnu/eigen_tools.o OBJ.x86_64-unknown-linux-gnu/fft.o 
> OBJ.x86_64-unknown-linux-gnu/findzc.o OBJ.x86_64-unknown-linux-gnu/gauss.o 
> OBJ.x86_64-unknown-linux-gnu/getg.o OBJ.x86_64-unknown-linux-gnu/ialloc.o 
> OBJ.x86_64-unknown-linux-gnu/jacobi.o OBJ.x86_64-unknown-linux-gnu/la.o 
> OBJ.x86_64-unknown-linux-gnu/lu.o OBJ.x86_64-unknown-linux-gnu/max_pow2.o 
> OBJ.x86_64-unknown-linux-gnu/mult.o OBJ.x86_64-unknown-linux-gnu/rand1.o 
> OBJ.x86_64-unknown-linux-gnu/svd.o -lgrass_gis -lgrass_datetime -lz     
> -lfftw !
 -l
> m   -lm   && \
>       (cd 
> /home/teaiii/rgrass_dir/grass-6.4.1/dist.x86_64-unknown-linux-gnu/lib; ln -f 
> -s libgrass_gmath.6.4.1.so 
> /home/teaiii/rgrass_dir/grass-6.4.1/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.so)
> /usr/bin/ld: /usr/local/lib/libfftw.a(fftwnd.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/libfftw.a: could not read symbols: Bad value

Are there no pre-built FFTW packages? FWIW:

        http://packages.ubuntu.com/search?keywords=fftw-dev

As you've already noticed, the problem is due to the lack of PIC
(position-independent code) within the static FFTW library, which
means that shared libraries cannot be linked against it.

Enabling PIC for FFTW will fix that, but building FFTW as a shared
library is better, and using the OS's offical FFTW packages (if they
exist) is better still.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to