osmcode / osmcoastline

Extracts coastline data from OpenStreetMap planet file.
https://osmcode.org/osmcoastline/
GNU General Public License v3.0
108 stars 14 forks source link

Fails to build with GDAL 3.8.0 #46

Closed sebastic closed 10 months ago

sebastic commented 10 months ago

As reported in Debian Bug #1055604:

Your package FTBFS with GDAL 3.8.0 from experimental:

In file included from /usr/include/gdal/ogr_geometry.h:36,
                 from /build/osmcoastline-2.4.0/src/coastline_polygons.hpp:25,
                 from /build/osmcoastline-2.4.0/src/coastline_ring_collection.cpp:22:
/usr/include/gdal/cpl_json.h:97:36: error: expected ')' before 'nVal'
   97 |     explicit CPLJSONObject(uint64_t nVal);
      |                           ~        ^~~~~
      |                                    )
/usr/include/gdal/cpl_json.h:119:41: error: 'uint64_t' has not been declared
  119 |     void Add(const std::string &osName, uint64_t nValue);
      |                                         ^~~~~~~~
/usr/include/gdal/cpl_json.h:119:10: error: 'void CPLJSONObject::Add(const std::string&, int)' cannot be overloaded with 'void CPLJSONObject::Add(const std::string&, int)'
  119 |     void Add(const std::string &osName, uint64_t nValue);
      |          ^~~
/usr/include/gdal/cpl_json.h:117:10: note: previous declaration 'void CPLJSONObject::Add(const std::string&, int)'
  117 |     void Add(const std::string &osName, int nValue);
      |          ^~~
/usr/include/gdal/cpl_json.h:131:41: error: 'uint64_t' has not been declared
  131 |     void Set(const std::string &osName, uint64_t nValue);
      |                                         ^~~~~~~~
/usr/include/gdal/cpl_json.h:131:10: error: 'void CPLJSONObject::Set(const std::string&, int)' cannot be overloaded with 'void CPLJSONObject::Set(const std::string&, int)'
  131 |     void Set(const std::string &osName, uint64_t nValue);
      |          ^~~
/usr/include/gdal/cpl_json.h:129:10: note: previous declaration 'void CPLJSONObject::Set(const std::string&, int)'
  129 |     void Set(const std::string &osName, int nValue);
      |          ^~~
/usr/include/gdal/cpl_json.h:245:14: error: 'uint64_t' has not been declared
  245 |     void Add(uint64_t nValue);
      |              ^~~~~~~~
/usr/include/gdal/cpl_json.h:245:10: error: 'void CPLJSONArray::Add(int)' cannot be overloaded with 'void CPLJSONArray::Add(int)'
  245 |     void Add(uint64_t nValue);
      |          ^~~
/usr/include/gdal/cpl_json.h:243:10: note: previous declaration 'void CPLJSONArray::Add(int)'
  243 |     void Add(int nValue);
      |          ^~~

The full buildlog is attached.

osmcoastline_2.4.0-3_amd64.build

sebastic commented 10 months ago

This is fixed by patching GDAL: https://github.com/OSGeo/gdal/pull/8682