ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
206 stars 29 forks source link

Fails to compile using gcc 11.2.0 #33

Closed MTRNord closed 2 years ago

MTRNord commented 2 years ago

Hi I am using gcc (Gentoo 11.2.0 p1) 11.2.0 and it fails to compile with the following errors on the current master:

➜  build git:(master) make -j
[  2%] Building CXX object src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvParser.cpp.o
[  7%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/PfaedleMain.cpp.o
[  7%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/config/ConfigReader.cpp.o
[ 10%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/eval/Collector.cpp.o
[ 12%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/config/MotConfigReader.cpp.o
[ 15%] Building CXX object src/util/CMakeFiles/util.dir/geo/output/GeoJsonOutput.cpp.o
[ 17%] Building CXX object src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvWriter.cpp.o
[ 20%] Building CXX object src/configparser/CMakeFiles/configparser.dir/ConfigFileParser.cpp.o
[ 23%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/gtfs/Writer.cpp.o
[ 25%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/osm/BBoxIdx.cpp.o
[ 28%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/osm/OsmBuilder.cpp.o
[ 30%] Building CXX object src/util/CMakeFiles/util.dir/graph/Dijkstra.cpp.o
[ 33%] Building CXX object src/util/CMakeFiles/util.dir/http/Server.cpp.o
[ 35%] Building CXX object src/util/CMakeFiles/util.dir/graph/EDijkstra.cpp.o
[ 38%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/osm/OsmFilter.cpp.o
[ 41%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/osm/OsmIdSet.cpp.o
[ 46%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/osm/Restrictor.cpp.o
[ 46%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/router/EdgePL.cpp.o
[ 51%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/router/Router.cpp.o
[ 51%] Building CXX object src/util/CMakeFiles/util.dir/xml/XmlWriter.cpp.o
[ 53%] Building CXX object src/util/CMakeFiles/util.dir/tests/TestMain.cpp.o
[ 56%] Building CXX object src/util/CMakeFiles/util.dir/json/Writer.cpp.o
[ 58%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/router/ShapeBuilder.cpp.o
[ 61%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/EdgePL.cpp.o
[ 64%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/StatGroup.cpp.o
[ 66%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/NodePL.cpp.o
[ 69%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/Normalizer.cpp.o
[ 71%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/StatInfo.cpp.o
In file included from /opt/dev_env/pfaedle/src/util/graph/Edge.h:9,
                 from /opt/dev_env/pfaedle/src/util/graph/Dijkstra.h:14,
                 from /opt/dev_env/pfaedle/src/util/graph/Dijkstra.cpp:5:
/opt/dev_env/pfaedle/src/util/graph/Node.h:24:11: error: ‘size_t’ does not name a type
   24 |   virtual size_t getDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:1:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
  +++ |+#include <cstddef>
    1 | // Copyright 2016, University of Freiburg,
/opt/dev_env/pfaedle/src/util/graph/Node.h:25:11: error: ‘size_t’ does not name a type
   25 |   virtual size_t getInDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:25:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/opt/dev_env/pfaedle/src/util/graph/Node.h:26:11: error: ‘size_t’ does not name a type
   26 |   virtual size_t getOutDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:26:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
In file included from /opt/dev_env/pfaedle/src/util/graph/Edge.h:9,
                 from /opt/dev_env/pfaedle/src/util/graph/EDijkstra.h:13,
                 from /opt/dev_env/pfaedle/src/util/graph/EDijkstra.cpp:5:
/opt/dev_env/pfaedle/src/util/graph/Node.h:24:11: error: ‘size_t’ does not name a type
   24 |   virtual size_t getDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:1:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
  +++ |+#include <cstddef>
    1 | // Copyright 2016, University of Freiburg,
/opt/dev_env/pfaedle/src/util/graph/Node.h:25:11: error: ‘size_t’ does not name a type
   25 |   virtual size_t getInDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:25:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/opt/dev_env/pfaedle/src/util/graph/Node.h:26:11: error: ‘size_t’ does not name a type
   26 |   virtual size_t getOutDeg() const = 0;
      |           ^~~~~~
/opt/dev_env/pfaedle/src/util/graph/Node.h:26:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
make[2]: *** [src/util/CMakeFiles/util.dir/build.make:90: src/util/CMakeFiles/util.dir/graph/Dijkstra.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/util/CMakeFiles/util.dir/build.make:104: src/util/CMakeFiles/util.dir/graph/EDijkstra.cpp.o] Error 1
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp: In member function ‘size_t ad::util::CsvParser::getOptFieldIndex(const string&) const’:
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:17: error: ‘numeric_limits’ is not a member of ‘std’
  224 |     return std::numeric_limits<std::size_t>::max();
      |                 ^~~~~~~~~~~~~~
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:43: error: expected primary-expression before ‘>’ token
  224 |     return std::numeric_limits<std::size_t>::max();
      |                                           ^
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:46: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  224 |     return std::numeric_limits<std::size_t>::max();
      |                                              ^~~
      |                                              std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/algorithm:62,
                 from /opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:6:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[2]: *** [src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/build.make:76: src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvParser.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:410: src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 74%] Linking CXX static library libconfigparser.a
[ 74%] Built target configparser
[ 76%] Linking CXX static library libpfaedle_dep.a
[ 76%] Built target pfaedle_dep
make[1]: *** [CMakeFiles/Makefile2:276: src/util/CMakeFiles/util.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
patrickbr commented 2 years ago

Thanks for the bug report - fixed in f1822868c5addbf169ec19ec84b6db90a198db6f :)

MTRNord commented 2 years ago

Hm that doesnt seem to quite fix all of the errors. there are still 3 errors I am getting:

[ 46%] Building CXX object src/pfaedle/CMakeFiles/pfaedle_dep.dir/trgraph/StatInfo.cpp.o
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp: In member function ‘size_t ad::util::CsvParser::getOptFieldIndex(const string&) const’:
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:17: error: ‘numeric_limits’ is not a member of ‘std’
  224 |     return std::numeric_limits<std::size_t>::max();
      |                 ^~~~~~~~~~~~~~
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:43: error: expected primary-expression before ‘>’ token
  224 |     return std::numeric_limits<std::size_t>::max();
      |                                           ^
/opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:224:46: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  224 |     return std::numeric_limits<std::size_t>::max();
      |                                              ^~~
      |                                              std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/algorithm:62,
                 from /opt/dev_env/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:6:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[2]: *** [src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/build.make:76: src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvParser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:410: src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 48%] Linking CXX static library libpfaedle_dep.a
[ 51%] Linking CXX static library libutil.a
[ 61%] Built target util
[ 76%] Built target pfaedle_dep
make: *** [Makefile:146: all] Error 2
patrickbr commented 2 years ago

Did you update the cppgtfs submodule by running git submodule update? One of the fixes was in https://github.com/ad-freiburg/cppgtfs

MTRNord commented 2 years ago

Oh I did not :D thanks for pointing that out