Tencent / xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
Other
9.42k stars 2.46k forks source link

lua 5.4.7 编译失败 #1166

Closed serialcode9527 closed 1 month ago

serialcode9527 commented 1 month ago

环境:

将lua-5.4.7 源码放到build目录下,修改 make_osx_silicon_lua54.sh

cmake -DBUILD_SILICON=ON -DLUA_VERSION=5.4.7 -GXcode ../

执行编译脚本报错:

/Users/xxxx/project/xLua-2.1.16_ndkr21b_with_win/build/memory_leak_checker.c:153:4: error: initializing 'TValue *' (aka 'struct TValue *') with an expression of
      incompatible type 'StkIdRel'
                        setclLvalue(L, L->top, cl);

翻看了下lua源代码的变更记录,发现stack的索引值,从5.4.5发生了变更 相关commit:

image

memory_leak_checker.c:153 修改:setclLvalue(L, L->top, cl); --> setclLvalue(L, L->top.p, cl); 这样就可以编译通过了,但是不知道这样修改是否正确,会有什么问题。

可以支持下5.4.5以后的lua版本吗

serialcode9527 commented 1 month ago

https://github.com/Tencent/xLua/commit/4d01bb25f4bf6ca05dc5921ffcb97ca4d9f416bf 额,翻了下提交,好像已经解决了