Skip to content

fix(rockspec): Check for Lua 5.1 header files. #2028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slg95
Copy link

@slg95 slg95 commented Jul 23, 2025

Description

Previously, rockspec.lua checked if Lua 5.1 was installed to determine if LuaRocks could build packages for Lua 5.1. This was not sufficient since the Lua version does not matter as long as the development headers for Lua 5.1 are available. So Lua 5.1 could be installed and the LuaRocks packages could still fail to install.

Note: this also checks if a suitable version of Lua is installed since
the command will fail if Lua is not installed at all.

I tested this on Fedora and Mac, but do not have a Windows machine to test on. Let me know if anything needs tweaked!

The Health.check() function could probably be simplified now, but I did not touch that function. I can if that is desired.

Related Issue(s)

Fixes #1570
Fixes #2020

Follow up to #2022

Previously, rockspec.lua checked if Lua 5.1 was installed to determine
if LuaRocks could build packages for Lua 5.1. This was not sufficient
since the Lua version does not matter as long as the development headers
for Lua 5.1 are available. So Lua 5.1 could be installed and the
LuaRocks packages could still fail to install.

Note: this also checks if a suitable version of Lua is installed since
      the command will fail if Lua is not installed at all.
@slg95 slg95 force-pushed the check-lua-headers-for-luarocks branch from c680749 to 284c7fe Compare July 23, 2025 14:00
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.

bug: Lazy gives warning for Lua version even if it is greater than the minimum version luarocks needs lua 5.1
1 participant