Just compiled the latest gdal (1.11) and grass (trunk - rev 63950) and now want to compile gdal again with grass support. However, I am getting an error, which appears to be a problem in gdal/frmts/grass (see below). Any idea how to solve this?
paulo@paulo-HP-Z600-Workstation:~/Software/spatial/gdal/frmts/grass$ make
/bin/bash /home/paulo/Software/spatial/gdal/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DGRASS_GISBASE="/usr/local/grass7/grass-7.1.svn" -I/usr/local/grass7/grass-7.1.svn/include -I/home/paulo/Software/spatial/gdal/port -I/home/paulo/Software/spatial/gdal/gcore -I/home/paulo/Software/spatial/gdal/alg -I/home/paulo/Software/spatial/gdal/ogr -I/home/paulo/Software/spatial/gdal/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/paulo/Software/spatial/gdal/port -c -o grass57dataset.lo grass57dataset.cpp
libtool: compile: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DGRASS_GISBASE="/usr/local/grass7/grass-7.1.svn" -I/usr/local/grass7/grass-7.1.svn/include -I/home/paulo/Software/spatial/gdal/port -I/home/paulo/Software/spatial/gdal/gcore -I/home/paulo/Software/spatial/gdal/alg -I/home/paulo/Software/spatial/gdal/ogr -I/home/paulo/Software/spatial/gdal/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/paulo/Software/spatial/gdal/port -c grass57dataset.cpp -fPIC -DPIC -o .libs/grass57dataset.o
grass57dataset.cpp: In member function ‘CPLErr GRASSRasterBand::ResetReading(Cell_head*)’:
grass57dataset.cpp:440:61: error: ‘G__setenv’ was not declared in this scope
G__setenv( “GISDBASE”, ((GRASSDataset )poDS)->pszGisdbase );
^
grass57dataset.cpp: In static member function 'static GDALDataset GRASSDataset::Open(GDALOpenInfo*)':
grass57dataset.cpp:899:37: error: ‘G__setenv’ was not declared in this scope
G__setenv( “GISDBASE”, pszGisdb );
^
make: *** [grass57dataset.lo] Error 1
On Sun, Jan 4, 2015 at 10:30 PM, Markus Neteler <neteler@osgeo.org> wrote:
On Sun, Jan 4, 2015 at 3:48 PM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:
> Just compiled the latest gdal (1.11) and grass (trunk - rev 63950) and
now
> want to compile gdal again with grass support.
Compiling gdal with grass support takes more time but isn't terribly
difficult. If it works, which it did for the last half a year or so (during
which I updated grass various times, each time also recompiling gdal). But
yes, I would rather use the plugin as that is quicker. However, with grass7
I have never got it to work. The problem is that I don't really understand
how to use the various patches and suggestions in above-mentioned ticket.
Perhaps somebody could summarize how to do this in the wiki?
> However, I am getting an
> error, which appears to be a problem in gdal/frmts/grass (see below). Any
> idea how to solve this?
2015-01-04 15:48 GMT+01:00 Paulo van Breugel <p.vanbreugel@gmail.com>:
Just compiled the latest gdal (1.11) and grass (trunk - rev 63950) and now
want to compile gdal again with grass support. However, I am getting an
error, which appears to be a problem in gdal/frmts/grass (see below). Any
idea how to solve this?
[...]
grass57dataset.cpp:440:61: error: 'G__setenv' was not declared in this scope
G__setenv( "GISDBASE", ((GRASSDataset *)poDS)->pszGisdbase );
^
grass57dataset.cpp: In static member function 'static GDALDataset*
GRASSDataset::Open(GDALOpenInfo*)':
grass57dataset.cpp:899:37: error: 'G__setenv' was not declared in this scope
G__setenv( "GISDBASE", pszGisdb );
^
make: *** [grass57dataset.lo] Error 1
these errors are related to the recent API changes in GRASS 7. I fixed
that in gdal trunk [1] and later will do backport it to gdal 1.11
branch.
Hi Martin and list,
would it be possible to reflect these changes in the Ubuntu packages on the gdal launchpad (ubuntugis-unstable) and making them compatible with the grass7 packages?
I tried building gdal 1.11.2 --with-grass against preinstalled grass7 packages (Ubuntu 14.04), but the grass7 (and qgis for that matter) are still depending on gdal-1.11.1. Now just to be able to browse the GRASS database in QGIS it would make it necessary to build all three from source. Or are there any ideas on avoiding that? The gdal-grass plugin unfortunately doesnt work with grass-7.
Thanks,
Michel
···
On 01/07/2015 12:51 PM, Paulo van Breugel wrote:
Hi Martin, just recompiled GDAL against GRASS, and I can confirm it works. Thanks for the fix!
Hi Martin and list,
would it be possible to reflect these changes in the Ubuntu packages on
the gdal launchpad (ubuntugis-unstable) and making them compatible with
the grass7 packages?
You should direct this question to the UbuntuGIS list.
I tried building gdal 1.11.2 --with-grass against preinstalled grass7
packages (Ubuntu 14.04), but the grass7 (and qgis for that matter) are
still depending on gdal-1.11.1. Now just to be able to browse the GRASS
database in QGIS it would make it necessary to build all three from
source. Or are there any ideas on avoiding that? The gdal-grass plugin
unfortunately doesnt work with grass-7.
The libgdal-grass Debian package has support for GRASS 7, but since
UbuntuGIS is highly understaffed, there is hardly anyone actively
maintaining the packages there.
If you care about GIS software on Ubuntu, consider contributing the
UbuntuGIS packaging. It's probably a good idea if the GRASS upstream
packagers actively contribute to the GRASS packages in UbuntuGIS like jef
does for QGIS.
Ok thanks for info, Bas, and sorry for the Ubuntu noise. I'll get in touch with the ubuntuGIS list then, I'd be happy to build packages at least for the new Ubuntu LTS 14.04 although I'm a packaging newbie.
Regards,
Michel
On 03/11/2015 10:55 AM, Sebastiaan Couwenberg wrote:
Hi Martin and list,
would it be possible to reflect these changes in the Ubuntu packages on
the gdal launchpad (ubuntugis-unstable) and making them compatible with
the grass7 packages?
You should direct this question to the UbuntuGIS list.
I tried building gdal 1.11.2 --with-grass against preinstalled grass7
packages (Ubuntu 14.04), but the grass7 (and qgis for that matter) are
still depending on gdal-1.11.1. Now just to be able to browse the GRASS
database in QGIS it would make it necessary to build all three from
source. Or are there any ideas on avoiding that? The gdal-grass plugin
unfortunately doesnt work with grass-7.
The libgdal-grass Debian package has support for GRASS 7, but since
UbuntuGIS is highly understaffed, there is hardly anyone actively
maintaining the packages there.
If you care about GIS software on Ubuntu, consider contributing the
UbuntuGIS packaging. It's probably a good idea if the GRASS upstream
packagers actively contribute to the GRASS packages in UbuntuGIS like jef
does for QGIS.