-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
0.19.1: @bazel_tools//tools/cpp:cc-compiler-local-k8' is not a cc_toolchain rule
#6662
Comments
cc_toolchain_suite. Fixes bazelbuild#6662.
Could the following output have the same underlying cause? edit: If this is irrelevant, I can delete this comment and file a separate issue. |
@gelrom can you share the build command? Seems close enough, but not quite the same. |
@gelrom also, could you please provide the list of valid identifiers in the error message? |
@scottminor-google, we've confirmed that @bazel_tools//tools/cpp:default-toolchain is in error. |
@scentini bazel build --crosstool_top=//lib/bazel:toolchain //... |
We have a long-ish bazelrc that is explicit about each Is there a different spelling for the same behavior/toolchain as |
Thanks for the fix! I rebuilt bazel from
This is reproduced in a workspace with:
Bazel builds successfully when doing:
but fails with the above error when specifying
|
In our codebase, the error is a little different - it still complains about Is there anything I can read up on to better understand C/C++ toolchain resolution and what best practices are? I feel woefully uneducated when it comes to this area of Bazel. |
I'm encountering an issue similar to this. I took some time to make a minimal repro in https://github.com/wjywbs/bazel-cc-toolchain-bug, and posted the outputs of bazel 0.18.1, 0.19.0 and 0.19.1 in there. |
Thanks for the repro, looking into it. |
Part of bazelbuild#6662. RELNOTES: cc_toolchains from @local_config_cc are not longer automatically registered for toolchain resolution. If you need this, add "register_toolchains('@local_config_cc//:all')" to your WORKSPACE.
It looks like cherrypicking 683c302 will fix this (but, it changes how crosstool_top is selected). @scottminor-google, can you add that cherrypick on top of the existing release-0.19.2 branch and let me know if it works? |
I've pushed the cherrypick into the RC, please let me know if there are still issues. |
I built bazel from |
Closing since 0.19.2 will be released shortly. |
Baseline: ac88041 Cherry picks: + 9bc3b20: Fix the "nojava" platform and enable full presubmit checks for the various JDK platforms now that we have enough GCE resources. + 54c2572: Add openjdk_linux_archive java_toolchain for nojava platform. + 20bfdc6: Automated rollback of commit 19a401c. + 914b4ce: Windows: Fix Precondition check for addDynamicInputLinkOptions + 83d406b: Windows, test-setup.sh: Setting RUNFILES_MANIFEST_FILE only when it exists. + e025726: Update turbine + 5f312dd: Fix event id for action_completed BEP events + f0c844c: Release 0.19.0 (2018-10-29) + c3fb1db: Do not use CROSSTOOL to select cc_toolchain + 8e28083: Windows Add tests for msys gcc toolchain and mingw gcc toolchain + fd52341: update bazel-toolchains pin to latest release Part of changes to allow bazelci to use 0.19.0 configs. RBE toolchain configs at or before 0.17.0 are not compatible with bazel 0.19.0 or above. + eb2af0f: Release 0.19.1 (2018-11-12) + 6bc4528: Also update cc_toolchain.toolchain_identifier when CC_TOOLCHAIN_NAME is set + f7e5aef: Add cc_toolchain targets for the new entries in the default cc_toolchain_suite. + 683c302: Read the CROSSTOOL from the package of the current cc_toolchain, not from --crosstool_top - Fixes regression #6662, by fixing tools/cpp/BUILD - Fixes regression #6665, by setting the toolchain identifier. - CROSSTOOL file is now read from the package of cc_toolchain, not from the package of cc_toolchain_suite. This is not expected to break anybody since cc_toolchain_suite and cc_toolchain are commonly in the same package.
Description of the problem / feature request:
C++ builds fail with:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
On Linux/amd64, in an otherwise empty workspace with an empty WORKSPACE file, run:
What operating system are you running Bazel on?
Linux (Debian variant)
What's the output of
bazel info release
?Have you found anything relevant by searching the web?
In the file https://github.com/bazelbuild/bazel/blob/0.19.1/tools/cpp/BUILD:
On the 0.19.0 tag, this line refers to
cc-compiler-local
, acc_toolchain
rule that exists.On the 0.19.1 tag, this line refers to
cc-compiler-local-k8
, acc_toolchain
rule that does not exist.This appears to be the cause of the issue, although I am not sure why this was changed.
The text was updated successfully, but these errors were encountered: