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

Undocumented protobuf dependency #361

Closed
emgrav opened this issue Mar 16, 2023 · 2 comments
Closed

Undocumented protobuf dependency #361

emgrav opened this issue Mar 16, 2023 · 2 comments

Comments

@emgrav
Copy link
Contributor

emgrav commented Mar 16, 2023

Building the zitadel crate, also as a dependency, fails with the following error if you don't have protobuf development files installed:

   Compiling zitadel v3.1.9
error: failed to run custom build command for `zitadel v3.1.9`

Caused by:
  process didn't exit successfully: `/home/emelie/[...]/debug/build/zitadel-18a8719d73ee0e93/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=external/zitadel/proto
  cargo:rerun-if-changed=external/protoc-gen-validate
  cargo:rerun-if-changed=external/googleapis
  cargo:rerun-if-changed=external/grpc-gateway

  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: google/protobuf/descriptor.proto: File not found.\ngoogle/protobuf/struct.proto: File not found.\nprotoc-gen-openapiv2/options/openapiv2.proto:5:1: Import \"google/protobuf/struct.proto\" was not found or had errors.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/openapiv2.proto: \"google.protobuf.Value\" is not defined.\nprotoc-gen-openapiv2/options/annotations.proto:5:1: Import \"google/protobuf/descriptor.proto\" was not found or had errors.\nprotoc-gen-openapiv2/options/annotations.proto:6:1: Import \"protoc-gen-openapiv2/options/openapiv2.proto\" was not found or had errors.\nprotoc-gen-openapiv2/options/annotations.proto:10:8: \"google.protobuf.FileOptions\" is not defined.\nprotoc-gen-openapiv2/options/annotations.proto:17:8: \"google.protobuf.MethodOptions\" is not defined.\nprotoc-gen-openapiv2/options/annotations.proto:24:8: \"google.protobuf.MessageOptions\" is not defined.\nprotoc-gen-openapiv2/options/annotations.proto:31:8: \"google.protobuf.ServiceOptions\" is not defined.\nprotoc-gen-openapiv2/options/annotations.proto:38:8: \"google.protobuf.FieldOptions\" is not defined.\n" }
warning: build failed, waiting for other jobs to finish...

As far as I can tell this isn't documented anywhere. Documenting it could be quite helpful, as it's not immediately obvious what the problem is from the error message. On fedora the required package is protobuf-devel, I would assume it's protobuf-dev on apt-based distros.

@buehler
Copy link
Collaborator

buehler commented Mar 30, 2023

Hmm. This should be available locally. Did you fetch the git submodules?
(git submodule update --init)

These files are located in submodules, so to develop them locally, you'll need to update them. In the crate, they should be available when published. Otherwise, this would be a bug.

@emgrav
Copy link
Contributor Author

emgrav commented Mar 30, 2023

Yes, the issue occurred with the submodules fetched. I encountered the above error until I installed the package in question, at which point it worked. It was this issue thread that led me on the right track: grpc-ecosystem/grpc-gateway#422

@buehler buehler closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants