Open numberokta opened 7 months ago
Thanks for the report. This should already have been fixed in commit c3fec93fd7ea16feea53d52901c3d1edf7293a70, so the upcoming 1.0.9 release should build on Termux. In the meantime, please try building the current git code and let me know if it works for you:
git clone -b 1.0 https://github.com/ksh93/ksh
cd ksh
bin/package make
bin/package use
Thanks for your replay, I tested that and it gives this error
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: libandroid_shmget
>>> referenced by /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64/dyn/lib/libast.so
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: libandroid_shmat
>>> referenced by /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64/dyn/lib/libast.so
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: libandroid_shmdt
>>> referenced by /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64/dyn/lib/libast.so
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: libandroid_shmctl
>>> referenced by /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64/dyn/lib/libast.so
cc: error: linker command failed with exit code 1 (use -v to see invocation)
mamake [cmd/builtin]: *** exit code 1 making /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64/dyn/bin/pty
mamake: *** exit code 1 making cmd/builtin
mamake: *** exit code 1 making all
package: make failed at Fri Apr 19 19:08:06 +0330 2024 in /data/data/com.termux/files/home/neuctl/build/termux/ksh/ksh/arch/android.arm64-64
Strange. I cannot reproduce that at all. :(
What Android version are you using, and what version of termux, and what version of clang, and did you set CCFLAGS
and/or LDFLAGS
, and if so, to what values?
That error happened on Termux 0.118.0+8e3a898
Now i tested with this
Android 13
Termux 0.118.0+2f40df9
env: TERMUX_APP__TARGET_SDK="28"
clang -v
Clang version 18.1.3
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
I didn't set CCFLAGS
and/or LDFLAGS
It gives me error (log file)
I think the issue is related to the target because i saw --target=armv8l-linux-android26
in log file
I'm now running an Android 13.0 arm64 VM in Android Studio and I'm finding that ksh builds and runs without a hitch. The clang version on it is 18.1.8, though. And of course I'm using a fresh installation. The only packages I installed in termux apart from the defaults are: clang, binutils, getconf, git, ncurses-utils (and their dependencies) -- that's all ksh needs to build and run.
I've looked at your log. The problem appears to be that it can't find certain essential termux libraries (crtbegin_dynamic.o, libunwind.a, crtend_android.o). I am unable to reproduce this problem. (Exporting TERMUX_APP__TARGET_SDK="28"
makes no difference.)
I'm guessing that either something is broken in your termux installation, or some other package that I've not installed is somehow interfering. But I have no way of knowing what it is. I also don't know if it makes a difference that you're building on a 32-bit ARM processor, which I cannot test here.
Would it be possible for you try building with a fresh and updated termux installation with just pkg install clang binutils getconf git ncurses-utils
and nothing else done to it?
I want to build ksh93 for termux on android but it gives me this error (compiling with clang)
See full build log here