Luarocks v3.11.1 finds `/usr/include/lua5.5/lua.h` but then says it does
not match Lua version 5.5.

Luarocks recommendation to use `luarocks config variables.LUA_INCDIR
<path>` does not solve the issue.

Using luarocks v3.11.1 blocks the initialization of new projects and
many project installations.

% `docker run -it ubuntu:26.10`
```bash
apt -q -q --yes update
DEBIAN_FRONTEND=noninteractive apt install --yes lua5.5 liblua5.5-dev luarocks 
gcc
lua -v && luarocks --version  # Lua v5.1.5 and LuaRocks 3.11.1
# LuaRocks v3.11.1 installs Lua 5.1 as its default, while LuaRocks v3.13.0 will 
default to Lua 5.5.
lua5.5 -v  # Lua 5.5.0 (5.5.1 was just released.)
luarocks --lua-version=5.1 init example_one  # No problems.
luarocks --lua-version=5.5 init example_five  # Error below...
luarocks --lua-version=5.5 install luafilesystem  # Same error below...
```
> Error: Lua header lua.h found at /usr/include/lua5.5 does not match Lua 
> version 5.5. You can use `luarocks config variables.LUA_INCDIR <path>` to set 
> the correct location.

What is wrong with the file `cat /usr/include/lua5.5/lua.h`?!?

Workaround that fails.
```bash
luarocks --lua-version=5.5 config variables.LUA_INCDIR /usr/include/lua5.5
luarocks --lua-version=5.5 config variables.LUA_INCDIR_OK true
# Validate: Similar results to `luarocks --lua-version=5.1 config | grep INC`.
luarocks --lua-version=5.5 config | grep INC  # --> "/usr/include/lua5.5", true
# Does not solve the problem.  I think we need luarocks v3.13.0 or later.
luarocks --lua-version=5.5 init example_five_again  # Same error.
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160601

Title:
  Luarocks fails to make lua5.5 variables LUA_INCDIR and LUA_INCDIR_OK

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lua5.5/+bug/2160601/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to