Skip to content

Fix macOS on arm64 CI failure: pass LUA_LIBDIR in rockspecs#5

Draft
cclauss wants to merge 1 commit into
masterfrom
luarocks-on-macos-and-windows
Draft

Fix macOS on arm64 CI failure: pass LUA_LIBDIR in rockspecs#5
cclauss wants to merge 1 commit into
masterfrom
luarocks-on-macos-and-windows

Conversation

@cclauss

@cclauss cclauss commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Fixes the failing GitHub Actions "ci (macos-latest)" job.

Root Cause

The linker on macOS was receiving -L/opt/homebrew/opt/lua/include/lua5.5 (the include directory) instead of the lib directory, causing ld: library 'lua' not found.

This happened because Makefile.luarocks derives the Lua library path from the include path using patsubst %/include,%/lib,$(LUA_INCDIR). This substitution only works when the path ends with /include, but Homebrew installs Lua with a versioned subdirectory (e.g. /opt/homebrew/opt/lua/include/lua5.5), so the pattern never matched and the include path was passed unchanged to -L.

Fix

Added LUA_LIBDIR = '$(LUA_LIBDIR)' to the variables table in both rockspecs:

  • lunatic-python-scm-0.rockspec
  • rockspecs/lunatic-python-1.0-1.rockspec

LuaRocks already knows the correct library directory and exposes it as $(LUA_LIBDIR). Passing it explicitly means the Makefile's $(or $(LUA_LIBDIR),...) logic uses it directly, bypassing the broken patsubst fallback. The linker now correctly receives -L/opt/homebrew/opt/lua/lib -llua.

@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch 30 times, most recently from e577fb7 to d431a55 Compare June 19, 2026 09:54
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch 2 times, most recently from 2a6a8d9 to 55c4430 Compare June 19, 2026 13:02
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch 2 times, most recently from 105a57c to d10d3dc Compare June 25, 2026 07:49
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch from d10d3dc to 09e5ed9 Compare June 25, 2026 07:59
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch from 09e5ed9 to a6ca96d Compare June 25, 2026 08:05
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch from a6ca96d to cdc89d7 Compare June 25, 2026 08:06
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch 2 times, most recently from 0721250 to 5e6bddf Compare June 25, 2026 08:16
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch from 5e6bddf to aa2222b Compare June 25, 2026 08:31
cclauss added a commit that referenced this pull request Jun 25, 2026
# This is the 1st commit message:

luarocks make fails on macOS and Windows

# The commit message #2 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #3 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #4 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #5 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #6 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #7 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #8 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #9 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #10 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message #11 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#12 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#13 will be skipped:

# luarocks make fails on macOS and Windows

# The commit message bastibe#14 will be skipped:

# luarocks make fails on macOS and Windows
@cclauss cclauss force-pushed the luarocks-on-macos-and-windows branch 9 times, most recently from d3e154e to 3a6791a Compare June 25, 2026 09:08
@cclauss

cclauss commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@copilot That is worse, not better.

ld: warning: search path '-llua' not found
Undefined symbols for architecture arm64:

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown

@copilot That is worse, not better.

ld: warning: search path '-llua' not found

...

Fixed in 8049d8f. I updated Makefile.luarocks to derive the Lua lib path from LUA_INCDIR when LUA_LIBDIR is not passed, so the link step no longer emits -L -llua and now links against the correct Lua library path.

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.

2 participants