Regarding the protoc version coming with protobuf-compiler and grpcio-tools

125 views
Skip to first unread message

Ramana Reddy

unread,
May 26, 2024, 11:48:16 PM5/26/24
to grp...@googlegroups.com
Dear GRPC community,

I have seen different versions of protoc in ubuntu 24 with protobuf-compiler and grpcio-tools, and need to understand 
how these protoc versions are different and how these different versions are related? If I want to compile grpcio-tools with old protobuf-compiler, where should I change in the grpcio-tools. grpc.tools.protoc version 26.1 means 3.26.1? 

# /usr/bin/protoc --version
libprotoc 3.21.12
# python3 -m grpc.tools.protoc --version
libprotoc 26.1
# dpkg -S /usr/bin/protoc
protobuf-compiler: /usr/bin/protoc

We are using the old protobuf and that is not compatible with the grpcio-tools protobuf version in the upstream. Hence need to compile from source and link to old protobuf in grpcio-tools. Is it the case now that both grpcio-tools and grpc should be the same version?

Looking forward to hearing from you,
Regards,
Ramana

Eugene Ostroukhov

unread,
May 28, 2024, 12:29:09 PM5/28/24
to grpc.io
One should use the protoc and protobuf that comes with the gRPC version they use. Source files generated by a specific protoc version may require specific protobuf API that would make them incompatible with a different protobuf version.
Reply all
Reply to author
Forward
0 new messages