Skip to content
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

CC toolchain error occurs when building on linux with targets that are only compatible with MacOS #281

Closed
cgrindel opened this issue Oct 25, 2023 · 1 comment

Comments

@cgrindel
Copy link
Contributor

Reproduction

The following error occurs on linux if a target is marked as only being compatible with MacOS and the targets that depend on that target are not marked as such.

ERROR: /home/chuck/.cache/bazel/_bazel_chuck/1356082df8f6e9e7706552f3fc65582d/external/bazel_tools/tools/cpp/BUILD:58:19: in cc_toolchain_alias rule @bazel_tools//tools/cpp:current_cc_toolchain: 
Traceback (most recent call last):
        File "/virtual_builtins_bzl/common/cc/cc_toolchain_alias.bzl", line 26, column 48, in _impl
        File "/virtual_builtins_bzl/common/cc/cc_helper.bzl", line 219, column 17, in _find_cpp_toolchain
Error in fail: Unable to find a CC toolchain using toolchain resolution. Target: @@bazel_tools//tools/cpp:current_cc_toolchain, Platform: @@apple_support~1.11.1//platforms:darwin_x86_64, Exec platform: @@loca
l_config_platform//:host
ERROR: /home/chuck/.cache/bazel/_bazel_chuck/1356082df8f6e9e7706552f3fc65582d/external/bazel_tools/tools/cpp/BUILD:58:19: Analysis of target '@bazel_tools//tools/cpp:current_cc_toolchain' failed
ERROR: Analysis of target '//Sources/PrintObjcVersion:PrintObjcVersion' failed; build aborted: Analysis failed
@keith
Copy link
Member

keith commented Oct 25, 2023

fixed with --incompatible_disable_objc_library_transition, so I guess it has something to do with that transition. that is flipped @ head

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants