dovecot-2.4.2 lua5-1 build failure
Hi,
Building dovecot-2.4.2 fails to build against lua5-1:
$ ./configure --with-lua [...] checking for lua5.1 >= 5.1 lua5.1 != 5.2... yes configure: using library lua5.1 checking for lua_newstate... yes checking for luaL_setfuncs... no checking for luaL_setmetatable... no checking for lua_isinteger... no checking for lua_resume... yes checking for lua_seti... no checking for lua_tointegerx... no checking for lua_yieldk... no [...] $ make [...] CC dlua-iostream.lo dlua-iostream.c:16:28: error: field 'stream' has incomplete type 16 | struct luaL_Stream stream; | ^~~~~~ dlua-iostream.c: In function 'dlua_o_write': dlua-iostream.c:68:24: error: implicit declaration of function 'luaL_tolstring'; did you mean 'lua_tolstring'? [-Wimplicit-function-declaration] 68 | vec.iov_base = luaL_tolstring(L, 2, &vec.iov_len); | ^~~~~~~~~~~~~~ | lua_tolstring dlua-iostream.c:68:22: error: assignment to 'const void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 68 | vec.iov_base = luaL_tolstring(L, 2, &vec.iov_len); | ^ dlua-iostream.c:73:24: error: implicit declaration of function 'luaL_fileresult'; did you mean 'luaL_pushresult'? [-Wimplicit-function-declaration] 73 | return luaL_fileresult(L, 0, o_stream_get_name(stream->os)); | ^~~~~~~~~~~~~~~ | luaL_pushresult make[3]: *** [Makefile:786: dlua-iostream.lo] Error 1
Same configure and make commands succeed when run against lua5-4. Not sure if this was intentional as we still check for >= lua5-1 != lua5-2 in m4/want_lua.m4
Thanks
Eray
On 31/10/2025 09:52 EET Eray Aslan via dovecot <dovecot@dovecot.org> wrote:
Hi,
Building dovecot-2.4.2 fails to build against lua5-1:
$ ./configure --with-lua [...] checking for lua5.1 >= 5.1 lua5.1 != 5.2... yes configure: using library lua5.1 checking for lua_newstate... yes checking for luaL_setfuncs... no checking for luaL_setmetatable... no checking for lua_isinteger... no checking for lua_resume... yes checking for lua_seti... no checking for lua_tointegerx... no checking for lua_yieldk... no [...] $ make [...] CC dlua-iostream.lo dlua-iostream.c:16:28: error: field 'stream' has incomplete type 16 | struct luaL_Stream stream; | ^~~~~~ dlua-iostream.c: In function 'dlua_o_write': dlua-iostream.c:68:24: error: implicit declaration of function 'luaL_tolstring'; did you mean 'lua_tolstring'? [-Wimplicit-function-declaration] 68 | vec.iov_base = luaL_tolstring(L, 2, &vec.iov_len); | ^~~~~~~~~~~~~~ | lua_tolstring dlua-iostream.c:68:22: error: assignment to 'const void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 68 | vec.iov_base = luaL_tolstring(L, 2, &vec.iov_len); | ^ dlua-iostream.c:73:24: error: implicit declaration of function 'luaL_fileresult'; did you mean 'luaL_pushresult'? [-Wimplicit-function-declaration] 73 | return luaL_fileresult(L, 0, o_stream_get_name(stream->os)); | ^~~~~~~~~~~~~~~ | luaL_pushresult make[3]: *** [Makefile:786: dlua-iostream.lo] Error 1
Same configure and make commands succeed when run against lua5-4. Not sure if this was intentional as we still check for >= lua5-1 != lua5-2 in m4/want_lua.m4
Thanks
Eray
Have to check if we can drop lua5.1 support. Otherwise need to add a feature guard.
Aki
participants (2)
- 
                
                Aki Tuomi
 - 
                
                Eray Aslan