On Wed, Nov 26, 2025 at 10:43 AM Diego Nieto Cid <[email protected]> wrote:

> Hi,
>
> El mié, 26 nov 2025 a las 12:23, Ben Greear (<[email protected]>)
> escribió:
>
>> I tried to build today's upstream build...
>>
>> Any idea on this?
>>
>> [ 10%] Building C object wiretap/CMakeFiles/wiretap.dir/candump.c.o
>> /home/greearb/btbits/x64_btbits/3plibs/wireshark/epan/wslua/init_wslua.c:
>> In function ‘lua_resetthread_cb’:
>> /home/greearb/btbits/x64_btbits/3plibs/wireshark/epan/wslua/init_wslua.c:286:5:
>> error: too few arguments to function ‘lua_resetthread’
>>    286 |     lua_resetthread(L1);
>>        |     ^~~~~~~~~~~~~~~
>> In file included from
>> /home/greearb/btbits/x64_btbits/3plibs/wireshark/epan/wslua/wslua.h:25,
>>                   from
>> /home/greearb/btbits/x64_btbits/3plibs/wireshark/epan/wslua/init_wslua.c:18:
>> /usr/include/lua.h:156:21: note: declared here
>>    156 | LUA_API int        (lua_resetthread) (lua_State *L, lua_State
>> *from);
>>        |                     ^~~~~~~~~~~~~~~
>>
>
> Weird, lua_resetthread is documented to have one parameter in 5.4 manual.
> What Lua version do you have?
> https://www.lua.org/manual/5.4/manual.html#lua_resetthread
>


You must have precisely Lua 5.4.5:

https://www.lua.org/work/diffu-lua-5.4.4-lua-5.4.5.html

https://www.lua.org/work/diffs-lua-5.4.5-lua-5.4.6.html

Where they made a dumb API break by adding the extra to `lua_resetthread`
instead of, as they later did, creating `lua_closethread`in Lua 5.4.6.


>
> Anyway, that API is deprecated and should be replaced by
> `lua_closethread(L1, NULL)` according to the manual.
>

Unfortunately, Lua doesn't have a great way to determine the patch level
release (LUA_VERSION_NUM only gives the major and minor release numbers) to
determine that you're running precisely 5.4.6 or later, which is where
`lua_closethread` is available. Luckily the "deprecation" isn't actually
enforced. As a comment in the code in `epan/wslua/init_wslua.c` notes, the
plan is to use an ifdef by the time Lua 5.5 is released (where they may, or
may not, actually deprecate it for real.).

In any case, FC36 has been EOL since 2023-05-16:
https://docs.fedoraproject.org/en-US/releases/eol/

Cheers,
John
_______________________________________________
Wireshark-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to