owlry-lua 0.4.10: check() fails with undefined Lua symbols (mlua linker error) #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Environment
owlry-lua 0.4.10-1(AUR)Description
The
build()phase (release profile) completes successfully in ~62s, but thecheck()phase (test compilation, debug profile) fails at the link step withdozens of undefined Lua C symbols from
mlua.Error
The linker includes
-L .../mlua-sys-80b0f1f4252634aa/out/lua-build/lib(fromthe release build artifact), but the test binary is compiled against a
different
mlua-sysbuild directory (mlua-sys-b997d1fe7affed55), whosebundled Lua static lib is apparently not linked.
Suspected cause
The
check()step in the PKGBUILD likely runscargo testwithout the samefeature flags / env vars used in
build(). Ifbuild()uses--features vendored(or equivalent) to bundlelua-src/luajit-src, butcheck()doesnot,
mlua-syswon't emit thecargo:rustc-link-lib=static=lua54directivefor the test binary, resulting in missing symbols at link time.
Suggested fix
Pass the same
--featuresflags incheck()as inbuild().