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
1
vote
1 answer

Decode protobufs over UDP

I have a Protobuf serialized data that is being sent over UDP multicast. I read it using socat from bash as follows socat UDP4-RECVFROM:1277,ip-add-membership=239.195.1.2:192.168.254.5,fork,reuseaddr - I want to chain this with protoc in order to…
marc
  • 797
  • 1
  • 9
  • 26
1
vote
0 answers

Serving graphql server over GRPC server

I have below snippet to server the graphql server over http listener. Could you help me how I can do similar implementation with GRPC server? I mean serving graphQL server over grpc server? func Run() { var cfg AppConfig cfg.ProductURL =…
1
vote
0 answers

protoc-gen-go-grpc: program not found or is not executable [protoc-gen-go is in PATH]

I am trying to generate Go source code from .proto file through this command: protoc greet/greetpb/greet.proto --go-grpc_out=plugins=grpc:. and, this is the directory structure: greet/greetpb/greet.proto I have tried all the answers mentioned…
Aditya
  • 551
  • 5
  • 26
1
vote
0 answers

New fields in protobuf after regenerating with upgraded version of protoc-gen-go and protoc compiler

I am upgrading all the libraries(go, protoc, grpc) we use. Once I updated the protoc compiler , protoc-gen-go and regenerated the protos. Some of the structs in the pb.go file have new meta fields/variables added- state, sizeCache,unknownFields.…
phoenix
  • 11
  • 1
1
vote
1 answer

protoc "tried to write file twice"

I'm was to follow this https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 . I realized part way through that I was running into problems because not all of my files in the protos folder were…
Will Mulcahey
  • 89
  • 1
  • 7
1
vote
1 answer

RSocket RPC (Windows) Binaries with Gradle (Bluild fail)

I'm trying to build a mixed project having following components: 1: Spring Boot 2: rSocket 3: gRPC Its a multi container app, where container 1 (Spring & rSocket, Java) interacts with container 2 (rSocker, Spring, gRPC, Java) via Spring-rSocket. It…
Debasish Kanhar
  • 1,123
  • 2
  • 15
  • 27
1
vote
3 answers

protoc custom plugin erroring out with Program not found or is not executable

I am trying to build a custom protoc plugin to generate custom output from .proto files. I literally copied java file containing CodeGenerator from protoc custom plugin as a starting point and renamed it. I also followed executable and created .sh…
User
  • 1,186
  • 4
  • 22
  • 36
1
vote
1 answer

Node.js protobuf includes

We are trying to implement a grpc service in Node. We have a common.proto-file where we describe common messages, that we can reuse across different services. Up until now, we have only implemented services in Go, and consumed them in either Go or…
lshas
  • 1,691
  • 1
  • 19
  • 39
1
vote
1 answer

Problem when auto generating gRPC stub files using Gradle

I've been asked to implement some gRPC classes for a college course, and have run into some problems when generating the java classes from one source proto file. Some background first: it's a fairly basic service, with a simple method that receives…
1
vote
2 answers

go protobuf: Cannot find package "." in github.com/gogo/protobuf/proto and m.TimeStamp.MarshalToSizedBuffer undefined

Question as per title. Tried to compile in 2 ways gogoproto and golangprotobuf. Wrote tests for both, and both won't marshal. msg.proto syntax = "proto3"; import "google/protobuf/timestamp.proto"; package msg; message Message { string Name =…
Gravy
  • 12,264
  • 26
  • 124
  • 193
1
vote
1 answer

Protobuf compiler for Go structs not generating the right package name for imports?

Consider the following example project with Go module github.com/kurtpeek/proto-example and the following directory structure (with .proto files in the proto directory and generated Go code in gen/go): . ├── gen │   └── go │   ├── author │   …
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
1
vote
1 answer

Protobuf, getting custom extension values from protoc plugin

I am trying to create a custom extension that I can use in a custom protoc compiler I am writing. I am trying to compiled this protofile: syntax = "proto3"; import "google/protobuf/descriptor.proto"; extend google.protobuf.MessageOptions { …
Paul Knopf
  • 9,568
  • 23
  • 77
  • 142
1
vote
2 answers

Unable to use google/apis/annotations

I try to use REST over gRPC using google api annotations. Unfortunately, I'm facing a protoc issue telling me annotations.proto is not exists or had errors. I tried several fixes in vain. I even tried to reinstall a complete stack in case I did…
Cyril Z.
  • 89
  • 1
  • 4
  • 14
1
vote
1 answer

Generated protoc file creates a target source with error

I have tried to make a project that connects to a DB and takes information and outputes them in a desktop application through grpc. But, when I compile it I get "Error:(20,18) java: cannot find symbol" in a target file( which is auto-generated by…
Diana G
  • 261
  • 3
  • 15
1
vote
0 answers

Tensorflow XLA compiler - bazel build error - Could not find include file ".../hlo_ops_base.td"

I am trying to use XLA compiler from Tensorflow following the example provided at this page: https://gist.github.com/carlthome/6ae8a570e21069c60708017e3f96c9fd In short, it downloads a ResNet50 network and compiles it as library. During execution of…