[GRASS-user] Problem installing GRASS 6.4.1 on Ubuntu 11.x
Glynn Clements
glynn at gclements.plus.com
Wed Jun 22 07:46:16 EDT 2011
Thomas.Adams at noaa.gov 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 <glynn at gclements.plus.com>
More information about the grass-user
mailing list