OSGeo/gdal-grass

Fails to build with GDAL 3.6.0

sebastic opened this issue · 4 comments

gdal-grass fails to build with GDAL 3.6.0-rc1:

g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/lib/grass82\" -I/usr/include/gdal -I/usr/lib/grass82/include -I/usr/include/postgresql -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/libgdal-grass-1.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -c -o grass.o grass.cpp
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/lib/grass82\" -I/usr/include/gdal -I/usr/lib/grass82/include -I/usr/include/postgresql -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/libgdal-grass-1.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -c -o ogrgrassdriver.o ogrgrassdriver.cpp
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/lib/grass82\" -I/usr/include/gdal -I/usr/lib/grass82/include -I/usr/include/postgresql -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/libgdal-grass-1.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -c -o ogrgrassdatasource.o ogrgrassdatasource.cpp
grass.cpp:106:17: error: 'const char* GRASSDataset::_GetProjectionRef()' marked 'override', but does not override
  106 |     const char *_GetProjectionRef(void) override;
      |                 ^~~~~~~~~~~~~~~~~
grass.cpp: In member function 'virtual const OGRSpatialReference* GRASSDataset::GetSpatialRef() const':
grass.cpp:108:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
  108 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ogrgrassdriver.cpp: In function 'void RegisterOGRGRASS()':
ogrgrassdriver.cpp:99:39: warning: 'static OGRSFDriverRegistrar* OGRSFDriverRegistrar::GetRegistrar()' is deprecated [-Wdeprecated-declarations]
   99 |     OGRSFDriverRegistrar::GetRegistrar()->RegisterDriver( poDriver );
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from ogrgrass.h:33,
                 from ogrgrassdriver.cpp:29:
/usr/include/gdal/ogrsf_frmts.h:491:34: note: declared here
  491 |     static OGRSFDriverRegistrar *GetRegistrar() OGR_DEPRECATED("Use GDALDriverManager class instead");
      |                                  ^~~~~~~~~~~~
ogrgrassdriver.cpp:99:57: warning: 'void OGRSFDriverRegistrar::RegisterDriver(OGRSFDriver*)' is deprecated [-Wdeprecated-declarations]
   99 |     OGRSFDriverRegistrar::GetRegistrar()->RegisterDriver( poDriver );
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/gdal/ogrsf_frmts.h:494:17: note: declared here
  494 |     void        RegisterDriver( OGRSFDriver * poDriver ) OGR_DEPRECATED("Use GDALDriverManager class instead");
      |                 ^~~~~~~~~~~~~~

Full buildlog: libgdal-grass_1.0.1-2_amd64.txt

Fix in #13 (only compile tested)

Can we get this into the 1.0.2 milestone (which doesn't exist yet)?

Can we get this into the 1.0.2 milestone (which doesn't exist yet)?

Sorry, I missed the milestone management. Promise to do better in the future.