[GRASSLIST:7213] Re: Compile Errors

Glynn Clements glynn at gclements.plus.com
Fri Jun 17 14:02:28 EDT 2005

Thomas Colson wrote:

> Yeah, I kinda figured that a great deal of stuff wasn't being built as it
> should. So how do you correct the error on the stuff that should be built,
> but isn't being built? How can an "out of box" install of Grass6 on a new
> install of Fedora have so many library problems? I'd like to think I spent
> a  great deal of time making sure all the correct versions of the
> dependancies were installed prior to the grass build, but it seems like
> there are some undocumented secret dependancies....

> some libraries did't build, so anything that needs them will fail.
> cd lib/gmath
> make
> gcc -shared -o
> /grass6/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.6.1.cvs.so


> /usr/bin/ld: /usr/local/lib/libfftw.a(fftwnd.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC

It appears that /usr/local/lib/libfftw.a has been built without the
-fPIC switch, which means that it can only be linked directly into an
executable, not into a shared library. GRASS needs FFTW to be usable
by shared libraries.

Can FFTW be built as a shared library on x86-64? That would be the
simplest solution. Otherwise try adding -fPIC when building FFTW, e.g.

	CFLAGS='-g -02 -fPIC' ./configure ...

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list