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

undefined: grpc.SupportPackageIsVersion7 #160

Closed
noel-yap opened this issue Nov 19, 2021 · 2 comments · Fixed by #152
Closed

undefined: grpc.SupportPackageIsVersion7 #160

noel-yap opened this issue Nov 19, 2021 · 2 comments · Fixed by #152
Labels
bug Something isn't working lang-go Go rules specific resolved-next-release Code to resolve issue is pending release

Comments

@noel-yap
Copy link

Description

When building, I'm getting the following errors:

example_grpc.pb.go:15:11: undefined: grpc.SupportPackageIsVersion7
example_grpc.pb.go:27:5: undefined: grpc.ClientConnInterface
example_grpc.pb.go:30:26: undefined: grpc.ClientConnInterface
example_grpc.pb.go:93:30: undefined: grpc.ServiceRegistrar

Some of the answers in https://stackoverflow.com/questions/63662787/undefined-grpc-supportpackageisversion7-grpc-serviceregistrar indicate version mismatches but I was under the impression that the bazel rules were supposed to help ensure those were compatible. Is my mental model inaccurate?

@aaliddell
Copy link
Member

Do you have an example of code that reproduces this?

It looks to me that you are attempting to link a version of grpc that differs from the version used to generate the sources with protoc. Using go_grpc_library should prevent this from happening, since it uses the same exact version for both building and linking. However, I note in your other issue that you are using the *_compile rule, which suggests you are manually linking grpc instead?

@aaliddell aaliddell added lang-go Go rules specific more-info-needed Further information is requested bug Something isn't working and removed more-info-needed Further information is requested labels Nov 25, 2021
@aaliddell
Copy link
Member

So this is an issue with Gazelle 0.24.0, where they've added a super old version of gRPC to their dependencies, which then breaks all later declarations of org_golang_google_grpc and other dependencies: bazelbuild/bazel-gazelle#1115

Example of broken CI when updating to Gazelle 0.24.0: https://buildkite.com/bazel/rules-proto-grpc-rules-proto-grpc/builds/1264#40146824-6b87-4b46-9e48-f4f8418555c3

Since it looks like they won't revert pulling in half the world just to run Gazelle, we'll have to work around it and have a breaking change note in our docs.

@aaliddell aaliddell added the resolved-next-release Code to resolve issue is pending release label Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang-go Go rules specific resolved-next-release Code to resolve issue is pending release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants