lunarmodules / luasystem

Platform independent system calls for Lua
http://lunarmodules.github.io/luasystem/
MIT License
22 stars 13 forks source link

Missing symbols with the current linux build #35

Closed ttyyls closed 2 months ago

ttyyls commented 2 months ago

Hi,

Description

luasystem build is missing a couple of symbols. which makes lua-busted fail to load with the following error:

lua: error loading module 'system.core' from file '/usr/lib/lua/5.4/system/core.so':
    Error relocating /usr/lib/lua/5.4/system/core.so: bitflags_open: symbol not found
stack traceback:
    [C]: in ?
    [C]: in function 'require'
    /usr/share/lua/5.4/system.lua:7: in main chunk
    [C]: in function 'require'
    /usr/share/lua/5.4/busted/core.lua:6: in main chunk
    [C]: in function 'require'
    /usr/share/lua/5.4/busted/runner.lua:18: in function 'busted.runner'
    /usr/bin/busted:3: in main chunk
    [C]: in ?

Environment

Chimera Linux Lua 5.4 LuaRocks N/A Clang version 18.1.8

Steps to reproduce

install and run busted on chimera-linux

Attempts to resolve

The following downstream patch fixes the issue

diff --git a/src/Makefile b/src/Makefile
index b4ed16f..6425a4a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -217,7 +217,7 @@ LUALIB= $(LUALIB_$(PLAT))
 #------
 # Objects
 #
-OBJS=core.$(O) compat.$(O) time.$(O) environment.$(O) random.$(O) term.$(O)
+OBJS=bitflags.$(O) compat.$(O) core.$(O) environment.$(O) random.$(O) term.$(O) time.$(O) wcwidth.$(O)

 #------
 # Targets

linked pr https://github.com/chimera-linux/cports/pull/2796

It'd be great if this fix or something equivalent were to be incorporated upstream, instead of having to maintain it downstream.

Tieske commented 2 months ago

released in v0.4.4

ttyyls commented 2 months ago

Thanks!