owlry-lua 0.4.10: check() fails with undefined Lua symbols (mlua linker error) #4

Open
opened 2026-03-15 09:06:22 +01:00 by mpuchstein · 0 comments
Owner

Environment

  • Package: owlry-lua 0.4.10-1 (AUR)
  • Tool: paru
  • OS: Arch Linux x86_64
  • Date: 2026-03-15

Description

The build() phase (release profile) completes successfully in ~62s, but the
check() phase (test compilation, debug profile) fails at the link step with
dozens of undefined Lua C symbols from mlua.

Error


error: linking with `cc` failed: exit status: 1
rust-lld: error: undefined symbol: lua_gettop
rust-lld: error: undefined symbol: lua_rotate
rust-lld: error: undefined symbol: lua_pcallk
rust-lld: error: undefined symbol: lua_settop
... (many more lua_* / luaL_* symbols)

The linker includes -L .../mlua-sys-80b0f1f4252634aa/out/lua-build/lib (from
the release build artifact), but the test binary is compiled against a
different mlua-sys build directory (mlua-sys-b997d1fe7affed55), whose
bundled Lua static lib is apparently not linked.

Suspected cause

The check() step in the PKGBUILD likely runs cargo test without the same
feature flags / env vars used in build(). If build() uses --features vendored (or equivalent) to bundle lua-src/luajit-src, but check() does
not, mlua-sys won't emit the cargo:rustc-link-lib=static=lua54 directive
for the test binary, resulting in missing symbols at link time.

Suggested fix

Pass the same --features flags in check() as in build().

## Environment - **Package:** `owlry-lua 0.4.10-1` (AUR) - **Tool:** paru - **OS:** Arch Linux x86_64 - **Date:** 2026-03-15 ## Description The `build()` phase (release profile) completes successfully in ~62s, but the `check()` phase (test compilation, debug profile) fails at the link step with dozens of undefined Lua C symbols from `mlua`. ## Error ``` error: linking with `cc` failed: exit status: 1 rust-lld: error: undefined symbol: lua_gettop rust-lld: error: undefined symbol: lua_rotate rust-lld: error: undefined symbol: lua_pcallk rust-lld: error: undefined symbol: lua_settop ... (many more lua_* / luaL_* symbols) ``` The linker includes `-L .../mlua-sys-80b0f1f4252634aa/out/lua-build/lib` (from the **release** build artifact), but the **test** binary is compiled against a different `mlua-sys` build directory (`mlua-sys-b997d1fe7affed55`), whose bundled Lua static lib is apparently not linked. ## Suspected cause The `check()` step in the PKGBUILD likely runs `cargo test` without the same feature flags / env vars used in `build()`. If `build()` uses `--features vendored` (or equivalent) to bundle `lua-src`/`luajit-src`, but `check()` does not, `mlua-sys` won't emit the `cargo:rustc-link-lib=static=lua54` directive for the test binary, resulting in missing symbols at link time. ## Suggested fix Pass the same `--features` flags in `check()` as in `build()`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Owlibou/owlry#4