ubarsc / kealib

KEALib provides an implementation of the GDAL data model. The format supports raster attribute tables, image pyramids, meta-data and in-built statistics while also handling very large files and compression throughout.
http://kealib.org/
MIT License
12 stars 7 forks source link

[Bug] Compilation error with OldSetGCPsFromNew and GDAL 3.6.0 #26

Closed neteler closed 1 year ago

neteler commented 2 years ago

kealib-1.4.15 fails to compile on Fedora 38 which we plan to add as a GDAL 3.6.0 driver:

https://kojipkgs.fedoraproject.org//work/tasks/6017/94086017/build.log

[ 80%] Linking CXX executable test1
cd /builddir/build/BUILD/kealib-1.4.15/redhat-linux-build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/test1.dir/link.txt --verbose=1
/usr/lib64/ccache/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -DNDEBUG -DNDEBUG -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes CMakeFiles/test1.dir/tests/test1.cpp.o -o test1  -Wl,-rpath,/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build/src libkea.so.1.4.15 /usr/lib64/libhdf5_cpp.so /usr/lib64/libhdf5.so /usr/lib64/libhdf5_hl_cpp.so /usr/lib64/libhdf5_hl.so 
gmake[2]: Leaving directory '/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build'
[ 80%] Built target test1
[ 86%] Building CXX object gdal/CMakeFiles/gdal_KEA.dir/keamaskband.cpp.o
cd /builddir/build/BUILD/kealib-1.4.15/redhat-linux-build/gdal && /usr/lib64/ccache/g++ -Dgdal_KEA_EXPORTS -I/builddir/build/BUILD/kealib-1.4.15/include -I/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build/include -I/usr/include/gdal -I/builddir/build/BUILD/kealib-1.4.15/gdal/../include -I/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build/src/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -DNDEBUG -DNDEBUG -fPIC -MD -MT gdal/CMakeFiles/gdal_KEA.dir/keamaskband.cpp.o -MF CMakeFiles/gdal_KEA.dir/keamaskband.cpp.o.d -o CMakeFiles/gdal_KEA.dir/keamaskband.cpp.o -c /builddir/build/BUILD/kealib-1.4.15/gdal/keamaskband.cpp
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:34,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keaoverview.h:33,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keaoverview.cpp:30:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h: At global scope:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:38:43: note: '#pragma message: defining HAVE_RFC40'
   38 |     #pragma message ("defining HAVE_RFC40")
      |                                           ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:45:49: note: '#pragma message: defining HAVE_64BITIMAGES'
   45 |     #pragma message ("defining HAVE_64BITIMAGES")
      |                                                 ^
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:121: gdal/CMakeFiles/gdal_KEA.dir/keaoverview.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keadriver.cpp:30:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keadriver.cpp:31:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h: At global scope:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:38:43: note: '#pragma message: defining HAVE_RFC40'
   38 |     #pragma message ("defining HAVE_RFC40")
      |                                           ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:45:49: note: '#pragma message: defining HAVE_64BITIMAGES'
   45 |     #pragma message ("defining HAVE_64BITIMAGES")
      |                                                 ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadriver.cpp:34:14: warning: redundant redeclaration of 'void GDALRegister_KEA()' in same scope [-Wredundant-decls]
   34 | void CPL_DLL GDALRegister_KEA(void);
      |              ^~~~~~~~~~~~~~~~
In file included from /usr/include/gdal/gdal_priv.h:62,
                 from /usr/include/gdal/gdal_pam.h:36,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:33:
/usr/include/gdal/gdal_frmts.h:174:14: note: previous declaration of 'void GDALRegister_KEA()'
  174 | void CPL_DLL GDALRegister_KEA(void);
      |              ^~~~~~~~~~~~~~~~
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:79: gdal/CMakeFiles/gdal_KEA.dir/keadriver.cpp.o] Error 1
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.cpp:30:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.cpp:31:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h: At global scope:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:38:43: note: '#pragma message: defining HAVE_RFC40'
   38 |     #pragma message ("defining HAVE_RFC40")
      |                                           ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:45:49: note: '#pragma message: defining HAVE_64BITIMAGES'
   45 |     #pragma message ("defining HAVE_64BITIMAGES")
      |                                                 ^
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:93: gdal/CMakeFiles/gdal_KEA.dir/keadataset.cpp.o] Error 1
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:34,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keaband.cpp:30:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h: At global scope:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:38:43: note: '#pragma message: defining HAVE_RFC40'
   38 |     #pragma message ("defining HAVE_RFC40")
      |                                           ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:45:49: note: '#pragma message: defining HAVE_64BITIMAGES'
   45 |     #pragma message ("defining HAVE_64BITIMAGES")
      |                                                 ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.cpp: In member function 'virtual CPLErr KEARasterBand::SetDefaultRAT(const GDALRasterAttributeTable*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.cpp:1030:22: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
 1030 |                 if( ((GDALRasterAttributeTable*)poRAT)->ValuesIO(GF_Read, nGDALColumnIndex, 0, numRows, panIntData ) == CE_None )
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.cpp:1046:22: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
 1046 |                 if( ((GDALRasterAttributeTable*)poRAT)->ValuesIO(GF_Read, nGDALColumnIndex, 0, numRows, padfFloatData ) == CE_None )
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.cpp:1062:22: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
 1062 |                 if( ((GDALRasterAttributeTable*)poRAT)->ValuesIO(GF_Read, nGDALColumnIndex, 0, numRows, papszStringData ) == CE_None )
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:107: gdal/CMakeFiles/gdal_KEA.dir/keaband.cpp.o] Error 1
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:34,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keacopy.cpp:36:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h: At global scope:
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:38:43: note: '#pragma message: defining HAVE_RFC40'
   38 |     #pragma message ("defining HAVE_RFC40")
      |                                           ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keaband.h:45:49: note: '#pragma message: defining HAVE_64BITIMAGES'
   45 |     #pragma message ("defining HAVE_64BITIMAGES")
      |                                                 ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keacopy.cpp: In function 'void CopyRAT(GDALRasterBand*, kealib::KEAImageIO*, int)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keacopy.cpp:268:26: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
  268 |                         ((GDALRasterAttributeTable*)gdalAtt)->ValuesIO(GF_Read, nj, ni, nLength, pnIntBuffer);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keacopy.cpp:276:26: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
  276 |                         ((GDALRasterAttributeTable*)gdalAtt)->ValuesIO(GF_Read, nj, ni, nLength, pfDoubleBuffer);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keacopy.cpp:282:30: warning: cast from type 'const GDALRasterAttributeTable*' to type 'GDALRasterAttributeTable*' casts away qualifiers [-Wcast-qual]
  282 |                             ((GDALRasterAttributeTable*)gdalAtt)->ValuesIO(GF_Read, nj, ni, nLength, papszColData);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:135: gdal/CMakeFiles/gdal_KEA.dir/keacopy.cpp.o] Error 1
