nci/gsky

Build failure on Arch Linux

sempervictus opened this issue · 1 comments

Having installed Go and GDAL, it looks like there's an API change in the current versions preventing compilation:

==> Starting build()...
pkg-config --exists gdal
nc-config --version
netCDF 4.9.0
mkdir -p src/
wget --quiet https://github.com/edisonguo/concurrent/raw/e6ff2d98fb7f4cebf297b1725fee9a9e3d1cc164/concurrent.c -O src/concurrent.c
cc -std=c99 -Wall -O2 src/concurrent.c -o concurrent
g++ -std=c++11 -Wall -shared -fPIC -fvisibility=hidden -Ofast -DNETCDF_HAS_NC4 -DNETCDF_HAS_NC2 -DHAVE_HDF4 -DHAVE_HDF5 -DENABLE_UFFD -I/usr/include  -L/usr/lib -lnetcdf  libs/gdal/frmts/gsky_netcdf/gmtdataset.cpp libs/gdal/frmts/gsky_netcdf/netcdfdataset.cpp libs/gdal/frmts/gsky_netcdf/netcdflayer.cpp libs/gdal/frmts/gsky_netcdf/netcdfwriterconfig.cpp -o gdal_GSKY_netCDF.so
libs/gdal/frmts/gsky_netcdf/gmtdataset.cpp: In destructor ‘virtual GMTDataset::~GMTDataset()’:
libs/gdal/frmts/gsky_netcdf/gmtdataset.cpp:206:15: error: no matching function for call to ‘GMTDataset::FlushCache()’
  206 |     FlushCache();
      |     ~~~~~~~~~~^~
In file included from libs/gdal/frmts/gsky_netcdf/gmtdataset.cpp:42:
/usr/include/gdal_pam.h:163:10: note: candidate: ‘virtual void GDALPamDataset::FlushCache(bool)’
  163 |     void FlushCache(bool bAtClosing) override;
      |          ^~~~~~~~~~
/usr/include/gdal_pam.h:163:10: note:   candidate expects 1 argument, 0 provided
libs/gdal/frmts/gsky_netcdf/netcdfdataset.cpp: In destructor ‘virtual netCDFDataset::~netCDFDataset()’:
libs/gdal/frmts/gsky_netcdf/netcdfdataset.cpp:2217:15: error: no matching function for call to ‘netCDFDataset::FlushCache()’
 2217 |     FlushCache();
      |     ~~~~~~~~~~^~
In file included from libs/gdal/frmts/gsky_netcdf/netcdfdataset.h:39,
                 from libs/gdal/frmts/gsky_netcdf/netcdfdataset.cpp:53:
/usr/include/gdal_pam.h:163:10: note: candidate: ‘virtual void GDALPamDataset::FlushCache(bool)’
  163 |     void FlushCache(bool bAtClosing) override;
      |          ^~~~~~~~~~
/usr/include/gdal_pam.h:163:10: note:   candidate expects 1 argument, 0 provided
make: *** [Makefile:34: gdal_GSKY_netCDF.so] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Currently, to meet the GDAL dependency, Arch (a rolling distro) installs geos-3.11.0-1 libdeflate-1.11-1 libfreexl-1.0.6-2 libgeotiff-1.7.1-1 librttopo-1.1.0-5 libspatialite-5.0.1-3 proj-9.0.1-1 gdal-3.5.1-3

Please try to build against gdal-3.2. There are API changes afterwards.