Closed tenturestept closed 5 months ago
Makefile:319: *** missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY. Stop.
try running the command export MACOSX_DEPLOYMENT_TARGET=XX.YY
for your XX.YY
version of macOS first?
@un-def if the LuaJIT rolling release is now requiring this, perhaps it can be automatically set if not already present?
A tricky thing is that this defines the lowest macOS version the generated binaries are compatible with, and this affects the available system APIs.
I think Lua modules can set their own deployment target (people have contributed a feature so that Mac-specific rockspecs can set that value, so that seems to be the case), so possibly one could set thins to the lowest value that still builds luajit
on a modern system.
According to the LuaRocks source code, you can check the running version with sw_vers -productVersion
(so it needs to be no greater than that). This is how LuaRocks picks its default, people haven't complained lately:
local version = util.popen_read("sw_vers -productVersion")
if not (version:match("^%d+%.%d+%.%d+$") or version:match("^%d+%.%d+$")) then
version = "10.3"
end
version = vers.parse_version(version)
if version >= vers.parse_version("11.0") then
version = vers.parse_version("11.0")
elseif version >= vers.parse_version("10.10") then
version = vers.parse_version("10.8")
elseif version >= vers.parse_version("10.5") then
version = vers.parse_version("10.5")
else
-- interesting, but at this point supporting macOS < 10.5
-- falls under retrocomputing :)
defaults.gcc_rpath = false
end
This is not related to rolling release changes, this env variable has always been required. On CI I used some artibrary value: https://github.com/luarocks/hererocks/blob/c5f78495359f766bea2ca6f7ca5bcc74a4108447/.github/workflows/test.yml#L40
I think we can do the following:
MACOSX_DEPLOYMENT_TARGET
is set — do nothingMACOSX_DEPLOYMENT_TARGET
is not set — set it to the the running versionI don't have a macOS device at hand, I'll check later and make a PR.
Is this LuaJIT-specific, or PUC-Rio Lua requires MACOSX_DEPLOYMENT_TARGET
as well?
Makefile:319: *** missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY. Stop.
try running the command
export MACOSX_DEPLOYMENT_TARGET=XX.YY
for yourXX.YY
version of macOS first?
yes that works
Is this LuaJIT-specific, or PUC-Rio Lua requires
MACOSX_DEPLOYMENT_TARGET
as well?
this is luajit-specific
@tenturestept could you check again with a fresh copy of hererocks.py, please? The variable is set automatically now, you don't need to export MACOSX_DEPLOYMENT_TARGET=XX.YY
anymore.
Yep it works!
an error when building luajit: