Yegor Yefremov 97179e17d4 package/dovecot: fix build with Lua 5.1
Since version 2.4, dovecot's configure defaults to --with-lua=auto and
picks up any Lua found through pkg-config, as long as it is >= 5.1 and
not 5.2. However, src/lib-lua/dlua-iostream.c, also new in 2.4, uses
luaL_Stream, luaL_tolstring() and luaL_fileresult(), which only exist
since Lua 5.2 and are not covered by dovecot's compat layer, so the
build fails when Lua 5.1 happens to be built before dovecot:

  dlua-iostream.c:16:28: error: field 'stream' has incomplete type
  dlua-iostream.c:68:24: error: implicit declaration of function 'luaL_tolstring'; did you mean 'lua_tolstring'? [-Wimplicit-function-declaration]

Handle Lua explicitly: enable it, and add the missing dependency, only
with Lua 5.3/5.4, and pass --without-lua otherwise, which also covers
LuaJIT as it only provides the Lua 5.1 API. This also makes the build
reproducible, as Lua is no longer picked up depending on build order.

This issue has been present since commit 894cbeddaf
("package/dovecot{-pigeonhole}: security bump version to 2.4.5"), as
dovecot 2.3 only enabled Lua when explicitly requested. That commit is
not part of any release yet.

Fixes:
https://autobuild.buildroot.org/results/e4cf30f6ca8b18ac010755bf13fc1d5e92eda575

Fixes: 894cbeddaf ("package/dovecot{-pigeonhole}: security bump version to 2.4.5")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2026-10-20 09:50:31 +02:00
…
…
…
…
2026-10-19 19:15:03 +02:00
…
…
…
…
2026-10-19 23:46:16 +02:00
…
…

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at https://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches
Description
No description provided
Readme 244 MiB
Languages
Makefile 62.2%
Python 19.4%
C 8.4%
Shell 6.1%
PHP 1.4%
Other 2.1%