osmcode / osmium-tool

Command line tool for working with OpenStreetMap data based on the Osmium library.
https://osmcode.org/osmium-tool/
GNU General Public License v3.0
483 stars 104 forks source link

Fails to build with GCC 14 #276

Open sebastic opened 1 week ago

sebastic commented 1 week ago

As reported in Debian Bug #1075352, osmium-tool fails to build with GCC 14.

It's actually the embedded copy of rapidjson 1.1.0 that's the issue:

In file included from /<<PKGBUILDDIR>>/src/command_export.hpp:34,
                 from /<<PKGBUILDDIR>>/src/commands.cpp:12:
/<<PKGBUILDDIR>>/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/<<PKGBUILDDIR>>/include/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~

This is fixed upstream with https://github.com/Tencent/rapidjson/pull/719 but there hasn't been a release since 2016, the embedded copy likely needs to be updated to a recent git snapshot.