[GRASS-dev] ogsf fails to build
Glynn Clements
glynn at gclements.plus.com
Sat Oct 21 08:41:49 EDT 2006
Joel Pitt wrote:
> Trying to compile latest CVS update I get the following error when
> trying to compile the ogsf library:
>
> /usr/bin/ld: /usr/lib/libavcodec.a(utils.o): relocation R_X86_64_32
> against `first_avcodec' can not be used when making a shared object;
> recompile with -fPIC
> /usr/lib/libavcodec.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [/home/joel/src/grass6/dist.x86_64-unknown-linux-gnu/lib/libgrass_ogsf.6.3.cvs.so]
> Error 1
>
> As the error probably implies I used "--enable-64bit" when running configure.
> Running 64 bit version of Ubuntu dapper and compiling with gcc-3.4.
> I've got the latest libavcodec-dev package installed.
>
> I tried adding the -fPIC option to the EXTRA_CFLAGS variable in the
> Makefile but didn't seem to make any difference with a "make clean"
> followed by "make".
There are a number of possible solutions:
1. Don't use --with-ffmpeg.
2. Recompile ffmpeg with -fPIC.
3. Remove $(FFMPEGLIB) from the definition of EXTRA_LIBS in
lib/ogsf/Makefile, and add it to the definition of OGSFLIB in
include/Make/Grass.make[.in] instead.
4. Remove $(FFMPEGLIB) from the definition of EXTRA_LIBS in
lib/ogsf/Makefile, and add it to the definition of SURFLIB in
visualization/nviz/src/Makefile instead.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list