Unable to build FRRouting with gRPC enabled #15943
Unanswered
julienteisseire
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
On Fedora 39,
I am still unsuccessful in building FRRouting with --enable-grpc during configure.
./lib/xref.h:92:1: error: '__mptr' was not declared in this scope
92 | DECLARE_RBTREE_UNIQ(xrefdata_uid, struct xrefdata, xui, xrefdata_uid_cmp);
| ^~~~~~~~~~~~~~~~~~~
./lib/xref.h:92:1: error: cannot convert 'typed_rb_entry' to 'const int' in initialization
[Makefile:14855: grpc/libfrrgrpc_pb_la-frr-northbound.pb.lo] Error 1
I checked my libprotobuf version, and I also did little trick to deal with c++ version with no success.
I am using libprotoc 3.19.6 and for this version to work, I have to use stdc++14 standard or greater.
That's maybe the root cause of the problem. FRRouting (.libs folder) is not compatible with stdc++14 so I have to use an older protobuf library ?
I've detected include of assert.h from protobuf generated source code, but instead of using system one, compiler is using FRR/libs header files. That also could be the error, where protobuf generated code compilation may depend on system headers instead of FRR assert and xref headers.
By removing "-I./lib/assert" from the compiler command, it works for ./grpc directory :
Error :
/bin/sh libtool --silent --tag=CXX --mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -DSYSCONFDIR="/etc/frr/" -DCONFDATE=0 -I. -I/usr/include -I./lib/assert -I. -I./include -I./lib -I. -std=c++17 -MT grpc/libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo -MD -MP -MF grpc/.deps/libfrrgrpc_pb_la-frr-northbound.grpc.pb.Tpo -c -o grpc/libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo
test -f 'grpc/frr-northbound.grpc.pb.cc' || echo './'
grpc/frr-northbound.grpc.pb.ccSuccess :
/bin/sh libtool --silent --tag=CXX --mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -DSYSCONFDIR="/etc/frr/" -DCONFDATE=0 -I. -I/usr/include -I. -I./include -I./lib -I. -std=c++17 -MT grpc/libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo -MD -MP -MF grpc/.deps/libfrrgrpc_pb_la-frr-northbound.grpc.pb.Tpo -c -o grpc/libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo
test -f 'grpc/frr-northbound.grpc.pb.cc' || echo './'
grpc/frr-northbound.grpc.pb.ccSo the main compatibility problem seems to be latest protobuf library is requiring std c++14 or greater (required by ./libs/northbound_grpc.cpp) while FRRouting .libs folder is not compatible with this standard and must stay with c++11.
Moreover, ./libs assert and xref headers are not usable for ./grpc generated source code.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions