lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 21, 2017 at 1:34 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
>
> What is your lfs.so linked against?
>

I am not sure I fully understand the question. But on Linux, I
installed it using the LuaRocks utility. ldd reports this:

```
$ ldd  /home/deepak/lua53/lib/lua/5.3/lfs.so
        linux-vdso.so.1 =>  (0x00007fffe6cff000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0cedf40000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0cee600000)
```

> If rust-lua53 links in Lua statically, then it might not re-export the
> Lua symbols for the dynamic linking of lfs.
>

Yes, rust-lua53 links to Lua statically. I am not sure how to find out
if it re-exports the symbols.

However, the 'nm' utility on Linux reports this on the  executable
that I am using to invoke the Lua code:

```
$ nm -g target/debug/rlua | grep lua | wc -l
298

$ nm -g target/debug/rlua | grep lua_gettop
000000000000dd63 T lua_gettop
```

On Linux, the error is "undefined symbol: lua_gettop", but as you can
see the grep output seems to clearly show it as being available. So I
am not sure where the problem is exactly.

> Another approach is to link lfs in the Lua build statically - it's
> pretty straightforward.
>

Yes, that may be straightforward. But I am looking to build a Lua
interpreter inside Rust that has equivalent to functionality to the
standard Lua interpreter, including the ability to load arbirtary Lua
C modules. I later plan to extend it with other stuff.

Deepak