[GRASSLIST:3911] Re: building gdal for grass57

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Jul 14 14:24:14 EDT 2004


On Wed, 14 Jul 2004, Glynn Clements wrote:

>
>>
>>> 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.
>

The r.in.gdal directory is not copied over with make mix any more; the 
version in 5.7 is different and uses GPJ_wkt_to_grass() to convert the 
projection information instead of the old wkt_to_grass() internal to GDAL. 
I changed that a week or two ago and at the same time removed the setting 
of -DUSE_GDAL_H from the configure script.

(so the problem here was probably that Kirk didn't run make mixclean to 
remove the gdalbridge.c and gbgetsymbol.c and the 5.7 build system 
automatically compiles every C file in the directory)

Markus knew I was doing that but I will start announcing important changes 
like that on the developers mailing list now there is more interest :)

Paul




More information about the grass-user mailing list