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
3
votes
1 answer

Why do I get an error with missing ProtocolStringList in google protobuf?

I just ran into the problem where a reference to a ProtocolStringList caused a class not found error inside the generated code created by protoc. In this case I got an Eclipse error: com.google.protobuf.ProtocolStringList cannot be resolved to a…
Tim B
  • 40,716
  • 16
  • 83
  • 128
2
votes
1 answer

Compile time error of cosmos-sdk/proto/bank/v1beta1/query.proto file

After installing the protoc and saving the cosmos-sdk/proto/bank/v1beta1/query.proto file this file shows a lot of error and for acknowledging the error I ran this command protoc --go_out=. query.proto Here is the problem…
2
votes
1 answer

How to pass the data value from any type into a GRPC Protobuf struct in Golang?

I'm trying to parse the data from the ADNL lib by tonutils-go and deliver the data by GRPC. The data I need is structured as // struct from tonutils-go type Transaction struct { _ Magic `tlb:"$0111"` AccountAddr []byte …
Champer Wu
  • 1,101
  • 3
  • 13
  • 32
2
votes
2 answers

not solve the error ::protoc-gen-go-grpc: program not found or is not executable

protoc-gen-go-grpc: program not found or is not executable Please specify a program using absolute path or make sure the program is available in your PATH system variable --go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1. not solve…
Thiyagu B
  • 21
  • 2
2
votes
0 answers

fatal error: google/protobuf/port_def.inc: No such file or directory

i am on ubuntu and i am using libprotoc version 3.15.8 when i run cmake command it successfully done but when i run make -j it's throwing error: . . . [ 8%] Building CXX object CMakeFiles/ConfigServiceCore.dir/main.cpp.o In file included from…
Jocefyneroot
  • 137
  • 1
  • 11
2
votes
1 answer

protobuf with grpc for Go in split packages

I'm trying to make my Go project using hexagonal architecture as described here. In my project I'm using a gRPC communication generated with protoc from .proto file. The directories structure: |- grpc.proto |-internal |-core |-domain …
Dysproz
  • 165
  • 8
2
votes
0 answers

Compile proto file with any.proto import

Here's my proto file syntax = "proto3"; import "google/protobuf/any.proto"; package Service; message Message { google.protobuf.Any data = 1; } I was able to install the protoc on macos with the include directory placed in…
2
votes
1 answer

Java : Proto parser library

I want to parse a proto file. Wanted to check is there any java library available which can parse proto files. Based on my requirement I cannot use descriptor parseFrom method or protoc command. Please suggest thanks in advance. $ protoc…
Maana
  • 640
  • 3
  • 9
  • 22
2
votes
0 answers

proto-gen-go: generation of GO files without go_package option when proto has import

There is gRPC api https://github.com/LTD-Beget/antivirus/tree/master/proto/v1 I want to generate files for GO from this API, but there is no way to add go_package option. In old version of protoc was cmd option as import_path, and it can can be…
DeYuro
  • 65
  • 5
2
votes
1 answer

How do I pass option to JavaPluginExtension using Kotlin DSL

I'm having issue converting these gradle groovy code to kotlin dsl. protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.8.0' } generateProtoTasks { all().each { task -> task.builtins { java { option…
Riajul
  • 1,140
  • 15
  • 20
2
votes
1 answer

How to use a package of generated protobuf inside a go module?

I encounter an issue with Go Module management and a generation of protobuffers (using go1.16, protoc-gen-go@latest). I have this project structure: subproj ├── go.mod (module company.tld/proj/subproj) ├── subproj.go (entry point :…
mscherer
  • 97
  • 1
  • 3
  • 12
2
votes
1 answer

'protoc-gen-go-grpc: program not found or is not executable', despite all the efforts

I'm trying to run makefile command 'gen' from this project https://github.com/penthaapatel/grpcblog. The command is: protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative blog/blog.proto However I get…
2
votes
1 answer

How to Generate Protobuf documentation?

Does anyone know of a good tool to generate Google Protobuf documentation using the .proto source files? The documentation generated from the below source is excellent. https://github.com/pseudomuto/protoc-gen-doc But, being a java developer, I am…
2
votes
2 answers

How to specify the Protobuf path using protobuf-gradle-plugin

I'm trying to generate Protobufs in a Java project that are defined in another Git repository that I'd like to add as a Git submodule. My build.gradle contains protobuf { protoc { artifact = "com.google.protobuf:protoc:4.0.0-rc-2" } …
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
2
votes
1 answer

protobuf_generate grpc_cpp_plugin fails with status code 1

I'm trying to generate grpc cpp files but the generator plugin fails when I call it in cmake find_package(protoc CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED) get_target_property(grpc_cpp_plugin_location gRPC::grpc_cpp_plugin LOCATION) #get…
Sir Demios
  • 83
  • 11