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

Endeavouring to install so in Termux with cargo without success #49

Open
b9Joker108 opened this issue Oct 15, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@b9Joker108
Copy link

b9Joker108 commented Oct 15, 2024

Describe the bug
I have endeavoured to install so in Termux with cargo, without success.

To Reproduce
Steps to reproduce the behavior:

  1. cargo install so
  2. I checked appropriate environment variables are set:
echo $JAVA_HOME
echo $PATH
/data/data/com.termux/files/usr/opt/openjdk-17
/data/data/com.termux/files/home/.local/bin:/data/data/com.termux/files/home/.local/share/basalt/source/pkg/bin:/data/data/com.termux/files/usr/share/texlive/bin/aarch64-linux:/data/data/com.termux/files/home/.local/bin/1password_cli_v2:/data/data/com.termux/files/home/.zi/polaris/sbin:/data/data/com.termux/files/home/.zi/polaris/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/texlive:/data/data/com.termux/files/home/.cargo/bin:/data/data/com.termux/files/home/markdown.index:/data/data/com.termux/files/home/.dotfiles/scripts/sh.scripts:/data/data/com.termux/files/home/bin:/data/data/com.termux/files/home/browsh/:/data/data/com.termux/files/home/install/bin:/data/data/com.termux/files/usr/opt/openjdk-17/bin

I got the following error output:

...
Compiling enum-map-derive v0.17.0
   Compiling darling v0.13.4
   Compiling jni v0.19.0
error[E0425]: cannot find value `EXPECTED_JVM_FILENAME` in this scope
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jni-0.19.0/build.rs:102:25
    |
102 |         if file_name == EXPECTED_JVM_FILENAME {
    |                         ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `jni` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `so v0.4.9`, intermediate artifacts can be found at `/data/data/com.termux/files/usr/tmp/cargo-install`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Environment

❯ termux-info
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=12648
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.nyist.edu.cn/termux/apt/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
# sources.list.d/ivam3-termux-packages.list
deb [trusted=yes arch=all] https://ivam3.github.io/termux-packages stable extras
# x11-repo (sources.list.d/x11.list)
deb https://mirror.nyist.edu.cn/termux/apt/termux-x11 x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# root-repo (sources.list.d/root.list)
deb https://mirror.nyist.edu.cn/termux/apt/termux-root root stable
# sources.list.d/rendiix.list
deb https://rendiix.github.io android-tools termux
Updatable packages:
All packages up to date
termux-tools version:
1.43.6
Android version:
14
Kernel build information:
Linux localhost 5.15.123-android13-8-28577532-abX910XXS4BXG5 #1 SMP PREEMPT Thu Jul 11 02:48:07 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-X910
LD Variables:
LD_LIBRARY_PATH=:/data/data/com.termux/files/home/install/lib:/data/data/com.termux/files/home/install/lib:/data/data/com.termux/files/home/install/lib:/data/data/com.termux/files/home/install/lib:/data/data/com.termux/files/home/install/lib:/data/data/com.termux/files/home/install/lib
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
com.termux.x11 versionCode:14
com.termux.api versionCode:51
com.termux.window versionCode:15
com.termux.styling versionCode:1000

Any assistance progressing and resolving issue, greatly appreciated.

@b9Joker108 b9Joker108 added the bug Something isn't working label Oct 15, 2024
@samtay
Copy link
Owner

samtay commented Oct 16, 2024

I have never built this on Android, but I imagine this is an issue with your environment. You'd probably have better luck opening an issue with the jni crate, or perhaps the webbrowser crate that is pulling it in.

If you'd like, I can feature gate the webbrowser dependency which is only used for opening a browser and navigating to the specific question/answer on stackexchange. Then you could e.g. cargo install so --no-default-features --features termion-backend and just not have the browser functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants