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

Dependencies for Protoc Java plugin?

I'm trying to make working example at How to write a custom Protobuf CodeGenerator in Java . When I try to compile a file with import com.google.protobuf.compiler.PluginProtos; import java.io.IOException; public class MyPlugin { public static…
Bover
  • 21
  • 3
1
vote
1 answer

Add options to plugin in gradle

I'm using the gradle plugin 'com.google.protobuf:protoc:3.6.0' for generating my .java files from .proto files. Additionally I want to generate documentation for my .proto files. For this I found protoc-gen-doc.exe. This works fine fomr the…
Jürgen
  • 146
  • 12
1
vote
0 answers

How to insert includes in protoc insertion point (Protobuf)?

I generated from .proto files *.pb.h and *.pb.cc files using protoc. The problem is that i can't export the dll to use it, so I regenrated these files using: .\protoc.exe --proto_path=.\Proto\ --cpp_out=dllexport_decl=MY_EXP:.\generated…
Kais
  • 99
  • 12
1
vote
1 answer

protoc documentation in golang is pretty confusing

protoc documentation is very minimal. I often see something like this and I could not find any documentation. protoc -I routeguide/ routeguide/route_guide.proto --go_out=plugins=grpc:routeguide What does plugins=grpc: do? Does it need to be used…
leopoodle
  • 2,110
  • 7
  • 24
  • 36
1
vote
5 answers

Win10,Goland. protoc -I . --go_out=plugins=grpc: . proto/hello/hello.proto .: Permission denied

software environment:Win10, Goland. go version : go1.9.1 windows/amd64. protoc --version: libprotoc 3.5.1 When i Executive Command. The results are as follows protoc -I . --go_out=plugins=grpc: . proto/hello/hello.proto .: Permission denied I…
dafeng
  • 19
  • 1
  • 2
1
vote
1 answer

How to define response headers for unary rpc

In Go, I want to set some response headers from inside my rpc handler implementation. Specifically, I want to set some headers related to cache control. However, when the rpc is defined as unary response, the method signature generated by protoc…
thurt
  • 882
  • 1
  • 10
  • 25
1
vote
2 answers

after updating protolib and protoc, gRPC doesnt work anymore

Yesterday my ubuntu made update (from log) Grpc for PHP Commandline: aptdaemon role='role-commit-packages' sender=':1.567' Upgrade: libprotoc-dev:amd64 (3.5.0-0~maarten0+artful, 3.5.0.1-0~maarten0+artful), libprotoc15:amd64…
ggoran
  • 630
  • 2
  • 12
  • 29
1
vote
0 answers

Protobuf Linker Error

I am trying to create an executable from object files. Here are the commands that I have used - g++ -Wall -O3 -std=c++0x -march=native -fopenmp -pthread -I/usr/local/include -DUSESSE -DUSEOMP -c -o timer.o timer.cpp g++ model.pb.cc -Wall -O3…
yashdosi
  • 1,186
  • 1
  • 18
  • 40
1
vote
0 answers

apache beam (dataflow2) not using correct ProtoCoder when using protoc3.4

I'm migrating to dataflow2 and also proto compiler3.4. I'm not getting the Coder.NonDeterministicException on proto objects when I have nested protos with this a leaf: message NodeId { optional int64 value = 1; } It is complaining that java…
1
vote
1 answer

Issue running the protobuf compiler on nested directories of proto files

I have several nested directories, each containing proto files, and many of the proto files have dependencies on the other protos located somewhere within the root directory. I'm using this script to try to compile them, and executing it from a…
Eden
  • 1,782
  • 15
  • 23
1
vote
1 answer

scons: how to specify dependency to an external build target?

I'm using protobuf to generate from .proto files to .cc/.h files. So I have my SConscript as below: env.protoc('my.proto') env.Program(target='pb_my', CCFLAGS="-I.", source=['pb_my.cpp', 'my.pb.cc'], LIBS='protobuf') I find…
Hind Forsum
  • 9,717
  • 13
  • 63
  • 119
1
vote
0 answers

Permission denied when compiling multiple protobuf files

Trying to compile multiple protobuf files within a single directory in Window using grpc-tools but it is giving the error Permission denied. // this works grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../static_codegen/…
Stanley
  • 2,798
  • 5
  • 22
  • 44
1
vote
1 answer

Using g++ to compile a C++ program that uses Tensorflow

I'm trying to compile a c++ program that uses Tensorflow and I am having some issues. The basic idea is to first use bazel to generate a dynamic-library .so file and pass that to g++. But it seems problems occur before even that stage - my program…
Hainan
  • 11
  • 1
1
vote
1 answer

Issue while generating grpc Java stub using protoc v3

I am using Protoc version 3.0 on Ubuntu 14.4 and issuing command protoc -I ./ --java_out=. --grpc_out=. --plugin=protoc-gen-grpc=/opt/jvision/grpc/oc/protoc-gen-grpc-java-1.0.0-linux-x86_32.exe ./agent.proto Same issue for python described…
Ammad
  • 4,031
  • 12
  • 39
  • 62
1
vote
1 answer

Improper deserialization of protocol message

I am trying out protocol buffer serialization & deserialization in C language. I created a learn.proto message as shown below and just tried to pack a message into a *uint8_t and unpack this. syntax = "proto3"; package learn; message learnmessage…
user3219492
  • 774
  • 1
  • 10
  • 18