upb icon indicating copy to clipboard operation
upb copied to clipboard

Build error with Bazel 4.2.1

Open veblush opened this issue 3 years ago • 4 comments

Building upb with Bazel 4.2.1 has got the following error.

ERROR: Traceback (most recent call last):
        File "/usr/local/google/home/veblush/.cache/bazel/_bazel_veblush/c4652c20fd8d5880d194bf82693e4fee/external/upb/bazel/upb_proto_library.bzl", line 32, column 76, in <toplevel>                                                                                                                    load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")                               
Error: file '@bazel_tools//tools/cpp:toolchain_utils.bzl' does not contain symbol 'use_cpp_toolchain' (did you mean 'find_cpp_toolchain'?)   INFO: Repository rules_proto instantiated at:                               

I suspect that this is caused by this change https://github.com/protocolbuffers/upb/commit/d2177912c70257bf65e58e134b8c9837fb685cb4. Since gRPC needs to support Bazel 4 and 5 (based on https://opensource.google/documentation/policies/cplusplus-support#3_build_systems), would you fix it to support Bazel 4?

veblush avatar Jun 30 '22 17:06 veblush

Any update on this? This is a blocker to upgrading upb on grpc.

veblush avatar Aug 30 '22 18:08 veblush

FWIW, Bazel 6 is imminent, is waiting an option? https://bazel.build/about/roadmap

perezd avatar Aug 30 '22 18:08 perezd

@perezd That could be an option but I'd like to fix it if it doesn't require a huge fix. I'm worried that gRPC might find a bunch of breaking changes in the next upb update (maybe next year?) as upb has been evolved rapidly these days.

veblush avatar Sep 09 '22 17:09 veblush

FYI, internal b/244333151 was filed to track this.

veblush avatar Sep 09 '22 17:09 veblush