Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing fedora local dev env protobuf dependency #1728

Conversation

aradwann
Copy link
Contributor

I was getting started with local development of restate on my fedora setup and it failed to compile

error: failed to run custom build command for `restate-core v1.1.0 (/home/aradwan/Documents/repos/restate/crates/core)`

Caused by:
  process didn't exit successfully: `/home/aradwan/Documents/repos/restate/target/debug/build/restate-core-6e6184d6ff0d784f/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=./protobuf/node_svc.proto
  cargo:rerun-if-changed=protobuf
  cargo:rerun-if-changed=../types/protobuf

  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: google/protobuf/empty.proto: File not found.\nnode_svc.proto:12:1: Import \"google/protobuf/empty.proto\" was not found or had errors.\nnode_svc.proto:20:16: \"google.protobuf.Empty\" is not defined.\n" }
warning: build failed, waiting for other jobs to finish...

Error was solved by installing protobuf-devel

Why Both Are Needed

Compiling .proto Files: The protobuf-compiler is used during the build process to convert your .proto files into source code. This step is critical for generating the classes and methods you will use in your application.

Building Your Application: Once you have the generated source code, you need the protobuf-devel package because it provides the headers and libraries required to compile and link your application against the Protocol Buffers library. This allows your application to use the generated code properly.

Without protobuf-devel, you would not have the necessary components to compile your application, even if you have already generated the source code with protobuf-compiler.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, I have Fedora too and I forgot to add this, thanks! :)

@slinkydeveloper slinkydeveloper merged commit 12cdaa8 into restatedev:main Jul 19, 2024
@aradwann aradwann deleted the add-missing-dev-env-fedora-dependency branch July 19, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants