Skip to content

Linux: luarocks make on apt installed lua5.5#16

Open
cclauss wants to merge 1 commit into
masterfrom
ubuntu_apt_install_lua5.5
Open

Linux: luarocks make on apt installed lua5.5#16
cclauss wants to merge 1 commit into
masterfrom
ubuntu_apt_install_lua5.5

Conversation

@cclauss

@cclauss cclauss commented Jul 9, 2026

Copy link
Copy Markdown
Owner




apt-get install luarocks installs v3.8.0, which is too old for Lua 5.5.

Let's try to patch it to support: luarocks --lua-version=5.5 --local make


Typo in the apt installed lua5.5.pc file

version=5.5.#define LUA_VERSION_RELEASE LUAI_TOSTR(LUA_VERSION_RELEASE_N)

I will try to report this to Ubuntu maintainers...

% export PCDIR=$(pkgconf lua5.5 --variable pcfiledir)
% diff $PCDIR/lua5.4.pc $PCDIR/lua5.5.pc

Can you spot the typo below?

< major_version=5.4
< version=5.4.8
< lib_name_include=lua5.4
> major_version=5.5
> version=5.5.#define LUA_VERSION_RELEASE	LUAI_TOSTR(LUA_VERSION_RELEASE_N)
> lib_name_include=lua5.5

Fix the typo

sudo sed -i '/^version=5\.5\.\#define /c\version=5.5.0' $PCDIR/lua5.5.pc

Effects on luarocks

This causes luarocks --lua-version=5.5 config to not create a LUA_INCDIR variable even if the typo has been fixed before apt-get install luarocks!

luarocks --lua-version=5.4 config | grep INC  # --> "/usr/include/lua5.4"
luarocks --lua-version=5.5 config | grep INC  # --> Nothing!!!
# Let's manually set LUA_INCDIR...
mkdir -p $HOME/.luarocks  # required before setting luarocks config variables.
luarocks --lua-version=5.5 config variables.LUA_INCDIR /usr/include/lua5.5
luarocks --lua-version=5.5 config | grep INC  # --> "/usr/include/lua5.5"

Steps to reproduce

% docker run -it ubuntu:26.04

apt-get update -q -q --yes
apt-get install --yes -q -q lua5.4 liblua5.4-dev lua5.5 liblua5.5-dev luarocks
luarocks --version  # /usr/bin/luarocks 3.8.0  # Not current >= 3.13.0
export PCDIR=$(pkgconf lua5.5 --variable pcfiledir)
diff $PCDIR/lua5.4.pc $PCDIR/lua5.5.pc | grep -E '^[<>] [^#]'
sed -i '/^version=5\.5\.\#define /c\version=5.5.0' $PCDIR/lua5.5.pc
diff $PCDIR/lua5.4.pc $PCDIR/lua5.5.pc | grep -E '^[<>] [^#]'

% docker run -it debian:trixie # Does not yet have lua5.5
% docker run -it debian:forky # Does ;-)
https://salsa.debian.org/lua-team/lua-5-5/-/commit/a407d9fb1d11431b020fab83e861361c6b3ae446#note_780460

@cclauss
cclauss force-pushed the ubuntu_apt_install_lua5.5 branch 30 times, most recently from 4dc6c6e to e778fcf Compare July 12, 2026 11:42
@cclauss
cclauss force-pushed the ubuntu_apt_install_lua5.5 branch 11 times, most recently from e96290e to 76b4260 Compare July 12, 2026 12:58
@cclauss
cclauss force-pushed the ubuntu_apt_install_lua5.5 branch from 76b4260 to 595bf16 Compare July 12, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant