luarocks / luarocks/luarocks-site

installed library contains call to non-existent luaL_register

Open
#147 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MoonScript
Stars
201
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am new to Lua. I have lua 5.3.5 and luarocks 3.1.3 installed on my Gentoo system.
Invoking
luarocks install lmapm
generates and installs the library
/usr/lib64/lua/luarocks/lib/lua/5.3/mapm.so
which refers to luaL_register which doesn't exist in Lua 5.3 any more.

Here my commands
export LUA_CPATH=/usr/lib64/lua/luarocks/lib/lua/5.3/mapm.so
lua
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
> mp=require("mapm")
error loading module 'mapm' from file '/usr/lib64/lua/luarocks/lib/lua/5.3/mapm.so':
/usr/lib64/lua/luarocks/lib/lua/5.3/mapm.so: undefined symbol: luaL_register

I find it strange that setting
LUA_CPATH=/usr/lib64/lua/luarocks/lib/lua/5.3
gives an error saying that LUA_CPATH points to a directory which should be the normal case for a 'PATH'.

What am I missing?
Many thanks for a hint,
Helmut

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `luarocks install lmapm` with Lua 5.3.5 and then `require("mapm")`, as described in the report. Check the generated `/usr/lib64/lua/luarocks/lib/lua/5.3/mapm.so` and the LuaRocks build path for the obsolete symbol; done means the module loads successfully on Lua 5.3.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.