leleliu008 / ndk-pkg-formula-repository-official-core

the formula repository for ndk-pkg
Apache License 2.0
13 stars 6 forks source link

[arm64-v8a][Bash] fails to link. #3

Closed ghost closed 2 years ago

ghost commented 2 years ago
aarch64-linux-android21-clang -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde  -L./lib/sh  -L/home/kubast2/.ndk-pkg/install.d/readline/arm64-v8a/lib -L/home/kubast2/.ndk-pkg/install.d/ncurses/arm64-v8a/lib --sysroot /home/kubast2/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot -L/home/kubast2/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21 -rdynamic --sysroot /home/kubast2/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Qunused-arguments -Os -fpic -Wno-parentheses -Wno-format-security  -static -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o signames.o -lbuiltins -lglob -lsh -lreadline -lhistory -lncurses -ltilde     
ld: error: duplicate symbol: strchrnul
>>> defined at strchrnul.c
>>>            strchrnul.o:(strchrnul) in archive ./lib/sh/libsh.a
>>> defined at static_function_dispatch.S:39 (bionic/libc/arch-arm64/static_function_dispatch.S:39)
>>>            static_function_dispatch.o:(.text+0x30) in archive /home/kubast2/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/libc.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:582: bash] Error 1
make: Leaving directory '/tmp/tmp.J19dvf7b3q/1634035574/arm64-v8a'
[✘] install bash/arm64-v8a failed! you can go to /tmp/tmp.J19dvf7b3q to see see.
leleliu008 commented 2 years ago

please don't use Android NDK r22, r21 and r23 both work well.

ghost commented 2 years ago

r21 works r23 doesn't work

leleliu008 commented 2 years ago

https://github.com/android/ndk/issues/1409