Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to run Deno on Termux from Play Store #257

Open
sigmaxipi opened this issue Dec 25, 2024 · 0 comments
Open

[Bug]: Unable to run Deno on Termux from Play Store #257

sigmaxipi opened this issue Dec 25, 2024 · 0 comments

Comments

@sigmaxipi
Copy link

Problem description

See denoland/deno#19759 for general background on running Deno on termux. Specifically the comments in May that discuss how to patchelf Deno to run. The instructions work on termux-app_v0.119.0-beta.1+apt-android-7-github-debug_arm64-v8a.apk from GitHub but not googleplay.2024.10.30 on a Pixel 9 Pro with Android 15/AP4A.241025.013.C1

What steps will reproduce the bug?

The minimal repro is to run denoland/deno#19759 (comment) to install Deno and Bun. This fails with error: "/data/data/com.termux/files/home/.deno/bin/deno.orig": executable's TLS segment is underaligned: alignment is 16 (skew 0), needs to be at least 64 for ARM64 Bionic

The core steps to install and patch deno are:

curl -fsSL https://deno.land/install.sh | sh
cd .deno/bin
ldd deno  
pkg install ldd patchelf
patchelf --set-rpath /data/data/com.termux/files/usr/glibc/lib --set-interpreter /data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1 deno
pkg install glibc-repo -y
pkg install glibc
ldd deno

If done properly, that last ldd command should show something like

        libdl.so.2 => /data/data/com.termux/files/usr/glibc/lib/libdl.so.2
        libgcc_s.so.1 => /data/data/com.termux/files/usr/glibc/lib/libgcc_s.so.1
        libpthread.so.0 => /data/data/com.termux/files/usr/glibc/lib/libpthread.so.0
        libm.so.6 => /data/data/com.termux/files/usr/glibc/lib/libm.so.6
        libc.so.6 => /data/data/com.termux/files/usr/glibc/lib/libc.so.6
        ld-linux-aarch64.so.1 => /data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1

At this point, on the GitHub Termux, unset LD_PRELOAD; ./deno --version should run. But on the Play Store termux. it gives the same error about.

What is the expected behavior?

After installation and patching, unset LD_PRELOAD; ./deno --version should run.

System information

Termux Variables:
TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=googleplay.2024.10.30
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.net stable main
Updatable packages:
command-not-found/stable 2.4.0-55 aarch64 [upgradable from: 2.4.0-48]
curl/stable 8.11.1 aarch64 [upgradable from: 8.10.1-2]
debianutils/stable 5.21 aarch64 [upgradable from: 5.20]
inetutils/stable 2.5 aarch64 [upgradable from: 2.4-2]
less/stable 668 aarch64 [upgradable from: 661]
libc++/stable 27c aarch64 [upgradable from: 27b]
libcurl/stable 8.11.1 aarch64 [upgradable from: 8.10.1-2]
libnghttp3/stable 1.7.0 aarch64 [upgradable from: 1.6.0]
libsmartcols/stable 2.40.2-2 aarch64 [upgradable from: 2.40.2-1]
nano/stable 8.3 aarch64 [upgradable from: 8.2]
util-linux/stable 2.40.2-2 aarch64 [upgradable from: 2.40.2-1]
termux-tools version:
3.0.8
Android version:
15
Kernel build information:
Linux localhost 6.1.84-android14-11-g5c500deec3a7-ab12418271 #1 SMP PREEMPT Thu Sep 26 10:25:24 UTC 2024 aarch64 Android
Device manufacturer:
Google
Device model:
Pixel 9 Pro
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant