[GRASSLIST:3910] Re: building gdal for grass57

Glynn Clements glynn.clements at virgin.net
Wed Jul 14 14:07:31 EDT 2004


Kirk R. Wythers wrote:

> > Was grass57 built with --with-gdal=/usr/local/bin/gdal-config or the  
> > like?
> 
> yes, exactly. And gdal is working fine in grass53.
> 
> > Did the 5.7 ./configure summary say it will use GDAL?
> 
> yes
> 
> 
> > can you cd raster/r.in.gdal and run make?
> 
> No. I get the errror:

> ld: Undefined symbols:
> _GBGetSymbol

Right. The 5.0/5.3 version of configure.in adds -DUSE_GDAL_H to
GDAL_CFLAGS if --with-gdal is used, while the 5.7 version doesn't.

This flag will effectively disable compilation of gdalbridge.c and
gbgetsymbol.c; both files are bracketed with:

	#ifndef USE_GDAL_H
	...
	#endif

You could just use e.g.:

	CFLAGS='-DUSE_GDAL_H -g -O2' ./configure ...

However, the solution is probably to either:

a) add the flag to configure.in, as is done in 5.0/5.3, or

b) explicitly set CMD_OBJS=main.o in the r.in.gdal Makefile, so that
it doesn't attempt to compile gbgetsymbol.c or gdalbridge.c, or

c) add empty gbgetsymbol.c and gdalbridge.c files to the 5.7
repository, so that "make mix" doesn't link to the 5.3 versions.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list