#1114309 python-lua: FTBFS: module.h:94:13: error: 'bool' cannot be defined via 'typedef'

Package:
src:python-lua
Source:
src:python-lua
Submitter:
Santiago Vila
Date:
2026-10-06 17:53:02 UTC
Severity:
normal
Tags:
#1114309#5
Date:
2025-09-05 18:24:00 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build.

Below you will find how the build ends (probably the most relevant part,
but not necessarily). If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202509/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-lua, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
/usr/bin/make clean
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf build/
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_clean
rm -rf src/lua_wrapper.egg-info dist
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
/usr/bin/make
make[2]: Entering directory '/<<PKGBUILDDIR>>'
python3 setup.py build
running build
running build_ext
building 'lua' extension
creating build/temp.linux-x86_64-cpython-313
x86_64-linux-gnu-gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.13 -c function.c -o build/temp.linux-x86_64-cpython-313/function.o -I/usr/include/lua5.4
In file included from function.c:18:
module.h:94:13: error: ‘bool’ cannot be defined via ‘typedef’
   94 | typedef int bool;
      |             ^~~~
module.h:94:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
module.h:94:1: warning: useless type name in empty declaration
   94 | typedef int bool;
      | ^~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
make[2]: *** [Makefile:2: all] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:9: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:6: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

#1114309#10
Date:
2025-11-14 13:15:56 UTC
From:
To:
Like the error message already says, the source can not be compiled,
because it defines the type 'bool' and 'bool' is a keyword with
'-std=c23' onwards. To fix this we can either remove the typedef or
check if __STDC_VERSION__ < 202311L, see patch below. I tested this
patch on Ubuntu resolute.
--- a/module.h +++ b/module.h @@ -91,9 +91,11 @@ #include <assert.h> // }}} +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 202311L) typedef int bool; #define true 1 #define false 0 +#endif enum Operator { // {{{ // Operators using the default metamethod.
#1114309#15
Date:
2026-09-09 20:18:12 UTC
From:
To:
user debian-python@lists.debian.org
usertags 1114309 python3.15
tags 1114309 patch
thanks

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version I ran into this FTBFS [1].

I think this package is a good candidate to request removal: it has no
reverse dependecies; upstream is inactive, and it's the same person as
the Debian maintainer; and the uploaded code doesn't match the code in
the git package.

To be able to get it back to building, I had to:
- Add a patch to use <stdbool.h>
- Update a test script that was using old ctypes

I've applied these fixes in the sandbox [2] to verify that it builds
successfully, this should either be applied in Debian to get it back to
a healthy state, or ask for the removal of the package.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4286077/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

#1114309#22
Date:
2026-10-06 17:50:20 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-lua, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1114309@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Maximiliano Curia <maxy@debian.org> (supplier of updated python-lua package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 06 Oct 2026 19:22:08 +0200
Source: python-lua
Architecture: source
Version: 1.0-1.1
Distribution: unstable
Urgency: medium
Maintainer: Bas Wijnen <wijnen@debian.org>
Changed-By: Maximiliano Curia <maxy@debian.org>
Closes: 1114309
Changes:
 python-lua (1.0-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Add patch to support C23 (Closes: #1114309)
Checksums-Sha1:
 a35ca547c3f80132a7a9be2d9f2677afa93ca040 1841 python-lua_1.0-1.1.dsc
 393e3e648bf7385ace4ac7236bc7244313f33c07 14936 python-lua_1.0-1.1.debian.tar.xz
 f855626591bc192c96c367bb94cb7735c5f0757d 8405 python-lua_1.0-1.1_source.buildinfo
Checksums-Sha256:
 7b581331996a0beb4c85a992bdebe42cd25314cdee9946c8291f47998521ab04 1841 python-lua_1.0-1.1.dsc
 1817aeac29f0c8cbee0fe580175a58e4114bb0aef69a2e00c90483aa00c37a60 14936 python-lua_1.0-1.1.debian.tar.xz
 d8c636f4c2e90781cb86f9186ac80346287d758abb9c67b662d28498036cd6c5 8405 python-lua_1.0-1.1_source.buildinfo
Files:
 50081e9ad0b9ae5328f264ba0a163503 1841 python optional python-lua_1.0-1.1.dsc
 3206be43b6105abe2a7aeca0b5eb6e82 14936 python optional python-lua_1.0-1.1.debian.tar.xz
 2b6a054fc6755c3f5fbd33500b98301c 8405 python optional python-lua_1.0-1.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAmrFMEgACgkQxxl2mbKb
IyobFA//VbMgNyFvijmSjSgtzQXjsdHXjRZ1z6LCsWnaACSKp784yT+yj3IT9HXc
LfJx0VncDDgOoaiSDkrLvEG/v2pHMYoP5I8QbmfAISTPc2Zqf+ugwq37bNA+F0Aw
U0MPFj5itXZYQ4YcHApKJkUTFfvfxUmGc9sKyg7XFGPTUXEg1krVK3yXp20q7Tk9
zbnQAWE/w11AV60Sysx0ayiEo6miioQDuOiDcqsXkW7YfIyDrPftx4p1TKH771OP
oUIvMkx9H8bhn5lW6DAcXesKMzPj5x5PnDmUAyS2cP7EVNVVaGShp9/QkimDJKFe
tYqXu7hCrXaKs2mfoEQ1mq6QkEjSUc+xlpOAm4jbzM6HBS1j9QrLOkatwTZUsJ0y
Xf8eu1qY4PGJIxongblDv/54ZSMBcdSw8aQ6xm2NfEPgXV36QquxOfdfolfOmVsH
H06PxHKoexlxz6vYrCcP9XcAYyBl1+0uKtmoIe6G/N0KRoV/k7y1h47lOP7yFQmx
koXp/KOm2iV/uzN9YueCW/ikdd3gfz/LXpHzfqSrUFs5vjHUd8LmMeOj54OZvQUj
g6Zqf1xL/4f3/UNJnnHGDinxGymGqDp6r+Y2xSmYZtMOEatr6V1pKLvQgh8OLEml
ixLcNZJYMo4k6yZQhY8OOq6dqP70hiQNHrRbbCZUbN/Ke3q1BsY=
=ERnK
-----END PGP SIGNATURE-----