-
Notifications
You must be signed in to change notification settings - Fork 48
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
Impossible to use native Lua libraries in case Lua is compiled from source in lua52-sys #200
Comments
I have a binary crate that links to On my development machine, everything worked all the time w/o problems. On my CI machine, when I try to load a Lua library inside of
I have the same Rust versions and cargo versions on both machines:
Dev machine is Ubuntu 16.04. CI machine is a docker container running on Debian Stretch. Rust toolchain is installed via
with subsequent I've tried installing fresh toolchain after container bootup instead of using symlinks and it didn't influence the error. This symbol is located in
This library is properly
This library isn't So when Lua interpreter loads the library, it calls On my dev machine loading the
On my CI machine loading the
Further debugging shows that in case Lua is compiled from source, compiled When using this library in program, resulting binary also contains Then, Lua, when loading the native library, uses
It seems as if when |
Steps to reproduce:
lrex_posix
Lua librarypkg-config
(a way to do that is removepkg-config
package or used patchedlua52-sys
which always builds from source).hlua
interpreterExpected result: library successfully loads
Observed result:
Workaround: make sure your system has
liblua5.2
installed and findable bypkg-config
, so thatbuild.rs
finds this version - it won't trigger that bug, but requiresliblua5.2.so
shared library to be installed. So for example on Ubuntu 16.04 you'll need to have bothliblua5.2-0
(shared library) andliblua5.2-dev
(headers and static library) installed.What follows is pretty obscure debugging info I gathered while trying to fix this issue. I'll post it in separate comment.
The text was updated successfully, but these errors were encountered: