devel/grpc fails to build

From: Xavier Humbert <xavier_at_groumpf.org>
Date: Sat, 09 Nov 2024 16:54:49 UTC
Hi,

Since a couple of weeks, devel/grpc fails to build :

[root@numenor grpc]# MAKE_JOBS_UNSAFE=yes make all
===>  Building for grpc-1.67.1,2
[  5% 1/17] cd /usr/ports/devel/grpc/work/.build/protos && 
/usr/local/bin/protoc-28.3.0 
--grpc_out=generate_mock_code=true:/usr/ports/devel/grpc/work/.build/gens 
--cpp_out=/usr/ports/devel/grpc/work/.build/gens 
--plugin=protoc-gen-grpc=/usr/ports/devel/grpc/work/.build/grpc_cpp_plugin 
-I . -I _gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR-NOTFOUND 
src/proto/grpc/reflection/v1/reflection.proto
FAILED: gens/src/proto/grpc/reflection/v1/reflection.grpc.pb.cc 
gens/src/proto/grpc/reflection/v1/reflection.grpc.pb.h 
gens/src/proto/grpc/reflection/v1/reflection_mock.grpc.pb.h 
gens/src/proto/grpc/reflection/v1/reflection.pb.cc 
gens/src/proto/grpc/reflection/v1/reflection.pb.h 
/usr/ports/devel/grpc/work/.build/gens/src/proto/grpc/reflection/v1/reflection.grpc.pb.cc 
/usr/ports/devel/grpc/work/.build/gens/src/proto/grpc/reflection/v1/reflection.grpc.pb.h 
/usr/ports/devel/grpc/work/.build/gens/src/proto/grpc/reflection/v1/reflection_mock.grpc.pb.h 
/usr/ports/devel/grpc/work/.build/gens/src/proto/grpc/reflection/v1/reflection.pb.cc 
/usr/ports/devel/grpc/work/.build/gens/src/proto/grpc/reflection/v1/reflection.pb.h 

cd /usr/ports/devel/grpc/work/.build/protos && 
/usr/local/bin/protoc-28.3.0 
--grpc_out=generate_mock_code=true:/usr/ports/devel/grpc/work/.build/gens 
--cpp_out=/usr/ports/devel/grpc/work/.build/gens 
--plugin=protoc-gen-grpc=/usr/ports/devel/grpc/work/.build/grpc_cpp_plugin 
-I . -I _gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR-NOTFOUND 
src/proto/grpc/reflection/v1/reflection.proto
_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR-NOTFOUND: warning: directory does 
not exist.
WARNING: All log messages before absl::InitializeLog() is called are 
written to STDERR
F0000 00:00:1731170441.608652  101255 extension_set.cc:78] Multiple 
extension registrations for type "google.protobuf.FeatureSet", field 
number 1001.
*** Check failure stack trace: ***
--grpc_out: protoc-gen-grpc: Plugin killed by signal 6.
ninja: build stopped: subcommand failed.
*** [do-build] Error code 1

Obviously, it has something to do with protobuf, which  was upgraded a 
the time it began to fail.

[root@numenor grpc]# pkg info protobuf\*
protobuf-28.3,1
protobuf-c-1.4.1_7

How can I fix this ?

Thx, regards,

Xavier

-- 
Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer
https://www.amdh.fr