Wireshark-dev: [Wireshark-dev] Re: Broken build on F36, lua related

From: John Thacker <johnthacker@xxxxxxxxx>
Date: Wed, 26 Nov 2025 10:50:32 -0500
On Wed, Nov 26, 2025 at 10:43 AM Diego Nieto Cid <dnietoc@xxxxxxxxx> wrote:
Hi,

El mié, 26 nov 2025 a las 12:23, Ben Greear (<greearb@xxxxxxxxxxxxxxx>) 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?


You must have precisely Lua 5.4.5:



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:

Cheers,
John