-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Not up-to-date with latest Android NDK #632
Comments
Thanks for the report! We take PRs at any point to add new constants and such and you can also just update the associated |
I'm working on adding these constants but I face a problem I prefer to ask you how to handle. Before ndk r14b, it seems some headers were not correctly updated (changelog - Headers in M and N were actually headers for L) so even if in r13b (the rev the test suite is using) there are headers for api-24, they were actually for api-21 (lollipop). Since r14b, they unified headers with one headers set for all the platforms with some Therefore, I wonder how we should implement constants or functions that have different signature based on the API level. For example, the
Do we always use the most recent definitions and discard older ones ? |
@ndusart your issue reminds me of #570 However, I checked with Eventually, I guess this could be implemented with https://internals.rust-lang.org/t/pre-rfc-target-extension-dealing-with-breaking-changes-at-os-level/5289/15 (hopefully android sets target_os_version to whatever API level). |
BTW @ndusart ndk r15b is out now :) You may want to use this. |
The thing with Until we have a way to use target_os_version I think we should match the latest source. |
@ndusart Both You can check this by running |
@ndusart I'd stick to the old symbol for |
I totally agree but I'd like to know how I can use the old definition while the generated test will expect the new one ? If I use the old one, CI fail because @alexcrichton, is it ok to modify the C header in the script that installs the android toolchain for the test to pass for this ? |
Update NDK to r15b and add some missing symbols Use the new unified headers of the NDK and add some missing symbols for Android. Fixes #632
When trying to build the nix crate for target arm-linux-androideabi (nix-rust/nix#313), it fails with some undefined symbols that are present in the latest Android NDK headers (some seem to be added in Android API 21).
Since nearly all the symbols are merged in the android/mod.rs, and I didn't figured out how they are organised, I find it hard to list exhaustively the missing symbols.
So I just list the ones that are needed for the nix crate with a link to the corresponding header in the current ndk:
O_DSYNC
(asm-generic/fcntl.h)openpty
(pty.h) (forkpty is missing too)CLONE_NEWCGROUP
(linux/sched.h)EPOLLRDHUP
andEPOLLWAKEUP
(sys/epoll.h)sethostname
,setresuid
andsetresgid
(unistd.h)I could make a PR for these symbols but I think that we should make a full update to match the latest ndk and I do not feel comfortable enough to figure out what should be done and how it should be organised in this crate.
The text was updated successfully, but these errors were encountered: