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

NDK r24 support #46

Closed
mchinen opened this issue May 16, 2022 · 5 comments
Closed

NDK r24 support #46

mchinen opened this issue May 16, 2022 · 5 comments

Comments

@mchinen
Copy link

mchinen commented May 16, 2022

r24 isn't supported in master due to the toolchain path changes after r21. On the 'pre-alpha' branch, this warning and error appears when using r24 NDK (and I suppose r22 and r23). Is there a workaround for supporting r24 in bazel? If not, is it reasonable to use SDK 30 with r21?

WARNING: The major revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' is 24. The major revisions supported by Bazel are [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]. Bazel will attempt to treat the NDK as if it was r21. This may cause compilation and linkage problems. Please download a supported NDK version. ERROR: /usr/local/google/home/mchinen/scm/lyra/android_example/BUILD:26:16: While resolving toolchains for target //android_example:lyra_android_lib: no matching toolchains found for types @rules_android//toolchains/android:toolchain_type, @rules_android//toolchains/android_sdk:toolchain_type ERROR: /usr/local/google/home/mchinen/scm/lyra/android_example/BUILD:46:15: While resolving toolchains for target //android_example:lyra_android_example_RESOURCES_DO_NOT_USE: no matching toolchains found for types @rules_android//toolchains/android:toolchain_type

@keith
Copy link
Member

keith commented May 16, 2022

Most of the discussion about this is here: bazelbuild/bazel#12889

we're using ndk 21 in the meantime and it works fine as long as you don't need any newer features / improvements from newer NDKs

@cpsauer
Copy link

cpsauer commented May 16, 2022

@keith with his usual set of blazingly fast, great cross-refs :)
@mchinen Would you be down to close this one and centralize around bazelbuild/bazel#12889, esp since the code for this is still in Bazel core?

@mchinen
Copy link
Author

mchinen commented May 17, 2022

@keith thank you for the info!
@cpsauer sure, if you prefer that, feel free to close. I will make a weak case for leaving it open while following the bazel core issue: it will help with visibility since bazel core issues are so numerous that it is not easy to view/search and others might come to this repo for android build rule failures.

@cpsauer
Copy link

cpsauer commented May 17, 2022

Up to you guys! (I don't have magic closing power.)
[If someone reading this knows the Bazel philosophy around when issues should be centralized vs federated, I'd be curious to hear.]

@ahumesky
Copy link
Collaborator

NDK support is being moved to github.com/bazelbuild/rules_android_ndk, and there's a development preview that should work for NDK 25. As mentioned above, the discussion is on bazelbuild/bazel#12889

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

4 participants