osm2pgsql-dev / osm2pgsql

OpenStreetMap data to PostgreSQL converter

Home Page:https://osm2pgsql.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compilation failure with gcc-13

fvalenduc opened this issue · comments

Compilation with gcc-13 doens't work. I get this error:

In file included from /usr/src/osm2pgsql/src/flex-index.cpp:10:
/usr/src/osm2pgsql/src/flex-index.hpp:74:25: error: 'uint8_t' has not been declared
   74 |     void set_fillfactor(uint8_t fillfactor)
      |                         ^~~~~~~
/usr/src/osm2pgsql/src/flex-index.hpp:95:5: error: 'uint8_t' does not name a type
   95 |     uint8_t m_fillfactor = 0;
      |     ^~~~~~~
/usr/src/osm2pgsql/src/flex-index.hpp:17:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   16 | #include <vector>
  +++ |+#include <cstdint>
   17 | 
/usr/src/osm2pgsql/src/flex-index.hpp: In member function 'void flex_index_t::set_fillfactor(int)':
/usr/src/osm2pgsql/src/flex-index.hpp:79:9: error: 'm_fillfactor' was not declared in this scope; did you mean 'fillfactor'?
   79 |         m_fillfactor = fillfactor;
      |         ^~~~~~~~~~~~
      |         fillfactor
/usr/src/osm2pgsql/src/flex-index.cpp: In member function 'std::string flex_index_t::create_index(const std::string&) const':
/usr/src/osm2pgsql/src/flex-index.cpp:50:9: error: 'm_fillfactor' was not declared in this scope; did you mean 'set_fillfactor'?
   50 |     if (m_fillfactor != 0) {
      |         ^~~~~~~~~~~~
      |         set_fillfactor
make[2]: *** [src/CMakeFiles/osm2pgsql_lib.dir/build.make:622: src/CMakeFiles/osm2pgsql_lib.dir/flex-index.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Does anybody have any idea about this ?

Thanks in advance for your help.

I am pretty sure that's just a missing include. I added that include in PR #1958 (plus a bunch more for good measure).

This patch indeed solve the problem.