bazelbuild / bazelbuild/platforms
How to reference the platform repository.
- Dominant language
- Starlark
- Stars
- 124
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Hi All,
I am new to use bazel build system. I installed the latest bazelisk and bazel with 6.0.0. However when I tried to build fleetbench the following messages were pop out.
bazel run -c opt fleetbench/swissmap:cold_swissmap_benchmark
ERROR: /root/.cache/bazel/_bazel_root/0bce1989468318c371f4348e6ac4d902/external/bazel_tools/platforms/BUILD:89:6: in alias rule @bazel_tools//platforms:windows: Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms. See https://github.com/bazelbuild/bazel/issues/8622 for details.
ERROR: /root/.cache/bazel/_bazel_root/0bce1989468318c371f4348e6ac4d902/external/bazel_tools/platforms/BUILD:89:6: Analysis of target '@bazel_tools//platforms:windows' failed
ERROR: /home/nvidia/walter/fleetbench/fleetbench/swissmap/BUILD:30:28: While resolving toolchains for target //fleetbench/swissmap:cold_swissmap_benchmark: invalid registered toolchain '@bazel_skylib//toolchains/unittest:cmd_toolchain':
ERROR: Analysis of target '//fleetbench/swissmap:cold_swissmap_benchmark' failed; build aborted:
INFO: Elapsed time: 1.363s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (33 packages loaded, 85 targets configured)
ERROR: Build failed. Not running target
I had checked the issue 8622. But I didn't get any clue how to declare dependency on the platform repository. Could someone give me a hint? Thanks in advance.
Walter
Contributor guide
Research direction
Start with the reported bazel_tools/platforms/BUILD error and the dependency guidance in Bazel issue 8622. Then inspect fleetbench/swissmap/BUILD and the command shown in the report to determine how the platform repository is expected to be declared. Done means the cold_swissmap_benchmark command completes without the removed-constraints or invalid-toolchain errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100