bazel: `apple_static_xcframework` rule from `rules_apple` fails in 6.0.0
Description of the bug:
When the incompatible_enable_cc_toolchain_resolution
flag is on, and the platform_mappings
file is specified, apple_static_xcframework
from rules_apple
fails in 6.0.0rc1
and 6.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
returns development 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
?
git@github.com:yuriyhanysh/bazel-platform-mappings.git
4da1c4878d6a3855a318f2489d684c7ed8bbe5c3
4da1c4878d6a3855a318f2489d684c7ed8bbe5c3
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:
bazel build //...
Starting local Bazel server and connecting to it...
ERROR: file 'stages/swift/package-arm64-apple-ios13.0-fl.a' is generated by these conflicting actions:
Label: //stages/swift:package
RuleClass: apple_static_xcframework rule
JavaActionClass: class com.google.devtools.build.lib.rules.cpp.CppLinkAction
Configuration: 05b42373f2c4f39355ce7947bb50d5c61c302e23f1bd044c738732a2c3f19329
Mnemonic: CppArchive
Action key: c43aefec1ae9af2ad133068b7fe40e163a35b544d428ea26c02290a8d59f8175, e67945f8d6520bf4321a614971b1a2e22cd3bdf36fbb97161c1b55844a6fc891
Progress message: Linking stages/swift/package-arm64-apple-ios13.0-fl.a
Action describeKey: Linking stages/swift/package-arm64-apple-ios13.0-fl.a
Command: external/local_config_cc/libtool
Argument: external/local_config_cc/libtool
Argument: -D
Argument: -no_warning_for_no_symbols
Argument: -static
Argument: -arch_only
Argument: arm64
Argument: -syslibroot
Argument: __BAZEL_XCODE_SDKROOT__
Argument: -o
Argument: bazel-out/darwin_arm64-fastbuild/bin/stages/swift/package-arm64-apple-ios13.0-fl.a
Argument: bazel-out/ios-sim_arm64-min13.0-applebin_ios-ios_sim_arm64-fastbuild-ST-fe30e415f334/bin/stages/swift/liblib.a
, Linking stages/swift/package-arm64-apple-ios13.0-fl.a
Command: external/local_config_cc/libtool
Argument: external/local_config_cc/libtool
Argument: -D
Argument: -no_warning_for_no_symbols
Argument: -static
Argument: -arch_only
Argument: arm64
Argument: -syslibroot
Argument: __BAZEL_XCODE_SDKROOT__
Argument: -o
Argument: bazel-out/darwin_arm64-fastbuild/bin/stages/swift/package-arm64-apple-ios13.0-fl.a
Argument: bazel-out/ios-arm64-min13.0-applebin_ios-ios_arm64-fastbuild-ST-30c5b20ba4c1/bin/stages/swift/liblib.a
PrimaryInput: File:[/private/var/tmp/_bazel_yuriy.hanysh/76bb78a5b3c5ed5d097cb950d8b80ea6/external/local_config_cc[source]]cc_wrapper.sh
PrimaryOutput: File:[[<execution_root>]bazel-out/darwin_arm64-fastbuild/bin]stages/swift/package-arm64-apple-ios13.0-fl.a
Owner information: ConfiguredTargetKey{label=//stages/swift:package, config=BuildConfigurationKey[05b42373f2c4f39355ce7947bb50d5c61c302e23f1bd044c738732a2c3f19329]}
MandatoryInputs: Attempted action contains artifacts not in previous action (first 5):
stages/swift/liblib.a
Previous action contains artifacts not in attempted action (first 5):
stages/swift/liblib.a
Outputs: are equal
ERROR: /Users/yuriy.hanysh/Documents/bazel-platform-mappings/stages/swift/BUILD.bazel:13:25: for stages/swift/package-arm64-apple-ios13.0-fl.a, previous action: action 'Linking stages/swift/package-arm64-apple-ios13.0-fl.a', attempted action: action 'Linking stages/swift/package-arm64-apple-ios13.0-fl.a'
ERROR: Analysis of target '//stages/swift:package' failed; build aborted:
INFO: Elapsed time: 4.405s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (67 packages loaded, 1542 targets configured)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (15 by maintainers)
@bazel-io fork 6.0.0
@bazel-io flag