[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] Build broken with the latest preview of Android NDK and c

From: Chi-Hsuan Yen
Subject: [Bug-readline] Build broken with the latest preview of Android NDK and clang (r15 beta 2)
Date: Tue, 6 Jun 2017 22:13:04 +0800

Hello readline experts,

I maintain a set of packages on Android. A recent change in Android's
NDK (Native Development Kit) breaks building readline. Here are steps
to reproduce:

and extract to ~/tmp/)
$ export ANDROID_NDK="$HOME/tmp/android-ndk-r15-beta2"
$ "$ANDROID_NDK/build/tools/make_standalone_toolchain.py"
--install-dir toolchain --api 21 --arch arm64 --unified-headers
(git clone readline.git and cd into it)
$ export PATH="$(pwd)/toolchain/bin:$PATH"
$ CC="$(pwd)/toolchain/bin/aarch64-linux-android-clang"
CROSS_COMPILE=aarch64-linux-android- ./configure
$ make

It fails with:

-c -DHAVE_CONFIG_H   -I. -I.  -DRL_LIBRARY_VERSION='"7.0"' -g -O
In file included from search.c:46:
./histlib.h:55:14: error: redeclaration of 'strchr' must have the
'overloadable' attribute
extern char *strchr ();
note: previous overload of function is here
char* strchr(const char* _Nonnull, int) __attribute_pure__ __overloadable
1 error generated.
make: *** [search.o] Error 1

As a workaround, I just remove the "#ifndef strchr" block from histlib.h.


Yen Chi Hsuan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]