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
0 answers

Generating type definitions from .protobuf file using ts-protoc-gen results with just raw interfaces definitions except jspb.Message prototypes

I am using protobuf library in order to generate code for data structures shared between platforms. One of these platforms is nodejs, I use typescript on top of that. So besides protoc compiler…
Falcon
  • 121
  • 5
1
vote
1 answer

mvn property is not getting overriden with -D option

In my pom.xml, I have a property for protocPath: 3.6.1 ${project.basedir}/.. ${build.root.dir}/build
ealeon
  • 12,074
  • 24
  • 92
  • 173
1
vote
0 answers

'module.exports' not working with gRPC (npm-project)

I create protobuf files and grpc services with this command: protoc -I=./src/proto $(find ./src/proto -iname *.proto) --js_out=import_style=commonjs:./src/grpc-generated…
1
vote
0 answers

Difference between devshell environment and bitbake task environment?

I have upgraded libopencv version in the daisy openembedded to 4.1. It would be very difficult to move to the newer openembedded release due to required support for old hardware. I have a problem running google protoc compiler(from protobuf-native…
ozimki
  • 75
  • 8
1
vote
0 answers

Error "make all" /usr/bin/ld: cannot find -lprotobuf when installing caffe

I want to install caffe with conda. In the tutorial I followed it was told to install these stuff sudo apt-get install protobuf-compiler libprotobuf-dev Soon I found out that is was out-of-date and removed both of them and got latest protoc 3.9.1…
Michael
  • 339
  • 2
  • 11
1
vote
1 answer

Protoc 3.9 Compiled Output for C# Fails

Runtime environment: .net core 2.2 , same issue for .net framework 4.6.1 While trying to create gRPC bindings for C# for Google Assistant SDK, in EmbeddedAssistant.g.cs am getting compile time error "Cannot Convert from System.Type to…
Abdul Hye
  • 21
  • 3
1
vote
1 answer

Unexpected output path for compiled protobuf files

I'm trying to compile several subfolders of .proto files using CMake, and I'd like the output to end up in a similar folder structure. I'm pretty new to CMake, so I expect that's an elegant way to do it, but right now I'm manually specifying the…
1
vote
1 answer

How do I correctly include golang protobuf/ptypes for protoc when using dep?

I'm having trouble including the google/protobuf/timestamp.proto well known type, when using dep. I get an error: google/protobuf/timestamp.proto: File not found service.proto: syntax = "proto3"; import "google/protobuf/timestamp.proto"; package…
rynop
  • 50,086
  • 26
  • 101
  • 112
1
vote
0 answers

Is there a way to compile protobuf and all its plugins together?

Right now I need to compile my protobuf and all the plugins(imported) separately.
1
vote
1 answer

protoc-gen-go struct xxx covert to map[string]interface{}

The struct in the .pb.go file generated by .proto file has three additional fields and some other things.like this: When converting this struct to json, if one field is empty, the field will not appear in json. Now I know it can be done using…
yongguangl
  • 87
  • 2
  • 11
1
vote
1 answer

fatal error: 'google/protobuf/compiler/plugin.h' file not found

I'm compiling a Google protobuf plugin from these sources. I've installed protobuf@2.5 with the homebrew command: brew install protobuf@2.5 After installation I get the following error when trying to compile by calling…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
1
vote
1 answer

Intialise protocol buffers in single expression

I'm using protocol buffers in .net, and generating C# classes using protoc. For example, lets take this proto3 file from https://developers.google.com/protocol-buffers/docs/proto3: message SearchResponse { repeated Result results = 1; } message…
Yair Halberstadt
  • 5,733
  • 28
  • 60
1
vote
0 answers

PROTOCOL BUFFER ERROR due to incompatible versions

I am trying to compile on ubuntu 18.04 and receive the following error - file.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is protoc…
ksoop
  • 165
  • 1
  • 4
  • 16
1
vote
1 answer

Should protoc v2.6.1 produce 'Expected "required", "optional", or "repeated".'

Using Ubuntu 16.04 and CMake, I'm trying to create a shared library from the protobuf files. CMakes protobuf_generate_cpp is producing PROTO_SRCS and PROTO_HDRS. I didn't have any google/protobuf/*.proto files on my system, so I downloaded 3.6.1 and…
Ender
  • 1,652
  • 2
  • 25
  • 50
1
vote
0 answers

I am doing image processing in Python and TensorFlow I try to create TF_Record file it give error

I already install protoc3 and my Python version is 3.6. I already created the CSV file using that I have to create TF_record. anoj@anoj-Lenovo-G50-80:~/**PycharmProjects/untitled1/venv$ python3 tf_Record.py --csv_input=data/train_labels.csv …
Anoj Kulas
  • 11
  • 4