bazel build error fix, waiting for someone review the pr,thanks

70 views
Skip to first unread message

quan liu

unread,
Dec 10, 2024, 5:46:18 AM12/10/24
to Protocol Buffers
bazel build :protoc :protobuf --enable_bzlmod
Starting local Bazel server and connecting to it...
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_...@1.7.0, but got bazel_...@1.7.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_java', the root module requires module version rules...@8.3.2, but got rules...@8.5.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_python', the root module requires module version rules_...@0.28.0, but got rules_...@0.40.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'platforms', the root module requires module version plat...@0.0.8, but got plat...@0.0.10 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'zlib', the root module requires module version zl...@1.3.1, but got zl...@1.3.1.bcr.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'proto_bazel_features', the root module requires module version bazel_f...@1.17.0, but got bazel_f...@1.21.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'com_google_googletest', the root module requires module version googl...@1.14.0, but got googl...@1.15.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_proto', the root module requires module version rules...@4.0.0, but got rules...@7.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
ERROR: Traceback (most recent call last):
        File "/mnt/e/test/protobuf/bazel/private/native.bzl", line 5, column 26, in <toplevel>
                native_cc_proto_aspect = cc_proto_aspect
Error: predeclared variable 'cc_proto_aspect' is referenced before assignment.
ERROR: Skipping ':protobuf': error loading package '': at /mnt/e/test/protobuf/bazel/toolchains/proto_lang_toolchain.bzl:11:6: at /mnt/e/test/protobuf/bazel/common/proto_common.bzl:12:6: initialization of module 'bazel/private/native.bzl' failed
ERROR: error loading package '': at /mnt/e/test/protobuf/bazel/toolchains/proto_lang_toolchain.bzl:11:6: at /mnt/e/test/protobuf/bazel/common/proto_common.bzl:12:6: initialization of module 'bazel/private/native.bzl' failed
INFO: Elapsed time: 6.367s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
FAILED:
    Fetching module extension version_extension in @@bazel_features+//private:extensions.bzl; starting


sh...@google.com

unread,
Dec 12, 2024, 5:23:55 PM12/12/24
to Protocol Buffers
I think this is only happening in the main branch right? There's a fix pending for that https://github.com/protocolbuffers/protobuf/pull/19576
Reply all
Reply to author
Forward
0 new messages