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

Add support for Android NDK r21 #10811

Closed
hevrard opened this issue Feb 18, 2020 · 5 comments
Closed

Add support for Android NDK r21 #10811

hevrard opened this issue Feb 18, 2020 · 5 comments
Labels
team-Android Issues for Android team untriaged

Comments

@hevrard
Copy link
Contributor

hevrard commented Feb 18, 2020

Description of the problem / feature request:

Add support for Android NDK r21, which is the latest stable NDK.
https://developer.android.com/ndk/downloads

Feature requests: what underlying problem are you trying to solve with this feature?

Among other things, this allow to use the Khronos unified Vulkan validation layer, which ships with NDK r21.

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

Try to compile any Android project with NDK r21, you get the following warning:

WARNING: The major revision of the Android NDK referenced by
android_ndk_repository rule 'androidndk' is 21. The major revisions
supported by Bazel are [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20].
Bazel will attempt to treat the NDK as if it was r20. This may cause
compilation and linkage problems. Please download a supported
NDK version.

What operating system are you running Bazel on?

Linux

What's the output of bazel info release?

release 2.0.0

Given that Android NDK r21 support is nowhere to be seen on https://blog.bazel.build/2020/02/06/bazel-2.1.html, I guess it is not supported yet.

@hevrard
Copy link
Contributor Author

hevrard commented Feb 18, 2020

For information, AGI https://github.com/google/agi compiles fine with NDK r21 and Bazel 2.0.0, so maybe there is no significant changes from r20 to r21 w.r.t. how Bazel treats the NDK.

@aiuto aiuto added team-Android Issues for Android team untriaged labels Feb 18, 2020
@hevrard
Copy link
Contributor Author

hevrard commented Apr 23, 2020

@jin thanks for your help on #10095 , what do you think is necessary to get NDK r21 in the list of the officially supported NDK versions?

For info we've been building AGI with Bazel 2.0.0 and NDK r21 for months now, without any issue.

@jin
Copy link
Member

jin commented Apr 23, 2020

It's a matter of doing something like 00e29b7, but following the NDK for Build System Maintainer's guide to make any changes for r21 if needed. If there are no changes needed, it could just be a one line change like this, where r20 reuses r19's cc toolchain configuration with a different clang version.

I personally don't have the resources to work on this now. If you'd like to take it on, I can help to review changes.

@UebelAndre
Copy link
Contributor

Any updates here?

@steeve
Copy link
Contributor

steeve commented Jul 30, 2020

I have opened a PR #11872.
I'm using r21 with Bazel 3.4.1 without issues myself, so I just added the necessary boilerplate based on @jin's comments.

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

Successfully merging a pull request may close this issue.

5 participants