graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Protobuf version

Open sdelvalle57 opened this issue 2 years ago • 3 comments

Bug report

I have cloned the graph-node repo and when I try to run cargo build I get these errors Using protoc version 3.6.1

thread 'main' panicked at 'Failed to compile Substreams proto(s): Custom { kind: Other, error: "protoc failed: Unknown flag: --experimental_allow_proto3_optional\n" }', graph/build.rs:20:10

if I just remove the experimental flags I get

thread 'main' panicked at 'Failed to compile Substreams entity proto(s): Custom { kind: Other, error: "protoc failed: codec.proto:44:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ncodec.prot

Where I see it uses proto2 syntax, so my question is which version of proto should I use to make it work?

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

  • [X] Tick this box if this bug is caused by a regression found in the latest release.
  • [X] Tick this box if this bug is specific to the hosted service.
  • [X] I have searched the issue tracker to make sure this issue is not a duplicate.

OS information

None

sdelvalle57 avatar Apr 05 '23 23:04 sdelvalle57

I am getting this error when trying to build:

  thread 'main' panicked at 'Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.You could try running `brew install protobuf` or downloading it from https://github.com/protocolbuffers/protobuf/releases

outdoteth avatar Jul 28 '23 11:07 outdoteth

I solved it by re-installing protobuf via brew https://grpc.io/docs/protoc-installation/ and then linking again:

brew link --overwrite protobuf  

outdoteth avatar Jul 28 '23 11:07 outdoteth

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.

github-actions[bot] avatar Jan 25 '24 00:01 github-actions[bot]