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

[Bazel CI] Error toolchain_config_utils.bzl is invalid because 'cc/toolchains' is not a package. #2310

Closed
sgowroji opened this issue Oct 17, 2024 · 0 comments · Fixed by #2332 or #2335

Comments

@sgowroji
Copy link
Contributor

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4205#019298ab-9bbe-4ef2-b7ec-e35a9a8fd69f

Platform: MacOS

Logs:

ERROR: Error computing the main repository mapping: at /private/var/tmp/_bazel_buildkite/9f47f6beb72f15412af12490e86ed0ba/external/bazel_tools/tools/cpp/cc_configure.bzl:18:6: Label '@@rules_cc//cc/toolchains:toolchain_config_utils.bzl' is invalid because 'cc/toolchains' is not a package; perhaps you meant to put the colon here: '@@rules_cc//cc:toolchains/toolchain_config_utils.bzl'?

Culprit: bazelbuild/bazel@1c4e78a

Steps:

git clone https://github.com/bazelbuild/rules_python
git reset 0e600586aea596a488902ce90938b36ce7e9f6d5  --hard
export USE_BAZEL_VERSION=1d022f403d26505d6edda73a50e08da53109dd3b
bazel build --noenable_bzlmode --enable_workspace  -- ... 

CC Greenteam @meteorcloudy

github-merge-queue bot pushed a commit that referenced this issue Oct 23, 2024
Fix various errors with upcoming Bazel versions

* Use rules_cc 0.0.13 for integration tests.
* Set `allow_empty=True` in local toolchains setup

Fixes #2310
github-merge-queue bot pushed a commit that referenced this issue Oct 24, 2024
In order for WORKSPACE to work with newer bazel versions, rules_cc
0.0.13 or higher is
necessary. rules_cc then requires a newer protobuf version.

Note I couldn't figure out the minimum protobuf version, but 27.0 seems
to work OK.

AFAIK only WORKSPACE is affected. Our bzlmod uses 0.0.9 and hasn't had
issues.

Fixes #2310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant