Closed sebastic closed 1 year ago
osmcoastline 2.4.0 fails to build with GDAL 3.7.0:
[ 80%] Building CXX object src/CMakeFiles/osmcoastline.dir/coastline_polygons.cpp.o cd /build/osmcoastline-2.4.0/obj-x86_64-linux-gnu/src && /usr/bin/c++ -DOSMIUM_WITH_LZ4 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/build/osmcoastline-2.4.0/include -isystem /usr/include/gdal -g -O2 -ffile-prefix-map=/build/osmcoastline-2.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -g -DNDEBUG -std=c++14 -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast -pthread -MD -MT src/CMakeFiles/osmcoastline.dir/coastline_polygons.cpp.o -MF CMakeFiles/osmcoastline.dir/coastline_polygons.cpp.o.d -o CMakeFiles/osmcoastline.dir/coastline_polygons.cpp.o -c /build/osmcoastline-2.4.0/src/coastline_polygons.cpp /build/osmcoastline-2.4.0/src/coastline_polygons.cpp: In member function 'void CoastlinePolygons::output_polygon_ring_as_lines(int, const OGRLinearRing*) const': /build/osmcoastline-2.4.0/src/coastline_polygons.cpp:285:82: error: invalid conversion from 'const OGRSpatialReference*' to 'OGRSpatialReference*' [-fpermissive] 285 | add_line_to_output(std::move(new_line), ring->getSpatialReference()); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ | | | const OGRSpatialReference* /build/osmcoastline-2.4.0/src/coastline_polygons.cpp:257:102: note: initializing argument 2 of 'void CoastlinePolygons::add_line_to_output(std::unique_ptr<OGRLineString>, OGRSpatialReference*) const' 257 | void CoastlinePolygons::add_line_to_output(std::unique_ptr<OGRLineString> line, OGRSpatialReference* srs) const { | ~~~~~~~~~~~~~~~~~~~~~^~~ /build/osmcoastline-2.4.0/src/coastline_polygons.cpp:294:70: error: invalid conversion from 'const OGRSpatialReference*' to 'OGRSpatialReference*' [-fpermissive] 294 | add_line_to_output(std::move(line), ring->getSpatialReference()); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ | | | const OGRSpatialReference* /build/osmcoastline-2.4.0/src/coastline_polygons.cpp:257:102: note: initializing argument 2 of 'void CoastlinePolygons::add_line_to_output(std::unique_ptr<OGRLineString>, OGRSpatialReference*) const' 257 | void CoastlinePolygons::add_line_to_output(std::unique_ptr<OGRLineString> line, OGRSpatialReference* srs) const { | ~~~~~~~~~~~~~~~~~~~~~^~~ make[3]: *** [src/CMakeFiles/osmcoastline.dir/build.make:121: src/CMakeFiles/osmcoastline.dir/coastline_polygons.cpp.o] Error 1
From the MIGRATION_GUIDE.TXT:
OGRGeometry::getSpatialReference() now returns a const OGRSpatialReference*
osmcoastline 2.4.0 fails to build with GDAL 3.7.0:
From the MIGRATION_GUIDE.TXT: