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

Failed to detect cc toolchain when cross-compiling from darwin_x86_64 to darwin_arm64 with --platforms #12655

Closed
thii opened this issue Dec 7, 2020 · 10 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug

Comments

@thii
Copy link
Member

thii commented Dec 7, 2020

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  • Add this new target to the root BUILD file.
platform(
    name="darwin_arm64",
    constraint_values= [
        "@platforms//os:macos",
        "@platforms//cpu:arm64",
    ],
    visibility = ["//visibility:public"],
)
  • Build with:
$ USE_BAZEL_VERSION=last_green bazelisk build --cpu=darwin_arm64 --platforms=//:darwin_arm64 //src:bazel                                

What operating system are you running Bazel on?

macOS 11.0.1 (Intel cpu)

What's the output of bazel info release?

2020/12/08 06:35:42 Using unreleased version at commit a1b19dfa09abe6d7d3b62f2253e4bfa718aec089
INFO: Invocation ID: 102faae3-4a02-497c-a296-94f262246490
development version

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

I use Bazelisk.

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

https://github.com/bazelbuild/bazel.git
f8f66f36ad299a0ea019c94100d5a8e2018f5ab5
f8f66f36ad299a0ea019c94100d5a8e2018f5ab5

Any other information, logs, or outputs that you want to share?

2020/12/08 06:34:15 Using unreleased version at commit a1b19dfa09abe6d7d3b62f2253e4bfa718aec089
2020/12/08 06:34:15 Downloading https://storage.googleapis.com/bazel-builds/artifacts/macos/a1b19dfa09abe6d7d3b62f2253e4bfa718aec089/bazel...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 57f11e01-ca6d-451e-b5ba-5f55d36295ab
DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:59:14:
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '3.1.0'
DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:103:14: rbe_ubuntu1804_java11 not using checked in configs as detect_java_home was set to True
DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:59:14:
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '3.1.0'
DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:103:14: rbe_ubuntu1604_java8 not using checked in configs as detect_java_home was set to True
ERROR: While resolving toolchains for target //src/main/cpp:client: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
ERROR: Analysis of target '//src:bazel' failed; build aborted: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
INFO: Elapsed time: 12.898s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (101 packages loaded, 741 targets configured)
@katre katre self-assigned this Dec 7, 2020
@katre katre added team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug P2 We'll consider working on this in future. (Assignee optional) labels Dec 7, 2020
@katre
Copy link
Member

katre commented Dec 7, 2020

There's a dummy cc toolchain that should have been picked up and been unused (since --incompatible_cc_enable_toolchain_resolution is not set).

Need to debug and figure out why.

@katre
Copy link
Member

katre commented Dec 8, 2020

Apparently the dummy toolchainwas successfully removed, which means there's nothing left to be resolved. Are you compiling on a Mac (with xcode tools)? We should be able to configure those to handle an arm64/darwin build.

@thii
Copy link
Member Author

thii commented Dec 8, 2020

I'm compiling on a Mac with the latest stable Xcode and command line tools. Is there anything I'm missing?

@katre
Copy link
Member

katre commented Dec 8, 2020

No, we need to update the mac autoconfig (in https://cs.opensource.google/bazel/bazel/+/master:tools/cpp/osx_cc_configure.bzl and https://cs.opensource.google/bazel/bazel/+/master:tools/osx/crosstool/BUILD.tpl) needs to also write a cc_toolchain and toolchain for macos/arm64. I'm kind of surprised that even without the constraint issue you flagged, the build succeeds because I don't see any legacy cc toolchains for that setup.

@thii
Copy link
Member Author

thii commented Dec 9, 2020

Do you know what needs to be updated? It looks like darwin_arm64 is already listed.

OSX_TOOLS_NON_DEVICE_ARCHS = [
"darwin_x86_64",
"darwin_arm64",
"darwin_arm64e",

OSX_TOOLS_ARCHS = [
"armeabi-v7a",
"ios_armv7",
"ios_arm64",
"ios_arm64e",
"watchos_armv7k",
"watchos_arm64_32",
"tvos_arm64",
] + OSX_TOOLS_NON_DEVICE_ARCHS

CC_TOOLCHAINS = [(
cpu + "|compiler",
":cc-compiler-" + cpu,
) for cpu in OSX_TOOLS_ARCHS] + [(
cpu,
":cc-compiler-" + cpu,
) for cpu in OSX_TOOLS_ARCHS] + [
("k8|compiler", ":cc-compiler-darwin_x86_64"),
("darwin|compiler", ":cc-compiler-darwin_x86_64"),
("k8", ":cc-compiler-darwin_x86_64"),
("darwin", ":cc-compiler-darwin_x86_64"),
]

@katre
Copy link
Member

katre commented Dec 9, 2020

You're right, they do exist. I don't have a mac to test with, can you run the following command and report back the output?

bazel query --output=build  @local_config_cc_toolchains//:all

This will list all toolchains that are being registered.

@thii
Copy link
Member Author

thii commented Dec 9, 2020

DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:103:14: rbe_ubuntu1804_java11 not using checked in configs as detect_java_home was set to True
DEBUG: /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:103:14: rbe_ubuntu1604_java8 not using checked in configs as detect_java_home was set to True
# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_x86_64",
)
# Rule cc-toolchain-watchos_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_x86_64",
)
# Rule cc-toolchain-watchos_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_i386-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_i386",
)
# Rule cc-toolchain-watchos_i386-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_i386-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_i386",
)
# Rule cc-toolchain-watchos_i386-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_armv7k-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_armv7k",
)
# Rule cc-toolchain-watchos_armv7k-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_armv7k-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_armv7k",
)
# Rule cc-toolchain-watchos_armv7k-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_arm64_32-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_arm64_32",
)
# Rule cc-toolchain-watchos_arm64_32-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_arm64_32-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_arm64_32",
)
# Rule cc-toolchain-watchos_arm64_32-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_x86_64",
)
# Rule cc-toolchain-tvos_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_x86_64",
)
# Rule cc-toolchain-tvos_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_arm64",
)
# Rule cc-toolchain-tvos_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_arm64",
)
# Rule cc-toolchain-tvos_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_x86_64",
)
# Rule cc-toolchain-ios_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_x86_64",
)
# Rule cc-toolchain-ios_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_i386-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-ios_i386",
)
# Rule cc-toolchain-ios_i386-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_i386-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-ios_i386",
)
# Rule cc-toolchain-ios_i386-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_armv7-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-ios_armv7",
)
# Rule cc-toolchain-ios_armv7-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_armv7-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-ios_armv7",
)
# Rule cc-toolchain-ios_armv7-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64e-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64e",
)
# Rule cc-toolchain-ios_arm64e-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64e-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64e",
)
# Rule cc-toolchain-ios_arm64e-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64",
)
# Rule cc-toolchain-ios_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64",
)
# Rule cc-toolchain-ios_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_x86_64",
)
# Rule cc-toolchain-darwin_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_x86_64",
)
# Rule cc-toolchain-darwin_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64e-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64e",
)
# Rule cc-toolchain-darwin_arm64e-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64e-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64e",
)
# Rule cc-toolchain-darwin_arm64e-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64",
)
# Rule cc-toolchain-darwin_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64",
)
# Rule cc-toolchain-darwin_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-armeabi-v7a-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
)
# Rule cc-toolchain-armeabi-v7a-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-armeabi-v7a-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
)
# Rule cc-toolchain-armeabi-v7a-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_admin/058bf0aeee6f9b65e93a9de41f4a4c2c/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

@katre
Copy link
Member

katre commented Dec 10, 2020

I see you noticed the problem, because you opened bazelbuild/platforms#22 .

For future readers: the issue is that the Mac autodetection is using aarch64 for the darwin exec constraint in the toolchains, but @thii is using amd64.

@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 20, 2023
@github-actions
Copy link

github-actions bot commented May 5, 2023

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug
Projects
None yet
Development

No branches or pull requests

2 participants