-
Notifications
You must be signed in to change notification settings - Fork 137
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
--incompatible_enable_cc_toolchain_resolution + universal tools fails to build #1103
Comments
@comius any thoughts here? |
You need to have either platform_mappings or the change in transitions to also set platform flag. Otherwise —incompatible_enable_cc_toolchains doesn’t work, because it can’t pick up the right C++ toolchain |
this is with the platform_mappings from your PR and bzlmod disabled |
Thanks, I’ll investigate tomorrow. |
I can't reproduce this. Command: Result: I did The build succeeds with all 4 combinations of --universal_tools and --host_platform present/not-present. |
I get a failure using
This is probably caused by some differences between WORKSPACE/bzlmod mode. Thanks @keith for bzlmod platform_mapping, I wasn't able to test this yesterday. |
With #1106, I again get all the builds to pass. |
i haven't seen that exception (and can't repro with that command on a m1 machine), given the conversation on that linked PR is that something we still need to debug? |
The exception with bzlmod is being fixed. I can’t reproduce the bug you’ve reported, but I also don’t have M1. Can you after the failed build run “bazel config”, search for the two st hashes to get config hashes and then post the output of “bazel config hash1 hash2”? I can do a bit more investigation on that data, but without M1 machine it’ll be hard to fix. It seems likely the problem is with C++ toolchain setup on M1. |
the diff is expected:
|
on an intel mac it repros for me too but you have to switch |
Thanks, the flag helped me reproduce. The problem was kind of obvious: bazelbuild/apple_support#257 General rule is that if there's a transition on |
thanks for debugging! is there any way we could make bazel more obvious about this type of failure? these seem really tough to spot |
Maybe. We'd need to hardcode some information, because the failure happens because of But the the flags also won't need to match in the future. After C++ toolchain resolution is flipped on, you could remove The configurations are different and that's all Bazel can tell. You can't really tell if the rules are using toolchains based on platforms or cpu flag or even a foo flag. |
Thinking about this more, why is this required only when passing |
@keith should this be closed? |
That apple_support change does fix this |
With this command:
On this branch #1102
The build fails with:
It doesn't file as long as you have platform_mappings in the case you build the worker directly, so it seems like it must have something to do with it being an exec tool.
I was testing this in preparation for bazelbuild/bazel#19441. If you remove
--incompatible_enable_cc_toolchain_resolution
it builds again.The text was updated successfully, but these errors were encountered: