-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Compile fails with tonic 0.8 #1047
Comments
I am also experiencing this behavior. To get past it I installed |
Related to this, I expect that some people will also be seeing something similar to the following:
In the case of said related error, as per https://stackoverflow.com/a/61368354 it means that one has protoc installed but not the protobuf resource files. On Ubuntu, if you are installing via the official repos, make sure both are installed: apt update && apt upgrade -y
apt install -y protobuf-compiler libprotobuf-dev On Alpine Linux, if you are installing via the official repos, make sure both are installed: apk add protoc protobuf-dev Or alternatively, if the version of protobuf in the repositories is too old then you could instead fetch a specific newer version from GitHub releases page of protobuf, and extract it into PROTOC_VERSION=3.20.1
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
which zip || apt update && apt upgrade -y && apt install zip -y
curl -sSLO "$PB_REL/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip"
unzip -o protoc-$PROTOC_VERSION-linux-x86_64.zip -d "/usr" (On an ordinary end-user machine, or on a long living server, or similar, you would not want to extract stuff into |
Generating protobuf via If you need help with how to get CI working you can also take a look at how |
It feels unfortunate and heavy to require protoc as a dep with tools such as buf[1] around with rust support. I have designed my projects to intentionally NOT require protoc as a dep. Now it must be added to support a single proto required for reflection? |
@hexfusion |
Thanks for the clarification. |
Bug Report
Version
0.8
Platform
5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Crates
Description
After upgrading from 0.7 to 0.8, build started to fail with this message.
This seems to me the change #1021 makes it require protoc for some reason.
Because my project was ok with tonic 0.7, this is kind of a bug.
The text was updated successfully, but these errors were encountered: