Open nickph7 opened 2 years ago
Yes. I have the same problem. I tried using another forked repository instead.
# http_archive(
# name = "rules_cc",
# strip_prefix = "rules_cc-main",
# urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"],
# )
http_archive(
name = "rules_cc",
strip_prefix = "rules_cc-main",
urls = ["https://github.com/lizan/rules_cc/archive/main.zip"],
)
Similarly, I've been using a previous archive of rules_cc and now my builds work
http_archive(
name = "rules_cc",
strip_prefix = "rules_cc-8bb0eb5c5ccd96b91753bb112096bb6993d16d13",
sha256 = "8cd53b3563a3f66daa1f06f97b78a35600986a547bb27bebcafb8b1f8f54efb0",
urls = ["https://github.com/bazelbuild/rules_cc/archive/8bb0eb5c5ccd96b91753bb112096bb6993d16d13.zip"],
)
Additionally, I found that the bug is reproducible by just including rules_cc
in your WORKSPACE folder and trying to build a simple target
This problem has not been fixed
I think 2f8c04c04462ab83c545ab14c0da68c3b4c96191 will have broken compatibility with Bazel < 5.1 (as use_cpp_toolchain
was added in v5.1.0 - bazelbuild/bazel#14795).
Description of the problem / feature request:
My repository using
rules_cc
no longer builds correctly because it cannot find the symbolsuse_cpp_toolchain
in@bazel_tools//tools/cpp:toolchain_utils.bzl
. When removing the cache (rm -rf ~/.cache/bazel
) and rebuilding, the definition ofuse_cpp_toolchain
is indeed not in the file located at~/.cache/bazel/install/[hash]/embedded_tools/tools/cpp
. But when looking in the bazel repo attools/cpp/toolchain_utils.bzl
. There is a definition ofuse_cpp_toolchain
.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
If you remove
~/.cache/bazel
folder, clone mediapipe, and build any of the desktop examples, it should cause the problem (tested on 2 computers).What operating system are you running Bazel on?
Ubuntu 20.04 LTS
What's the output of
bazel info release
?5.0.0
What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
bazel clean --expunge
thenbazel build --verbose_failure -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \ mediapipe/examples/desktop/face_detection:face_detection_gpu
Have you found anything relevant by searching the web?
I have found nothing relevant on these websites
Any other information, logs, or outputs that you want to share?
I have tried: