From: Po Lu <luangruo@yahoo.com>
To: bug-gnulib@gnu.org
Subject: Android NDK r26 and utmpx
Date: Sun, 21 Jan 2024 09:46:33 +0800 [thread overview]
Message-ID: <87v87ntq4m.fsf@yahoo.com> (raw)
In-Reply-To: 87v87ntq4m.fsf.ref@yahoo.com
utmpx.h is provided by this new release of the Android NDK, defining
functions as nonfunctional as utmp.h does.
The more pressing problem is that its presence suppresses the definition
of UTMP_NAME_FUNCTION when a program is built with an __ANDROID_API__
lower than 34, where the utmpx* series of functions were introduced,
because the conditional for HAVE_UTMPX_H in readutmp.h does not search
for a `utmpname' function if `utmpxname' is unavailable, with the result
that get_android_boot_time is never invoked. Here are the relevant
portions of config.log:
configure:9462: checking for utmpx.h
configure:9462: /opt/android/ndk/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android22-clang -c -O2 -g3 -Werror=implicit-function-declaration conftest.c >&5
configure:9462: $? = 0
configure:9462: result: yes
configure:16416: /opt/android/ndk/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android22-clang -o conftest -O2 -g3 -Werror=implicit-function-declaration conftest.c >&5
ld.lld: error: undefined symbol: utmpxname
>>> referenced by conftest.c:116
>>> /tmp/conftest-c4f4cf.o:(main)
>>> did you mean: utmpname
>>> defined in: /opt/android/ndk/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
I will install a workaround in Emacs, but it ought to be fixed at the
source.
next parent reply other threads:[~2024-01-21 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87v87ntq4m.fsf.ref@yahoo.com>
2024-01-21 1:46 ` Po Lu [this message]
2024-01-21 3:04 ` Android NDK r26 and utmpx Paul Eggert
2024-01-21 3:38 ` Po Lu
2024-01-21 4:04 ` Paul Eggert
2024-01-21 5:11 ` Po Lu
2024-01-21 16:54 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v87ntq4m.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).