You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.19.1: @bazel_tools//tools/cpp:cc-compiler-local-k8' is not a cc_toolchain rule #6662
Could the following output have the same underlying cause?
...in cc_toolchain rule @local_config_cc//:cc-compiler-k8: Error while selecting cc_toolchain: Toolchain identifier 'local' was not found, valid identifiers are...
This break occurs at 0.19.1. I've been unable to determine if it also occurs at 0.19, but 0.18 was definitely working. Note that this still breaks even if all backward breaking flags that were flipped in 0.19 are set to false.
edit: If this is irrelevant, I can delete this comment and file a separate issue.
@scottminor-google, we've confirmed that @bazel_tools//tools/cpp:default-toolchain is in error.
Why do you need to set --crosstool_top=@bazel_tools//tools/cpp:default-toolchain ? I'm trying to determine the scope of the issue.
Thanks.
In our codebase, the error is a little different - it still complains about @local_config_cc//:cc-compiler-k8, but the available toolchain identifiers is one element - the toolchain_identifier specified in our custom CROSSTOOL. I have no idea why that would be interacting with @local_config_cc (or even what that is supposed to be).
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.
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?
Activity
katre commentedon Nov 12, 2018
You're right about the cause, I'm not sure what those changed lines are about. Adding @mhlopko and @lberki to try and help figure it out.
nlopezgi commentedon Nov 12, 2018
#6665 might be related. Perhaps this is also due to 6bc4528 not being included in 0.19.1
gelrom commentedon Nov 13, 2018
Could the following output have the same underlying cause?
...
in cc_toolchain rule @local_config_cc//:cc-compiler-k8: Error while selecting cc_toolchain: Toolchain identifier 'local' was not found, valid identifiers are...This break occurs at 0.19.1. I've been unable to determine if it also occurs at 0.19, but 0.18 was definitely working. Note that this still breaks even if all backward breaking flags that were flipped in 0.19 are set to false.
edit: If this is irrelevant, I can delete this comment and file a separate issue.
scentini commentedon Nov 13, 2018
@gelrom can you share the build command? Seems close enough, but not quite the same.
scentini commentedon Nov 13, 2018
@gelrom also, could you please provide the list of valid identifiers in the error message?
scentini commentedon Nov 13, 2018
@scottminor-google, we've confirmed that @bazel_tools//tools/cpp:default-toolchain is in error.
Why do you need to set --crosstool_top=@bazel_tools//tools/cpp:default-toolchain ? I'm trying to determine the scope of the issue.
Thanks.
4 remaining items
scottmin0r commentedon Nov 14, 2018
Thanks for the fix! I rebuilt bazel from
94d51fcto test/verify this fix against our codebase. Unfortunately, I'm running into another error:This is reproduced in a workspace with:
WORKSPACEfile//hello_world.cpp://BUILD:Bazel builds successfully when doing:
but fails with the above error when specifying
default-toolchain:scottmin0r commentedon Nov 14, 2018
In our codebase, the error is a little different - it still complains about
@local_config_cc//:cc-compiler-k8, but the available toolchain identifiers is one element - the toolchain_identifier specified in our custom CROSSTOOL. I have no idea why that would be interacting with@local_config_cc(or even what that is supposed to be).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.
wjywbs commentedon Nov 14, 2018
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.
scentini commentedon Nov 14, 2018
Thanks for the repro, looking into it.
katre commentedon Nov 14, 2018
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?
Add cc_toolchain targets for the new entries in the default cc_toolch…
katre commentedon Nov 14, 2018
I've pushed the cherrypick into the RC, please let me know if there are still issues.
scottmin0r commentedon Nov 14, 2018
I built bazel from
f2be11dda2and it successfully builds a C++ target from our codebase with no additional flags. Thanks for the fix!katre commentedon Nov 19, 2018
Closing since 0.19.2 will be released shortly.
Release 0.19.2 (2018-11-19)
Add cc_toolchain targets for the new entries in the default cc_toolch…
Add cc_toolchain targets for the new entries in the default cc_toolch…