In file included from /builddir/build/BUILD/kealib-1.4.15/gdal/keamaskband.h:35,
                 from /builddir/build/BUILD/kealib-1.4.15/gdal/keamaskband.cpp:30:
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:39:48: note: '#pragma message: defining HAVE_SPATIALREF'
   39 |     #pragma message ("defining HAVE_SPATIALREF")
      |                                                ^
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:75:17: error: 'const char* KEADataset::_GetProjectionRef()' marked 'override', but does not override
   75 |     const char* _GetProjectionRef() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:80:12: error: 'CPLErr KEADataset::_SetProjection(const char*)' marked 'override', but does not override
   80 |     CPLErr _SetProjection( const char *pszWKT ) override;
      |            ^~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:85:17: error: 'const char* KEADataset::_GetGCPProjection()' marked 'override', but does not override
   85 |     const char* _GetGCPProjection() override;
      |                 ^~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:90:12: error: 'CPLErr KEADataset::_SetGCPs(int, const GDAL_GCP*, const char*)' marked 'override', but does not override
   90 |     CPLErr _SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
      |            ^~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:77:16: error: 'GetSpatialRefFromOldGetProjectionRef' was not declared in this scope
   77 |         return GetSpatialRefFromOldGetProjectionRef();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetSpatialRef(const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:82:16: error: 'OldSetProjectionFromSetSpatialRef' was not declared in this scope
   82 |         return OldSetProjectionFromSetSpatialRef(poSRS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual const OGRSpatialReference* KEADataset::GetGCPSpatialRef() const':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:87:16: error: 'GetGCPSpatialRefFromOldGetGCPProjection' was not declared in this scope
   87 |         return GetGCPSpatialRefFromOldGetGCPProjection();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h: In member function 'virtual CPLErr KEADataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)':
/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope
   94 |         return OldSetGCPsFromNew(nGCPCountIn, pasGCPListIn, poSRS);
      |                ^~~~~~~~~~~~~~~~~
gmake[2]: *** [gdal/CMakeFiles/gdal_KEA.dir/build.make:149: gdal/CMakeFiles/gdal_KEA.dir/keamaskband.cpp.o] Error 1
gmake[2]: Leaving directory '/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build'
gmake[1]: *** [CMakeFiles/Makefile2:200: gdal/CMakeFiles/gdal_KEA.dir/all] Error 2
gmake[1]: Leaving directory '/builddir/build/BUILD/kealib-1.4.15/redhat-linux-build'
gmake: *** [Makefile:169: all] Error 2

The error seems to be

/builddir/build/BUILD/kealib-1.4.15/gdal/keadataset.h:94:16: error: 'OldSetGCPsFromNew' was not declared in this scope

Any idea how to fix this?

manisandro commented 2 years ago

Note that these functions which trigger the errors were removed from gdal-3.6.0.

gillins commented 2 years ago

These are the changes from upstream that will be required: https://github.com/OSGeo/gdal/commit/60b4809cd2cb147788b53970b5d5c2a7d09f4664#diff-a1e5e933a5143b87c9dea1a2fdde1a61b8a92de34ee8236ca947c9030a3b8398

I think this will be very hard to do while supporting older versions of GDAL like I have been doing. I suggest we take this has an opportunity to push out kealib 1.5.0 and remove support for GDAL < 3 at the same time. People still on GDAL 2.x will need to keep using kealib 1.4.x. Does this sound ok?

I can look at this next week, unless someone wants to have a go before then? 1.5.x development is happening on master.

neteler commented 2 years ago

I suggest we take this has an opportunity to push out kealib 1.5.0 and remove support for GDAL < 3 at the same time. People still on GDAL 2.x will need to keep using kealib 1.4.x. Does this sound ok?

To me this sounds ok. Thanks!

petebunting commented 2 years ago

Dropping support for GDAL 2.X is OK with me. I probably won't have time in the next couple of weeks to look at this as I some project deadlines but if you haven't got to it by then @gillins then I have a look.

gillins commented 1 year ago

I'm working on this PR: https://github.com/ubarsc/kealib/pull/27 - let me know if this fixes the issue for you.

manisandro commented 1 year ago

Thanks, builds fine against gdal 3.6.0.

neteler commented 1 year ago

FWIW: kealib is now an official Fedora package!

https://src.fedoraproject.org/rpms/kealib