#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-09-09 20:19:03 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/