Questions tagged [protoc]

protoc is the compiler for .proto files. It generates language bindings for the messages and/or RPC services from .proto files. protoc is a native executable, the scripts under this directory build and publish a protoc executable (a.k.a. artifact) to Maven repositories. The artifact can be used by build automation tools so that users would not need to compile and install protoc for their systems.

taken from google documentation

387 questions
0
votes
1 answer

Unable to encode .proto file into binary using protoc compiler types not defined

I'm trying to convert the proto file into binary for an HTTP request payload, however, I'm receiving an error from protoc compiler tool, returning type not defined. I was not able to find any documentation on the type definitions used alongside…
Dmitriy
  • 97
  • 3
  • 15
0
votes
2 answers

gRPC Java Codegen Plugin for Protobuf Compiler

Updating question as I've progressed from the original problem. Step 1. I've compiled and Installed Protobuf Compiler for mac using this link. Step 2. Currently stuck at gRPC Java Codegen Plugin for Protobuf Compiler link: Successful ../gradlew…
AppDeveloper
  • 1,816
  • 7
  • 24
  • 49
0
votes
1 answer

How to set environment variable LD_LIBRARY_PATH through build.gradle to generate protobuf code

I am using protobuf gradle plugin in my build.gradle file to generate grpc and reactor gprc java code. Due to the security constraints, I cannot use the plugin directly from the maven central. I have to download those plugins and provide the local…
0
votes
1 answer

Error importing and using other .proto files when using protoc to generate golang code

I've been using protoc to generate golang gRPC client and server code without issues. Since I have multiple gRPC services that use the same data types, I'd like to refer to a base.proto for these types rather than copy and paste, which is extra…
Grant
  • 11
  • 2
0
votes
2 answers

Is there a way to programmatically dump Google Protocol Buffer packet?

If I save the packet data as a binary file, I can run it through protoc -decode to dump the data into a formatted textual representation. I am wondering if there is any function available to dump the binary data as formatted text programmatically?…
Peter
  • 11,260
  • 14
  • 78
  • 155
0
votes
1 answer

I am having problem installing protocol buffer on windows?

I am having issue while installing the protobuf for Python in Windows. The version for Protobuf is 3.8.0.Among the mentioned below step I am not being able to figure out the third step of Build C++ code or install binaries. Can anyone explain? The…
Kundan Jha
  • 104
  • 3
  • 11
0
votes
1 answer

Preserve //go:generate comment in protobuf files

I want to do some code generations on code generated by protoc through go:generate. However, when it was compiled by protoc, comments are reformed into // go:generate, where a space was inserted, which fails go generate. Is there a way to preserve…
Qiaosen Huang
  • 1,093
  • 1
  • 10
  • 25
0
votes
3 answers

Can not compile proto file in ubuntu for golang

I've installed these packages: google.golang.org/grpc github.com/golang/protobuf/protoc-gen-go and exported path like this: export PATH=$PATH:/usr/local/go/bin when I try compile proto file with protoc command, I see command not found error: protoc…
Ali Soltani
  • 589
  • 1
  • 7
  • 21
0
votes
1 answer

package expected, got syntax

My Goland IDE on Mac doesn't understand -> syntax = "proto3" do you know why? package expected, got syntax Either I put the syntax before or after the package declaration, it doesn't change nothing... My example.proto file looks like syntax =…
0
votes
2 answers

Unable to compile .proto files for Tensorflow object-detection API

I'm trying to install Tensorflow and im having trouble compiling the .proto files. I try running this command in the research folder: C:/protoc/bin/protoc object_detection/protos/*.proto --python_out=. but it…
simplex
  • 3
  • 5
0
votes
1 answer

protoc not finding things in proto_path

I'm finding that protoc doesn't seem to find things which are on the proto_path despite them being present: $ protoc --proto_path=protobufs/protobufs \ --go_out=plugins=grpc:/home/me/go/src somefolder/enums.proto somefolder/enums.proto: No such…
sil
  • 1,769
  • 1
  • 18
  • 34
0
votes
1 answer

Wrapping and shipping the protoc, so our build environments are not required to have protoc pre-installed

In order to be able to generate classes from .proto-files, I must have the protoc installed on my system. Then I can instruct the protoc manually to compile my .proto-files. Then I might get the idea to utilize our build system for that, for example…
Nikolas
  • 2,066
  • 1
  • 19
  • 20
0
votes
0 answers

Is there a .net core global tool for gRPC?

I've just started with gRPC, but it seems that running protoc is a common enough task to warrant a .net core global tool so that one can run something like this from the command line: dotnet protoc ... Is there such a thing?
Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
0
votes
1 answer

Which Protoc Does "Make" Command Use?

I am trying to build LAB which generate robust facial landmark. In installation guide it says one needs to install Caffe prerequisites which I'd checked CUDA and BLAS well installed on my AWS EC2 instance. Then I git cloned and typed make under the…
Beverlie
  • 461
  • 1
  • 6
  • 19
0
votes
1 answer

Add 'library' directive to dart code generated using protoc

Can someone tell me how to get protoc to generate dart files with a leading library directive? I'm using the dart-protoc-plugin (v0.10.2) to generate my dart, c++, c#, js and java models from proto files. I was under the impression there was no way…
jdb
  • 51
  • 4