Can't build //examples/protos:all using bazel version 7.0.0-pre.20230823.4
What version of gRPC and what language are you using?
master branch git commit 66d928c44043bdf24dd7ba157f35c0b65748ba54
What operating system (Linux, Windows,...) and version?
ubuntu 20.04
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
What did you do?
run build using bazel
bazel build //examples/protos:all
What did you expect to see?
build complete
What did you see instead?
➜ grpc git:(master) bazel build //examples/protos:all
INFO: Repository rules_proto instantiated at:
/home/tusen/code/grpc/WORKSPACE:11:16: in
Anything else we should know about your project / environment?
rules_apple is way too old inside gRPC. Upgrading it causes other problems though.
Please verify the Bazel version you use.
Please verify the Bazel version you use.
release 7.0.0-pre.20231011.2
@eugeneo
rules_appleis way too old inside gRPC. Upgrading it causes other problems though.
Is there any plan to upgrade it so that user can build grpc with newer bazel version like 7.0.0?
@AustinSchuh
rules_appleis way too old inside gRPC. Upgrading it causes other problems though.Is there any plan to upgrade it so that user can build grpc with newer bazel version like 7.0.0?
@AustinSchuh
No clue, I'm a fellow bazel user who is also trying to upgrade to bazel 7 and is blocked by gRPC not supporting bazel 7 yet. I got this far in debugging, then it got hard enough that I don't want to maintain an out of tree patch to upgrade. I shared this to make it easier for someone to get started. (Last time I contributed a fix, it took 2 years to merge. I don't have enough time to do that here)
Bazel 7 is not yet supported by gRPC. We will work on support once the final version of Bazel 7 is released.
https://releases.bazel.build/7.0.0/release/index.html is now released, any update?
I believe some work have been done. Have anybody tried building gRPC with Bazel7 now?
We can successfully build grpc with Bazel 7.0.2 and bzlmod, using an old version though:
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.56.3.bcr.1", repo_name = "com_github_grpc_grpc")
with --enable_bzlmod=false, we get the apple error above.
hello I come to join the flock, I'm hitting this same error when trying to use bazel 7.1.1 I'm bulding a project based on googleapis/googleapis WORKSPACE file and only the target /:build_gen works, the rest will give either an apple error or a "this code was built with a different version of protobuf" error depending on the grpc version used in the WORKSPACE file
This might be closable now -- looks like the .bazelversion in the root of the repository has been saying 7+ since https://github.com/grpc/grpc/pull/36105 in March. Local builds for me got past the rules_apple error mentioned in the description here.
Just wanted to confirm that I was able to get this working with bazel 7.3.1, grpc 1.65.0, and protobuf 26.1