For some reason I have access to gdal through grass53, but not grass57. I just cvs up'ed gdal and was getting ready to rebuild it when I noticed an option for building with libgrass.
Does gdal need to be built with:
--with-grass=ARG Include GRASS support (ARG=no or libgrass path)
option?
I just can't remember from the last time I did this, and if that is the case, where (in the usr/local) world, does librass get placed?
find / -name libgrass was coming up empty.
Thanks
Kirk
------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------
For some reason I have access to gdal through grass53, but not
grass57. I just cvs up'ed gdal and was getting ready to rebuild it
when I noticed an option for building with libgrass.
Does gdal need to be built with:
--with-grass=ARG Include GRASS support (ARG=no or libgrass path)
option?
I just can't remember from the last time I did this, and if that is
the case, where (in the usr/local) world, does librass get placed?
find / -name libgrass was coming up empty.
No.
You should only configure gdal with --with-grass if you need GDAL to be
able to export GRASS maps without GRASS being installed. It is not
needed, and can cause r.in.gdal to break if it is used. Leave it off.
[this may be out of date/fixed now, but is how things used to be]
Was grass57 built with --with-gdal=/usr/local/bin/gdal-config or the like?
Did the 5.7 ./configure summary say it will use GDAL?
can you cd raster/r.in.gdal and run make?
For some reason I have access to gdal through grass53, but not grass57.
I just cvs up'ed gdal and was getting ready to rebuild it when I
noticed an option for building with libgrass.
Does gdal need to be built with:
--with-grass=ARG Include GRASS support (ARG=no or libgrass path)
option?
No. In fact, using that option may result in a GDAL library which
doesn't work with GRASS.
I just can't remember from the last time I did this, and if that is the
case, where (in the usr/local) world, does librass get placed?
find / -name libgrass was coming up empty.
libgrass isn't part of GRASS; it's a separate (and entirely
"unofficial") package. You can't build it from the stock GRASS source
code.
------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------
Never mind folks. Seem that I needed to simply clean the links to 53, then update the 53 cvs head. Todays mantra... "when having prblems, read the INSTALL file, when having problems, read the INSTALL file"
Sorry,
Kirk
------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------
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
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
Exactly. See my confession in an earlier email about not reading the INSTALL file carefully.
At least I'm following the logic of what was going on now. Thanks
Kirk
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
------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------