ad-freiburg / pfaedle

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

Issue since "update cppgtfs" #31

Closed ArnaudOggy closed 3 years ago

ArnaudOggy commented 3 years ago

Hello,

We have an issue this morning (since last commits "update cppgtfs")

[2021-09-09T08:15:24.834Z] /usr/src/app/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:18:20: error: ‘int pow10 [10]’ redeclared as different kind of symbol
[2021-09-09T08:15:24.835Z]  static int pow10[10] = {1,      10,      100,      1000,      10000,
[2021-09-09T08:15:24.835Z]                     ^
[2021-09-09T08:15:24.835Z] In file included from /usr/include/features.h:364:0,
[2021-09-09T08:15:24.835Z]                  from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
[2021-09-09T08:15:24.835Z]                  from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
[2021-09-09T08:15:24.835Z]                  from /usr/include/c++/6/utility:68,
[2021-09-09T08:15:24.835Z]                  from /usr/include/c++/6/algorithm:60,
[2021-09-09T08:15:24.835Z]                  from /usr/src/app/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:6:
[2021-09-09T08:15:24.835Z] /usr/include/x86_64-linux-gnu/bits/math-finite.h:133:15: note: previous declaration ‘double pow10(double)’
[2021-09-09T08:15:24.835Z]  extern double __REDIRECT_NTH (pow10, (double), __exp10_finite);
[2021-09-09T08:15:24.835Z]                ^
[2021-09-09T08:15:24.835Z] /usr/src/app/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp: In static member function ‘static double ad::util::CsvParser::atof(const char*, uint8_t, bool*)’:
[2021-09-09T08:15:24.835Z] /usr/src/app/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:296:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
[2021-09-09T08:15:24.835Z]        ret += f / pow10[n];
[2021-09-09T08:15:24.835Z]                          ^
[2021-09-09T08:15:24.835Z] /usr/src/app/pfaedle/src/cppgtfs/src/ad/util/CsvParser.cpp:296:16: error: invalid operands of types ‘double’ and ‘double(double) throw ()’ to binary ‘operator/’
[2021-09-09T08:15:24.835Z]        ret += f / pow10[n];
[2021-09-09T08:15:24.835Z]               ~~^~~~~~~~~~
[2021-09-09T08:15:24.835Z] At global scope:
[2021-09-09T08:15:24.835Z] cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
[2021-09-09T08:15:24.835Z] src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/build.make:62: recipe for target 'src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvParser.cpp.o' failed
[2021-09-09T08:15:24.835Z] make[2]: *** [src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/CsvParser.cpp.o] Error 1
[2021-09-09T08:15:24.835Z] make[2]: *** Waiting for unfinished jobs....
[2021-09-09T08:15:30.099Z] make[1]: *** [src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/all] Error 2
[2021-09-09T08:15:30.099Z] make[1]: *** Waiting for unfinished jobs....
[2021-09-09T08:15:30.099Z] CMakeFiles/Makefile2:466: recipe for target 'src/cppgtfs/src/ad/util/CMakeFiles/ad_csvparser.dir/all' failed

Had you seen it ?

Thank you for your feedback, and also for your excellent work :+1:

patrickbr commented 3 years ago

Sorry, the static pow10[10] array was defined in the global namespace. I updated cppgtfs again, can you check?

ArnaudOggy commented 3 years ago

That's ok for us. Thank you for your responsiveness :+1:

On occasion do not hesitate to put tags. It could be very useful to us :wink: