-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
dlopen failed: cannot locate symbol "lua_pushboolean" - aarch64-linux-android target #471
Comments
Could you tell how you load the module and can you load any other Lua C libraries? |
It's loading through Neovim using LuaJIT, I believe. Output of Not sure about loading other libs. I've not worked with C, so my knowledge is quite lacking in this area. Is there a common lib I can test with that will give us some more information? |
Not sure if this is relevant at all, but loading local ffi = require("ffi")
ffi.cdef([[
double sin(double x);
]])
local mathlib = ffi.load("m")
local angle = 1
print("sin(", angle, ") = ", mathlib.sin(angle)) |
Tested with blink.cmp and a minimal module I just wrote, this seems to only happen when the module is |
Loading libraries through Could you try to load Lua cjson module? Likely the root cause is that neovim was built without exporting Lua symbols. |
My understanding is this is due to a peculiarity of the Android linker/loader (
pipcet@0a590d0 is a potential fix, and allows dlopen("/path/to/lua/library.so") to succeed, at least on my phone. I assume there are good reasons to avoid the |
This is right. The same native Lua module targeted to (for example) 5.1 should be loadable by Lua 5.1.0, ..., 5.1.5, JIT. |
If you want to link module with LuaJIT, you can pass linker args:
[target.aarch64-linux-android]
rustflags = ["-C", "link-args=-lluajit"] OR compile with:
|
Thanks for explaining! Shipping libraries without a |
This is fixed now. More details on the issue here: |
Getting this error when trying to load this library on Android (Termux). This doesn't appear to be a problem on any other targets. Builds for macos, windows & linux all work as expected.
Is there a flag or dependency that is required to get this working?
Building using
cross
on theubuntu-latest
Github action runner.Cargo.toml
.cargo/config.toml
Let me know if any other info is required 🙂
The text was updated successfully, but these errors were encountered: