libosmpbfreader
libosmpbfreader copied to clipboard
Compilation fails on Debian 11
jcr@debian11:~/libosmpbfreader$ make
g++ -O3 -std=c++0x -Wall -Wextra -o example_routing example_routing.cc -lprotobuf-lite -losmpbf -lz
In file included from osmpbfreader.h:37,
from example_routing.cc:14:
/usr/include/osmpbf/fileformat.pb.h:48:51: error: ‘AuxiliaryParseTableField’ in namespace ‘google::protobuf::internal’ does not name a type; did you mean ‘AuxillaryParseTableField’?
48 | static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
| ^~~~~~~~~~~~~~~~~~~~~~~~
| AuxillaryParseTableField
In file included from osmpbfreader.h:39,
from example_routing.cc:14:
/usr/include/osmpbf/osmformat.pb.h:49:51: error: ‘AuxiliaryParseTableField’ in namespace ‘google::protobuf::internal’ does not name a type; did you mean ‘AuxillaryParseTableField’?
49 | static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
| ^~~~~~~~~~~~~~~~~~~~~~~~
| AuxillaryParseTableField
/usr/include/osmpbf/osmformat.pb.h:132:30: error: ‘ConstStringParam’ is not a member of ‘google::protobuf’
132 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Relation_MemberType* value) {
| ^~~~~~~~~~~~~~~~
/usr/include/osmpbf/osmformat.pb.h:132:72: error: expected primary-expression before ‘*’ token
132 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Relation_MemberType* value) {
| ^
/usr/include/osmpbf/osmformat.pb.h:132:74: error: ‘value’ was not declared in this scope
132 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Relation_MemberType* value) {
| ^~~~~
/usr/include/osmpbf/osmformat.pb.h:132:79: error: expression list treated as compound expression in initializer [-fpermissive]
132 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Relation_MemberType* value) {
| ^
In file included from osmpbfreader.h:39,
from example_routing.cc:14:
/usr/include/osmpbf/osmformat.pb.h:2864:64: error: ‘google::protobuf::ConstStringParam’ has not been declared
2864 | static inline bool MemberType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
| ^~~~~~~~~~~~~~~~
/usr/include/osmpbf/osmformat.pb.h: In static member function ‘static bool OSMPBF::Relation::MemberType_Parse(int, OSMPBF::Relation::MemberType*)’:
/usr/include/osmpbf/osmformat.pb.h:2866:49: error: ‘OSMPBF::Relation_MemberType_Parse’ cannot be used as a function
2866 | return Relation_MemberType_Parse(name, value);
| ^
make: *** [Makefile:15 : example_routing] Erreur 1
Same, issue. @archie83 do you solve it ?
I am not totally sure, because it was more than 5 months ago, but I don't think I found a solution.
I've reported the issue upstream, to Debian, on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993895. The issue is that the debian package libosmpbf-dev wasn't recompiled after a protobuf package update.
A new package should arrive soon on unstable and later, on bullseye.
Debian Stable was just updated with a recompiled package, fixing this issue: https://www.debian.org/News/2021/20211009.en.html