lua-users home
lua-l archive

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


2016-06-20 23:37 GMT+02:00 Peter Melnichenko <mpeterval@gmail.com>:
> On Mon, Jun 20, 2016 at 11:45 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> Why can't it check first of all if the output "lua -v" complies with
>> what is needed? And only if it isn't, start to guess under what
>> name the alternative interpreter might be available?
>
> luaposix just uses whatever luarocks passes to it: it's built using a command
> that starts with `./configure LUA='$(LUA)'`, where LUA variable is
> substituted by
> luarocks, with a wrong value 'lua53' in this case. It should come from
> `luarocks.site_config`
> module that is generated on luarocks installation. Could you send its contents?
> The file is with all other modules, probably in
> $PREFIX/share/lua/5.3/luarocks/site_config.lua.
>
> -- Peter Melnichenko
>
$ cat /usr/local/share/lua/5.3/luarocks/site_config.lua
local site_config = {}
site_config.LUAROCKS_PREFIX=[[/usr/local]]
site_config.LUA_INCDIR=[[/home/dirk/include]]
site_config.LUA_LIBDIR=[[/home/dirk/lib]]
site_config.LUA_BINDIR=[[/home/dirk/bin]]
site_config.LUA_INTERPRETER=[[lua53]]
site_config.LUAROCKS_SYSCONFDIR=[[/usr/local/etc/luarocks]]
site_config.LUAROCKS_ROCKS_TREE=[[/usr/local]]
site_config.LUAROCKS_ROCKS_SUBDIR=[[/lib/luarocks/rocks]]
site_config.LUAROCKS_UNAME_S=[[Linux]]
site_config.LUAROCKS_UNAME_M=[[x86_64]]
site_config.LUAROCKS_DOWNLOADER=[[wget]]
site_config.LUAROCKS_MD5CHECKER=[[md5sum]]
site_config.LUAROCKS_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={ "lib",
[[lib/x86_64-linux-gnu]] }, include="include" }
site_config.LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={
"lib", [[lib/x86_64-linux-gnu]] }, include="include" }
return site_config

This configuration (May 2014) was done at a stage when the current
Lua was 5.2, Lua 5.3 was sitting in my home directory. But luarocks
itself was updated in March 2015 when the current Lua was 5.3.

Is there a way to ask luarocks to reconfigure?

If not, is it safe to just edit the config file manually?