#1145456 libratbag: FTBFS: _libratbag.so.p/libratbag.c:4583:17: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration]

#1145456#5
Date:
2026-08-25 10:15:30 UTC
From:
To:
Dear maintainer:

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

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

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

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 cannot 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:libratbag, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
[68/86] cc -Iratbagd.devel.p -I. -I.. -I../src -I../rbtree/s [too-long-redacted] .o -c ../ratbagd/ratbagd-test.c
[69/86] cc -Iratbagd.devel.p -I. -I.. -I../src -I../rbtree/s [too-long-redacted] .c.o -c ../src/libratbag-util.c
[70/86] cc -I_libratbag.so.p -I. -I.. -I../src -I../tools -I [too-long-redacted]  -c _libratbag.so.p/libratbag.c
FAILED: [code=1] _libratbag.so.p/meson-generated_libratbag.c.o
cc -I_libratbag.so.p -I. -I.. -I../src -I../tools -I/usr/inc [too-long-redacted]  -c _libratbag.so.p/libratbag.c
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_device_get_vendor_id’:
_libratbag.so.p/libratbag.c:4583:17: error: implicit declaration of function ‘PyInt_FromLong’; did you mean ‘PyLong_FromLong’? [-Wimplicit-function-declaration]
 4583 |     resultobj = PyInt_FromLong((long) result);
      |                 ^~~~~~~~~~~~~~
      |                 PyLong_FromLong
_libratbag.so.p/libratbag.c:4583:15: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 4583 |     resultobj = PyInt_FromLong((long) result);
      |               ^
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_device_get_product_id’:
_libratbag.so.p/libratbag.c:4609:15: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 4609 |     resultobj = PyInt_FromLong((long) result);
      |               ^
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_device_get_product_version’:
_libratbag.so.p/libratbag.c:4635:15: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 4635 |     resultobj = PyInt_FromLong((long) result);
      |               ^
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_profile_get_report_rate_list’:
_libratbag.so.p/libratbag.c:5168:12: error: implicit declaration of function ‘PyInt_Check’; did you mean ‘PySet_Check’? [-Wimplicit-function-declaration]
 5168 |       if (!PyInt_Check(s)) {
      |            ^~~~~~~~~~~
      |            PySet_Check
_libratbag.so.p/libratbag.c:5173:17: error: implicit declaration of function ‘PyInt_AsLong’; did you mean ‘PyLong_AsLong’? [-Wimplicit-function-declaration]
 5173 |       arg2[i] = PyInt_AsLong(s);
      |                 ^~~~~~~~~~~~
      |                 PyLong_AsLong
_libratbag.so.p/libratbag.c:5182:38: error: passing argument 3 of ‘PyList_SetItem’ makes pointer from integer without a cast [-Wint-conversion]
 5182 |       PyList_SetItem(swig_obj[1], i, PyInt_FromLong(arg2[i]));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      int
In file included from /usr/include/python3.14/Python.h:92,
                 from _libratbag.so.p/libratbag.c:206:
/usr/include/python3.14/listobject.h:35:56: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
   35 | PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
      |                                                        ^~~~~~~~~~
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_profile_get_debounce_list’:
_libratbag.so.p/libratbag.c:5350:38: error: passing argument 3 of ‘PyList_SetItem’ makes pointer from integer without a cast [-Wint-conversion]
 5350 |       PyList_SetItem(swig_obj[1], i, PyInt_FromLong(arg2[i]));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      int
/usr/include/python3.14/listobject.h:35:56: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
   35 | PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
      |                                                        ^~~~~~~~~~
_libratbag.so.p/libratbag.c: In function ‘_wrap_ratbag_resolution_get_dpi_list’:
_libratbag.so.p/libratbag.c:5688:38: error: passing argument 3 of ‘PyList_SetItem’ makes pointer from integer without a cast [-Wint-conversion]
 5688 |       PyList_SetItem(swig_obj[1], i, PyInt_FromLong(arg2[i]));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      int
/usr/include/python3.14/listobject.h:35:56: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
   35 | PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
      |                                                        ^~~~~~~~~~
[71/86] cc -Iratbagd.devel.p -I. -I.. -I../src -I../rbtree/s [too-long-redacted] .o -c ../ratbagd/ratbagd-json.c
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j2 -v returned exit code 1
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------