-
Notifications
You must be signed in to change notification settings - Fork 140
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
Prebuilt Binaries for Android Termux (aarch64) #145
Comments
@ayoubelmhamdi this should be possible. I've got the binary building in my branch here. Can you please tell me what the output of I'll need this to update the platform detection logic so the new binary can be downloaded automatically. |
:lua print(jit.os)
:lua print(jit.arch)
|
Okay, slight change of approach will be required. Some more testing is needed (sorry, I don't have an android device I can personally test on). Can you send the outputs of the following:
|
Never mind, I am your Android device tester. Don't be shy, ask me anything. :lua print(vim.fn.has('android') == 1)
:lua print(vim.inspect(vim.uv.os_uname())) {
machine = "aarch64",
release = "4.14.186-perf-g15987c3eee85",
sysname = "Linux",
version = "#1 SMP PREEMPT Thu Jul 18 08:05:25 UTC 2024"
} |
Thanks @ayoubelmhamdi! Looks like we can safely use I've pushed another release to my branch so we can test versioned binaries without affecting {
"scottmckendry/blink.cmp",
lazy = false,
version = "1.*",
opts = {},
} Important Make sure you check the repo name and version. These need to be set exactly as above to test the new binary correctly. If you've already got the main branch installed via Lazy, you'll need to remove it and add it again to fix the error when changing Let me know how it goes! If you encounter any errors, please post them here. |
it's seem that everything install correctly, however the first keystroke give me this error:
|
$ ldd target/release/libblink_cmp_fuzzy.so
libdl.so => /system/lib64/libdl.so
libc.so => /system/lib64/libc.so
ld-android.so => /system/lib64/ld-android.so |
Possibly a missing build flag. I've updated the cargo config to match the Linux settings and pushed another release, any difference? You might need to re-install it again. The output of |
Currently waiting on the outcome of mlua-rs/mlua#471 |
Linking the libluajit.so of termux may solve the problem, and I test ok on termux environment. I copy the libluajit.so from my termux environment and link it in the config.toml:
|
Thanks @leisiji! I think we're on the right track here. |
Using Termux with Alpine on Android I got these errors:
:lua print(vim.fn.has('android') == 1)
:lua print(vim.inspect(vim.uv.os_uname()))
|
For me it reports dlopen failed: cannot locate symbol
"lua_getallocf" referenced by "/data/data/co
m.termux/files/home/.local/share/nvim/lazy/b
link.cmp/target/release/libblink_cmp_fuzzy.s
o"... Btw I just built it on my phone without error by setting |
It seems that locally compiling it is working for me now, with [target.aarch64-linux-android]
rustflags = ["-C", "link-args=-lluajit"] and
Will do more testing tomorrow. Edit: if you are using lazy.nvim try adding build = "RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-C link-args=-lluajit\" cargo build --release" to your plugin spec. This should build the usable library without needing to patch it. |
New findings: this dlopen error is not happening if I
|
So according to the issue above, the root of this problem is a misbehavior in the Android linker, and known ways to work around this issue are:
I'd wait a bit for the Termux side to get to a conclusion. Would be glad if I can get rid of the platform specific |
Thanks to the effort in termux/termux-packages#22343, using a "normal" module without extra linking or user-side workarounds is now possible. After updating Neovim on Termux to @scottmckendry I think the work on providing prebuilt binaries for Android can be continued and Android-specific rustflags can now be removed. |
Great stuff @s-cerevisiae! Thanks for keeping this ticking along. I'll update my branch and do some more testing. Hopefully we'll have something to merge very soon 🙂 |
Prebuilt Binaries for Android Termux (aarch64)
Currently, prebuilt binaries for
blink.cmp
are not available forAndroid Termux on aarch64
architecture. This forces users on this platform to build from source, which requires the nightly Rust toolchain.Issues with Building from Source:
Installing the nightly Rust toolchain on Termux can be challenging and error-prone. Users frequently encounter issues related to dependencies and build tools.
Feature Request: Provide prebuilt binaries for Android Termux (aarch64) to eliminate the need for a nightly Rust toolchain and simplify installation and usage for users on this platform. This will significantly improve accessibility for Termux users and expand the plugin's user base.
The text was updated successfully, but these errors were encountered: