Open yuriyhanysh opened 1 year ago
Bisect points to https://github.com/bazelbuild/bazel/commit/b0487dc28eeb2ce3c0485cf0a21a5e69fbb00bc3, but that commit doesn't have an author listed.
@bazel-io flag
@bazel-io fork 6.0.0
@keith Looks like there is some incompatible change in Bazel that rules_apple should adapt? (It's likely the Google version of rules_apple already did)
@meteorcloudy which change specifically? AFAIUI incompatible_enable_cc_toolchain_resolution
isn't generally supported still, so im not surprised things aren't working there
Oh I see, I missed that part. So this issue is basically under https://github.com/bazelbuild/rules_apple/issues/1765
@keith But based on the error message and the commit identified (https://github.com/bazelbuild/bazel/commit/b0487dc28eeb2ce3c0485cf0a21a5e69fbb00bc3), if we want to make --incompatible_enable_cc_toolchain_resolution
work for rules_apple, should this be fixed in Bazel or rules_apple?
I'm not super clear on every step to make that work, but I think it requires changes in both repos. My current thought is that it at least requires https://github.com/bazelbuild/bazel/pull/16619 and https://github.com/bazelbuild/rules_apple/pull/1533 but I'm not sure.
OK, in that case, I'll remove this issue as a release blocker for 6.0.
@yuriyhanysh Please let me know if you think this should still be a blocker for 6.0.
/cc @allevato as reviewer of the change.
@meteorcloudy I'm afraid I'm missing some context here to suggest if this is a blocker.
incompatible_enable_cc_toolchain_resolution
doesn't work with rules_apple,
but somehow adding the platform_mappings
file fixed this issue on the earlier 6.0.0
version. Was I just lucky with that?
In my case, the incompatible_enable_cc_toolchain_resolution
flag is needed for non-apple targets. I guess I can turn it off for now and try to work around issues that I bump into, but then the question is, when should it work properly again? End of 2023?
If b0487dc
fixes something else, I think we can remove this issue as a blocker for 6.0.
Otherwise, can we live with reverted b0487dc
until incompatible_enable_cc_toolchain_resolution
is fixed for rules_apple
? Is it correct to revert/update the b0487dc
change if my case wasn't supposed to work anyway?
incompatible_enable_cc_toolchain_resolution doesn't work with rules_apple, but somehow adding the platform_mappings file fixed this issue on the earlier 6.0.0 version. Was I just lucky with that?
I believe it's just by luck that this has worked, @keith can confirm that.
when should it work properly again? End of 2023?
I guess this really depends on when rules_apple can add proper platform-based toolchain support.
If b0487dc fixes something else, I think we can remove this issue as a blocker for 6.0.
https://github.com/bazelbuild/bazel/commit/b0487dc28eeb2ce3c0485cf0a21a5e69fbb00bc3 was needed for some google internal use cases, I don't think we can easily revert this change. I think fixing this issue will be one of the blockers for rules_appple to support --incompatible_enable_cc_toolchain_resolution
today at the very least platform_mappings are required to get anywhere with this stuff, but I guess I still don't know what is broken even once you have that.
@meteorcloudy what values are used for target_system_name
in your internal apple toolchain? I imagine that difference is the issue
I assume they're the standard x86_64-apple-darwin
, and maybe for simulator things like arm64-apple-ios-simulator
, but I've tried various values w/o things working. In some cases the library we get back from cc_common.link is actually None, which seems strange!
@nglevin is the author of https://github.com/bazelbuild/bazel/commit/b0487dc28eeb2ce3c0485cf0a21a5e69fbb00bc3, who may have more context.
I did a quick search, looks like the target_system_name
is a generated value in the form of {architecture}-apple-{platform}{version}{environment}
things have changed a lot here now, is this one fixed?
Description of the bug:
When the
incompatible_enable_cc_toolchain_resolution
flag is on, and theplatform_mappings
file is specified,apple_static_xcframework
fromrules_apple
fails in6.0.0rc1
and6.0.0rc2
.The rule is working in this configuration in version 6.0.0-pre.20220517.1 but stopped working in 6.0.0-pre.20220520.1
Error is:
ERROR: file 'stages/swift/package-arm64-apple-ios13.0-fl.a' is generated by these conflicting actions:
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Example project: https://github.com/yuriyhanysh/bazel-platform-mappings
Which operating system are you running Bazel on?
macOS Ventura 13.0.1
What is the output of
bazel info release
?release 6.0.0rc2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
rc2 full log: