Skip to content

Bazel 8.0.0rc1: 'cc/toolchains' is not a package error #23899

@gergelyfabian

Description

@gergelyfabian

Description of the bug:

Testing Bazel 8.0.0rc1 I got such an error:

ERROR: Error computing the main repository mapping: at /home/user/.cache/bazel/_bazel_user/64527517dacf7170f7d914889f83481c/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'?

This worked with Bazel 7.3.2.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Reproduction: https://github.com/gergelyfabian/bazel-scala-example/tree/bazel-8.0.0rc1

Simply run bazel build //... in this repo at branch bazel-8.0.0rc1

Which operating system are you running Bazel on?

Ubuntu 24.04

What is the output of bazel info release?

release 8.0.0rc1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

git@github.com:gergelyfabian/bazel-scala-example.git
0bbacfe5f35550db2da2ea5ba4f0edcba81ad46

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

$ bazelisk --bisect=7.3.2..8.0.0rc1

This finds another bug:

ERROR: Error computing the main repository mapping: Label '@@platforms//host:extension.bzl' is invalid because 'host' is not a package; perhaps you meant to put the colon here: '@@platforms//:host/extension.bzl'?

first bad commit is 74c8ca4

But this is incorrect I think.

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions