-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Error No matching toolchains found for types @@bazel_tools//tools/jdk:runtime_toolchain_type. #400
Comments
…stream (#406) Due to #400 CC Greenteam @meteorcloudy
I'll take a look today |
There are two problems, lack of a CC toolchain and lack of a runtime Java toolchain
I can create a PR to fix these issues. I'm not sure when the requirement for a runtime Java toolchain was added, and I'm not sure where that should even come from. (pinging @ahumesky for advice). |
v0.1.1 of rules_android is just thin wrappers around the native android rules, so it's possible that something elsewhere within bazel changed to require this -- This is where we get the java toolchains in the starlark rules: |
Okay, debugged a bit further: rules_java adds runtime toolchains for various processors, including The JDK toolchain (not runtime) is fine, because it doesn't define any target constraints (cpu or os) (see https://github.com/bazelbuild/rules_java/blob/9cd25f0f7edc5184c4f1a10c4772ac4127f7322e/toolchains/default_java_toolchain.bzl#L181). @ahumesky: Does the Android SDK contain a JDK for the different Android cpu flavors (in which case we just need to add the relevant |
I'm not sure that's what we want? There aren't JDKs for Android cpu flavors. I wonder if that what we want here is to be able to run things like robolectric tests, which exercise code built targeting a particular Android flavour on a JVM. The approach we take for that in google3 is:
|
That's a great question: all I know is "bazel thinks it wants a runtime JDK that targets android_aarch64", I haven't dug into why it wants that. |
CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3599#018d1aba-719c-4797-b00a-1d83dfafff2b
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3608#018d2ef4-1d2c-446b-a314-c133272f58d9
Platform: Ubuntu
Logs:
Culprit: bazelbuild/bazel@03490b9, bazelbuild/bazel@8ba6618
Steps:
CC Greenteam @meteorcloudy
The text was updated successfully, but these errors were encountered: