#1142093 luarocks: Luarocks fails to make lua5.5 variables LUA_INCDIR and LUA_INCDIR_OK

#1142093#5
Date:
2026-07-15 07:34:53 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#1142093#10
Date:
2026-07-15 07:49:07 UTC
From:
To:
```bash

apt-get update -q -q --yes
apt-get install -q -q --yes lua5.4 liblua5.4-dev lua5.5 liblua5.5-dev luarocks
lua -v # Lua 5.1.5 # even though we just installed 5.4 and 5.5, I think luarocks v3.13 fixes this.
luarocks --version # /usr/bin/luarocks 3.8.0 # Not current >= 3.13.0 with valuable lua5.5 fixes.
luarocks --lua-version=5.4 config | grep INC # --> "/usr/include/lua5.4", true
luarocks --lua-version=5.5 config | grep INC # --> Nothing!!

# Let's manually set lua5.5's LUA_INCDIR and LUA_INCDIR_OK to be similar to lua5.4's...
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 variables.LUA_INCDIR_OK true
luarocks --lua-version=5.5 config | grep INC # --> "/usr/include/lua5.5", true

```

#1142093#15
Date:
2026-07-15 07:55:34 UTC
From:
To:
```bash

apt-get update -q -q --yes
apt-get install -q -q --yes lua5.4 liblua5.4-dev lua5.5 liblua5.5-dev luarocks
lua -v # Lua 5.1.5 # even though we just installed 5.4 and 5.5, I think luarocks v3.13 fixes this.
luarocks --version # /usr/bin/luarocks 3.8.0 # Not current >= 3.13.0 with valuable lua5.5 fixes.
luarocks --lua-version=5.4 config | grep INC # --> "/usr/include/lua5.4", true
luarocks --lua-version=5.5 config | grep INC # --> Nothing!!

# Let's manually set lua5.5's LUA_INCDIR and LUA_INCDIR_OK to be similar to lua5.4's...
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 variables.LUA_INCDIR_OK true
luarocks --lua-version=5.5 config | grep INC # --> "/usr/include/lua5.5", true

```

#1142093#20
Date:
2026-07-21 12:24:43 UTC
From:
To:
In GitHub Actions, the best workaround was to build luarocks from source.
```yaml
      - if: runner.os == 'Linux' && matrix.lua-version == '5.5'
        env:
          LUAROCKS_VERSION: 3.13.0
        run: |
          curl https://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz | tar xz
          cd luarocks-${LUAROCKS_VERSION}
          ./configure --with-lua-include=/usr/include/lua5.5
          make build
          sudo make install
          luarocks --lua-version=5.5 config | grep INC  # --> "/usr/include/lua5.5", true
```

#1142093#25
Date:
2026-07-21 13:40:24 UTC
From:
To:
Le mar. 21 juil. 2026 à 14:35, Christian Clauss <cclauss@me.com> a écrit :

It is the duty of the debian package maintainer to package from source, the
source being the teal files, not the lua files which are compiled from them.
That said, it is probably doable to package teal in debian. I just chose
the quickest path to fix previous important bug.

#1142093#30
Date:
2026-07-28 11:58:08 UTC
From:
To:
Hi!

This particular issue is caused by luarocks trying to extract Lua
version from lua.h in /usr/include/lua5.5 and checking if it is indeed
5.5. This fails because Lua 5.5 changes the way its version is defined
in lua.h:

Lua 5.4:

#define LUA_VERSION_NUM 504

Lua 5.5:

#define LUA_VERSION_NUM  (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N)

There are two commits upstream to support Lua 5.5:

https://github.com/luarocks/luarocks/commit/291fc8a34fc186b011c9d6b09a80bf179cae6f62
https://github.com/luarocks/luarocks/commit/ee8194313e61c9d0d7b8a0d52d22b026a06282bb

I guess they can be applied to the luarocks in Debian (probably with
some modifications) until 3.13 can be packaged.

Cheers!

#1142093#35
Date:
2026-07-28 19:41:58 UTC
From:
To:
The `#define` version number has been fixed on pre-release Ubuntu 26.10 Stonking Stingray and on Debian Experimental but has NOT yet been fixed on pre-release Debian Forky.

In ALL cases, this `LUA_INCDIR` bug is NOT fixed.  To me, this is proof positive that the `#define` version number bug is NOT causing this bug.

Proof: https://github.com/cclauss/itinerant-tester/actions/runs/30392852529/job/90388510036

#1142093#40
Date:
2026-07-30 12:10:13 UTC
From:
To:
The `#define` version number bug has now been fixed on pre-releases Ubuntu 26.10 Stonking Stingray and Debian Forky.

In BOTH cases, this `LUA_INCDIR` bug is NOT fixed.  To me, this is proof positive that the `#define` version number bug was NOT causing this bug.

Proof: https://github.com/cclauss/itinerant-tester/actions/runs/30540143362 <https://github.com/cclauss/itinerant-tester/actions/runs/30392852529/job/90388510036>

#1142093#45
Date:
2026-08-06 16:19:09 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
luarocks, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1142093@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sergei Golovan <sgolovan@debian.org> (supplier of updated luarocks package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 06 Aug 2026 18:05:15 +0300
Source: luarocks
Architecture: source
Version: 3.11.1+dfsg-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Lua Team <pkg-lua-devel@lists.alioth.debian.org>
Changed-By: Sergei Golovan <sgolovan@debian.org>
Closes: 1142093
Changes:
 luarocks (3.11.1+dfsg-3) unstable; urgency=medium
 .
   * Team upload.
   * Adapt patches from upstream, which port luarocks to Lua 5.5. Build
     luarocks for Lua 5.5. Closes: #1142093.
Checksums-Sha1:
 5bd0d4420e2c7b3135d95dd3e32a2e5f03b606be 2014 luarocks_3.11.1+dfsg-3.dsc
 26794291ba7be402bcab72263ceeb7ae4de5e2b3 7176 luarocks_3.11.1+dfsg-3.debian.tar.xz
 96a8a2e1b3dbf05fdd62d0ae6616a19a7b2af894 6649 luarocks_3.11.1+dfsg-3_amd64.buildinfo
Checksums-Sha256:
 58b4538fd12878a23395a45f818d97c0173fdd0ac62d88801c4a794a8093bbef 2014 luarocks_3.11.1+dfsg-3.dsc
 62d2461588ac04f6cab8339f45dee80f893720b52fa1813ecbc3ca0f6a1c400c 7176 luarocks_3.11.1+dfsg-3.debian.tar.xz
 392e1fbbfa357588f8c14dc04f8a57684ee43cf3ac7dc98feb24972aae349e93 6649 luarocks_3.11.1+dfsg-3_amd64.buildinfo
Files:
 0bd948a484f21e99cc9facb7854a30a9 2014 interpreters optional luarocks_3.11.1+dfsg-3.dsc
 2b2e1af03b3034c59c7affbcfca096e7 7176 interpreters optional luarocks_3.11.1+dfsg-3.debian.tar.xz
 c51a65bf872c55b3f974aa3bd2c4be66 6649 interpreters optional luarocks_3.11.1+dfsg-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE/SYPsyDB+ShSnvc4Tyrk60tj54cFAmp0r48ACgkQTyrk60tj
54fIuRAAgmMyt184IqsBH9A2BNv17FUdj2Inpf+e8ySKuko1qZKZIZvNtywvzwRH
UbFEVL5EAhTo1R+If1Hb43EahsTwEGuG+Lp/uoDOZ2DlTK2p5criRuNwVxz2lR8v
i59jfkhpXcuCoA654QIvvi+TQfaRUE1vYFwzQQzNopWzzkGyAZQt4e07hfIaYenP
sKneCQNvBMb9yQRkAyp9gAsxso5xzaPBtehuBVkNAdTpX+xd6ucCQm0zizhykav2
sD6axmjRYUhLVpTxQZfIelS6/LltFv+Wz6MzSq2VIyVwxqAPU5bXKcCJfmj7TsrL
NaTX3/JFJqakGZrs8jmEzBHns6qvFBfibU5tQnAL+k7sjqwI5IBj+GiYp6XqL9gC
v6RO2uBxo4ZmOj9HAfFvfoylS1vpS77vnhMVDqrRmnPYxZT6RQlTPDLi9nygDeyt
VxY9MWjpEQpgJFcgOLjp1GGj5+/vSrw51mLwSokdMyBu4r2YOmOtGf5Tt+oBIswB
mzGHlXmbWeXjs924UYpgSA2Cr5pUKDOPc4pKTdQBnK9pWQ4z0Y77i1x7vCWON4aH
u1CCUdTlLy6tXG+DQb8yUohiCr2MJzp4GL3JpX6NzIS+rsC+i9klMZ4YfDUzjQil
4f2ZjJ2f6QAllE4afz3/1sZFzn3OtUzM5HhpcAzhld9T1L4RVng=
=kUpY
-----END PGP SIGNATURE-----

#1142093#50
Date:
2026-08-07 04:30:10 UTC
From:
To:
I tested `docker run --rm -it debian:unstable` and I am delighted to confirm that Luarocks 3.11.1+dfsg-3 fixes the issues in this bug report.

You folks do great work.  Thank you very much for all your efforts.