I am trying to build a c++ binary using bazel rules_cc. I’m on debian linux stable x86_64. I am using git_repository() rule to download the RE2 library and I get an error while building.
The usage and error is
$ bazel build //mytesty:main Starting local Bazel server and connecting to it... ERROR: While resolving configuration keys for @RE2//:re2: no such target '@platforms//os:wasi': target 'wasi' not declared in package 'os' defined by /home/davis/.cache/bazel/_bazel_davis/810a2cc77a9a6b5312233b083c966cb8/external/platforms/os/BUILD ERROR: Analysis of target '//mytesty:main' failed; build aborted: Analysis failed INFO: Elapsed time: 2.590s INFO: 0 processes. FAILED: Build did NOT complete successfully (17 packages loaded, 27 targets configured)
I’m trying to use the git_repository() rule to pull down the RE2 git repo. Here is the relevant info from the WORKSPACE file.
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") git_repository( name = "RE2", remote = "https://github.com/google/re2.git", commit = "5723bb8950318135ed9cf4fc76bed988a087f536" )
Leave an answer