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

[Bug]: Cannot install cargo-shuttle #752

Closed
1 task done
bbstilson opened this issue Mar 25, 2023 · 4 comments
Closed
1 task done

[Bug]: Cannot install cargo-shuttle #752

bbstilson opened this issue Mar 25, 2023 · 4 comments
Labels
T-Bug Something isn't working

Comments

@bbstilson
Copy link

bbstilson commented Mar 25, 2023

What happened?

NOT A BUG: See comment below

A bug happened!

Indeed!

Running cargo install cargo-shuttle initially resulted in an error stating that the protobuf compiler was missing. This offered a helpful install command, and I complied:

sudo apt install protobuf-compiler

Running cargo install cargo-shuttle again resulted in a different error but it seems to rhyme. Both stderr outputs are in the subsequent log section separated by a line.

Addition Info:

OS: Pop_OS 22.04
rustc 1.68.1 (8460ca823 2023-03-20)

Please let me know if there's anything I can do to help repro 🙂

Version

v0.12.0

Which operating systems are you seeing the problem on?

Linux

Which CPU architectures are you seeing the problem on?

x86_64

Relevant log output

error: failed to run custom build command for `shuttle-proto v0.12.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install55sbxT/release/build/shuttle-proto-affb77931843dc88/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=./provisioner.proto
  cargo:rerun-if-changed=./runtime.proto
  cargo:rerun-if-changed=./

  --- stderr
  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.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases


--------------------------------------------------------

error: failed to run custom build command for `shuttle-proto v0.12.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install6TV0Gb/release/build/shuttle-proto-affb77931843dc88/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=./provisioner.proto
  cargo:rerun-if-changed=./runtime.proto
  cargo:rerun-if-changed=./

  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: runtime.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.\n" }
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-shuttle v0.12.0`, intermediate artifacts can be found at `/tmp/cargo-install6TV0Gb`

Duplicate declaration

  • I have searched the issues and there are none like this.
@bbstilson bbstilson added the T-Bug Something isn't working label Mar 25, 2023
@bbstilson
Copy link
Author

bbstilson commented Mar 25, 2023

After doing some digging, it looks like this is just a documentation discoverability issue. I was following the instructions from the shuttle.rs website after you login, which just tells the user to cargo install cargo-shuttle. I found the protoc install docs on the repo README (and the note about not being able to install protoc through apt).

As such, this is clearly NOT a bug, but is instead perhaps a feature request for improved docs and a different error message for Linux users 😄

@jonaro00
Copy link
Member

@bbstilson Yeah. Sadly that error message is printed by tonic-build, which is compiled before cargo-shuttle. So it's a bit tricky to avoid that scenario. But I agree that the docs can be more clear about this.

@jonaro00
Copy link
Member

Progress is being made towards moving away from protoc dependency, see #753

@bbstilson
Copy link
Author

Awesome! I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants