Skip to content

Mods may use LuaJIT-only features, leading to incompatibility with PUC Lua 5.1 #15921

@Ratstail91

Description

@Ratstail91

Luanti version

Luanti 5.11.0 (Linux)
Using Lua 5.1.5
Built by GCC 12.2
Running on Linux/6.6.74 aarch64
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/local/share/luanti"
STATIC_LOCALEDIR="/usr/local/share/locale"

Operating system and version

Linux raspberrypi 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

Due the the currently bundled version of lua, the goto statement in a game caused an error.

The specific issue can be found here: asuna-mt/asuna#15

However, I believe that updating the lua engine to a more modern build would resolve this issue, and enable the use of the goto keyword for all projects, not just this one.

This was my very first time trying Luanti, as I was hoping to write a summary article for a gaming website - please advise if this upgrade is possible any time soon, thanks.

Steps to reproduce

Here is the process I followed:

  1. Platform is a Raspberry Pi (for unrelated reasons)
  2. Download the source of the latest release as a zip file
  3. run sudo cmake ., installing any missing dependancies via apt
  4. run sudo make install to install it properly
  5. download the game "Asuna" from the game browser
  6. Create a new world, and try to run it
  7. You'll be met with the following error message:
ModError: Failed to load and run script from /home/kruse/.minetest/games/asuna/mods/worldgate/init.lua:
/home/kruse/.minetest/games/asuna/mods/worldgate/src/mapgen.lua:157: '=' expected near 'retry_probe'
stack traceback:
	[C]: ?
	[C]: in function 'dofile'
	.../kruse/.minetest/games/asuna/mods/worldgate/init.lua:37: in function 'load'
	.../kruse/.minetest/games/asuna/mods/worldgate/init.lua:43: in main chunk
Check debug.txt for details.

The erroneous code is:

if not heightmapy then
    goto retry_probe
end

Which is effectively the lua "continue" stand-in, using the goto keyword.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions