When using NDK r25c,bug 1689358's workaround doesn't work. https://firefoxci.taskcluster-artifacts.net/C8Mnv8ShTzm7uM-vL0cgRA/0/public/logs/live_backing.log (job is https://treeherder.mozilla.org/jobs?repo=try&revision=56e62b847a0c8970b17d4ee4e8cb49eb38140840) ``` [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/workspace/obj-build/aarch64-linux-android/debug/libgkrust.a(nix-397cbe82fe0a1711.nix.924e27781fc6b553-cgu.0.rcgu.o): in function `nix::unistd::Group::from_gid::{{closure}}': [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3285: undefined reference to `getgrgid_r' [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3285: undefined reference to `getgrgid_r' [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/workspace/obj-build/aarch64-linux-android/debug/libgkrust.a(nix-397cbe82fe0a1711.nix.924e27781fc6b553-cgu.0.rcgu.o): in function `nix::unistd::Group::from_name::{{closure}}': [task 2023-08-07T02:52:50.258Z] 02:52:50 INFO - /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3310: undefined reference to `getgrnam_r' [task 2023-08-07T02:52:50.258Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3310: undefined reference to `getgrnam_r' [task 2023-08-07T02:52:50.258Z] 02:52:50 ERROR - clang-16: error: linker command failed with exit code 1 (use -v to see invocation) [task 2023-08-07T02:52:50.258Z] 02:52:50 ERROR - gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:526: libxul.so] Error 1 ``` Even if NDK r25c, if `__ANDROID_API__` isn't 24+, getgrnam_r etc isn't defined in android library. So I guess that we should use __ANDROID_API__ instead of `ANDROID_NDK_MAJOR_VERSION`.
Bug 1847468 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
When using NDK r25c,bug 1689358's workaround doesn't work. https://firefoxci.taskcluster-artifacts.net/C8Mnv8ShTzm7uM-vL0cgRA/0/public/logs/live_backing.log (job is https://treeherder.mozilla.org/jobs?repo=try&revision=56e62b847a0c8970b17d4ee4e8cb49eb38140840) ``` [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/workspace/obj-build/aarch64-linux-android/debug/libgkrust.a(nix-397cbe82fe0a1711.nix.924e27781fc6b553-cgu.0.rcgu.o): in function `nix::unistd::Group::from_gid::{{closure}}': [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3285: undefined reference to `getgrgid_r' [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3285: undefined reference to `getgrgid_r' [task 2023-08-07T02:52:50.257Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/workspace/obj-build/aarch64-linux-android/debug/libgkrust.a(nix-397cbe82fe0a1711.nix.924e27781fc6b553-cgu.0.rcgu.o): in function `nix::unistd::Group::from_name::{{closure}}': [task 2023-08-07T02:52:50.258Z] 02:52:50 INFO - /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3310: undefined reference to `getgrnam_r' [task 2023-08-07T02:52:50.258Z] 02:52:50 INFO - /builds/worker/fetches/binutils/bin/ld.bfd: /builds/worker/checkouts/gecko/third_party/rust/nix/src/unistd.rs:3310: undefined reference to `getgrnam_r' [task 2023-08-07T02:52:50.258Z] 02:52:50 ERROR - clang-16: error: linker command failed with exit code 1 (use -v to see invocation) [task 2023-08-07T02:52:50.258Z] 02:52:50 ERROR - gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:526: libxul.so] Error 1 ``` Even if NDK r25c, if `__ANDROID_API__` isn't 24+, getgrnam_r etc isn't defined in android library. So I guess that we should use `__ANDROID_API__` instead of `ANDROID_NDK_MAJOR_VERSION`.