Open jasonwbarnett opened 5 months ago
Thanks for filing an issue.
This is, partly, because the Rust compilation happens outside Pants, and so it cannot provide the protocol compiler itself. Something like https://github.com/pantsbuild/pants/pull/19813 would solve likely allow solving this "properly", with an appropriate version of protoc set up automatically...
For now, though, we could potentially just fix the formatting of https://www.pantsbuild.org/2.18/docs/contributions/development/setting-up-pants#step-2-bootstrap-the-rust-engine (and maybe expand slightly), where this is called out but accidentally within a run-on paragraph:
- PyEnv Providers that sometimes cause issues include: Ubuntu Deadsnakes You also need to have the protobuf compiler and LLVM clang installed. On Debian derivatives, these can be installed using apt install clang protobuf-compiler.
Is probably intended to be formatted as:
Providers that sometimes cause issues include:
- Ubuntu Deadsnakes
You also need to have the protobuf compiler and LLVM clang installed. On Debian derivatives, these can be installed using
apt install clang protobuf-compiler
.
Relevant code:
@jasonwbarnett are you in a position to submit an update?
For context here, protobuf is used as part of the Remote Execution API client in the Rust code which is used in the remote execution and remote cache implementations. The tonic
crate used to supply protoc
but stopped doing that for software supply chain reasons. Thus, the need for developers to install protoc into their development environment.
This is not really a bug, just a fact of what needs to be setup in the development environment.
Describe the bug
I was attempting to contribute to pants and found that on both Ubuntu 22.04 (x86_64) and Mac OS 14.3.1 (M2) I was unable to run
pants fmt ::
in this repository. It continued to fail doing some work. I read the error message and saw that it was complaining about missingprotoc
. So on Mac I ranbrew install protoc
and on Ubuntu 22.04 I ranapt install -y protobuf-compiler
and after that it worked on both platforms.Pants version N/A
OS Both Linux and Mac OS