#1145287 gensio: FTBFS: gensio_python.h:368:9: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration]

Package:
src:gensio
Source:
src:gensio
Submitter:
Santiago Vila
Date:
2026-08-23 19:58:14 UTC
Severity:
normal
Tags:
#1145287#5
Date:
2026-08-23 19:57:55 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:gensio, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
libtool: compile:  x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/python3.14 -I../../include -I../../include -I../.. -I../../swig/include -DPYTHON_HAS_THREADS=1 -Wdate-time -D_FORTIFY_SOURCE=2 -I../../include -I../../include -pthread -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -pedantic -c gensio_wrap.c  -fPIC -DPIC -o .libs/gensio_wrap.o
/bin/bash ../../libtool  --tag=CC   --mode=link x86_64-linux-gnu-gcc -DBUILDING_GENSIO_DLL -pthread -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -pedantic -no-undefined -rpath /usr/lib/x86_64-linux-gnu -version-info 14:0:0  -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o libgensio_python_swig.la -rpath /usr/lib/x86_64-linux-gnu libgensio_python_swig_la-gensio_python_swig.lo ../../lib/libgensio.la ../../lib/libgensioosh.la ../../lib/libgensiomdns.la -L/usr/lib/x86_64-linux-gnu -lpython3.14
gensio_wrap.c: In function 'SwigVarLink_TypeOnce':
gensio_wrap.c:1679:22: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 1679 |     { Py_tp_dealloc, (void *)SwigVarLink_dealloc },
      |                      ^
gensio_wrap.c:1680:19: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 1680 |     { Py_tp_repr, (void *)SwigVarLink_repr },
      |                   ^
gensio_wrap.c:1681:22: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 1681 |     { Py_tp_getattr, (void *)SwigVarLink_getattr },
      |                      ^
gensio_wrap.c:1682:22: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 1682 |     { Py_tp_setattr, (void *)SwigVarLink_setattr },
      |                      ^
gensio_wrap.c:1683:18: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 1683 |     { Py_tp_str, (void *)SwigVarLink_str },
      |                  ^
gensio_wrap.c: In function 'SwigPyObject_TypeOnce':
gensio_wrap.c:2293:22: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2293 |     { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
      |                      ^
gensio_wrap.c:2294:19: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2294 |     { Py_tp_repr, (void *)SwigPyObject_repr },
      |                   ^
gensio_wrap.c:2295:23: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2295 |     { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
      |                       ^
gensio_wrap.c:2297:26: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2297 |     { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
      |                          ^
gensio_wrap.c:2299:18: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2299 |     { Py_nb_int, (void *)SwigPyObject_long },
      |                  ^
gensio_wrap.c: In function 'SwigPyPacked_TypeOnce':
gensio_wrap.c:2520:22: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2520 |     { Py_tp_dealloc, (void *)SwigPyPacked_dealloc },
      |                      ^
gensio_wrap.c:2521:19: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2521 |     { Py_tp_repr, (void *)SwigPyPacked_repr },
      |                   ^
gensio_wrap.c:2522:18: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2522 |     { Py_tp_str, (void *)SwigPyPacked_str },
      |                  ^
gensio_wrap.c:2523:23: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 2523 |     { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
      |                       ^
In file included from gensio_wrap.c:3264:
gensio_python.h: In function 'gensio_control_cb':
gensio_python.h:368:9: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration]
  368 |     o = PyInt_FromLong(err);
      |         ^~~~~~~~~~~~~~
      |         PyLong_FromLong
gensio_python.h:368:7: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  368 |     o = PyInt_FromLong(err);
      |       ^
gensio_python.h: In function 'sgensio_call':
gensio_python.h:396:7: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  396 |     o = PyInt_FromLong(val);
      |       ^
gensio_python.h: In function 'gensio_py_handle_auxdata':
gensio_python.h:581:35: error: implicit declaration of function 'PyString_FromString'; did you mean 'PyLong_FromString'? [-Wimplicit-function-declaration]
  581 |             PyTuple_SetItem(o, i, PyString_FromString(auxdata[i]));
      |                                   ^~~~~~~~~~~~~~~~~~~
      |                                   PyLong_FromString
gensio_python.h:581:35: error: passing argument 3 of 'PyTuple_SetItem' makes pointer from integer without a cast [-Wint-conversion]
  581 |             PyTuple_SetItem(o, i, PyString_FromString(auxdata[i]));
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   int
In file included from /usr/include/python3.14/Python.h:91,
                 from gensio_wrap.c:206:
/usr/include/python3.14/tupleobject.h:33:57: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'int'
   33 | PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *);
      |                                                         ^~~~~~~~~~
gensio_python.h: In function 'gensio_child_event':
gensio_python.h:709:11: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  709 |         o = PyInt_FromLong(readerr);
      |           ^
gensio_python.h:756:24: error: implicit declaration of function 'PyInt_Check'; did you mean 'PySet_Check'? [-Wimplicit-function-declaration]
  756 |             } else if (PyInt_Check(o)) {
      |                        ^~~~~~~~~~~
      |                        PySet_Check
gensio_python.h:757:22: error: implicit declaration of function 'PyInt_AsLong'; did you mean 'PyLong_AsLong'? [-Wimplicit-function-declaration]
  757 |                 rv = PyInt_AsLong(o);
      |                      ^~~~~~~~~~~~
      |                      PyLong_AsLong
gensio_python.h:845:11: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  845 |         o = PyInt_FromLong(height);
      |           ^
gensio_python.h:847:11: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  847 |         o = PyInt_FromLong(width);
      |           ^
gensio_python.h: In function 'gensio_acc_io_call_cb':
gensio_python.h:1044:11: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 1044 |         o = PyInt_FromLong(opterr);
      |           ^
In file included from /usr/include/python3.14/Python.h:64:
gensio_python.h: In function 'gensio_mdns_cb':
/usr/include/python3.14/pyport.h:37:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   37 | #define _Py_CAST(type, expr) ((type)(expr))
      |                               ^
/usr/include/python3.14/object.h:174:28: note: in expansion of macro '_Py_CAST'
  174 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
      |                            ^~~~~~~~
/usr/include/python3.14/cpython/tupleobject.h:40:51: note: in expansion of macro '_PyObject_CAST'
   40 |     PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
      |                                                   ^~~~~~~~~~~~~~
gensio_python.h:1377:5: note: in expansion of macro 'PyTuple_SET_ITEM'
 1377 |     PyTuple_SET_ITEM(args, 1, PyInt_FromLong(ipinterface));
      |     ^~~~~~~~~~~~~~~~
/usr/include/python3.14/pyport.h:37:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   37 | #define _Py_CAST(type, expr) ((type)(expr))
      |                               ^
/usr/include/python3.14/object.h:174:28: note: in expansion of macro '_Py_CAST'
  174 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
      |                            ^~~~~~~~
/usr/include/python3.14/cpython/tupleobject.h:40:51: note: in expansion of macro '_PyObject_CAST'
   40 |     PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
      |                                                   ^~~~~~~~~~~~~~
gensio_python.h:1378:5: note: in expansion of macro 'PyTuple_SET_ITEM'
 1378 |     PyTuple_SET_ITEM(args, 2, PyInt_FromLong(ipdomain));
      |     ^~~~~~~~~~~~~~~~
gensio_python.h: At top level:
gensio_python.h:1480:2: warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
 1480 | };
      |  ^
gensio_wrap.c: In function '_wrap_gensio_read_s':
gensio_wrap.c:5691:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 5691 |     PyObject *r = PyInt_FromLong(*arg4);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function '_wrap_gensio_read_s_intr':
gensio_wrap.c:5766:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 5766 |     PyObject *r = PyInt_FromLong(*arg4);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function '_wrap_gensio_write_s':
gensio_wrap.c:5827:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 5827 |     PyObject *r = PyInt_FromLong(*arg2);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function '_wrap_gensio_write_s_intr':
gensio_wrap.c:5888:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 5888 |     PyObject *r = PyInt_FromLong(*arg2);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function '_wrap_gensio_accepter_accept_s_timeout':
gensio_wrap.c:7062:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 7062 |     PyObject *r = PyInt_FromLong(*arg3);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function '_wrap_gensio_accepter_accept_s_intr_timeout':
gensio_wrap.c:7182:19: error: initialization of 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 7182 |     PyObject *r = PyInt_FromLong(*arg3);
      |                   ^~~~~~~~~~~~~~
gensio_wrap.c: In function 'PyInit__gensio':
gensio_wrap.c:9614:20: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
 9614 |       Py_mod_exec, (void *)SWIG_mod_exec
      |                    ^
make[4]: *** [Makefile:672: gensio_wrap.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: link: x86_64-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libgensio_python_swig_la-gensio_python_swig.o   -Wl,-rpath -Wl,/<<PKGBUILDDIR>>/lib/.libs ../../lib/.libs/libgensio.so ../../lib/.libs/libgensioosh.so ../../lib/.libs/libgensiomdns.so -L/usr/lib/x86_64-linux-gnu -lpython3.14  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Werror=format-security -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed   -pthread -Wl,-soname -Wl,libgensio_python_swig.so.14 -o .libs/libgensio_python_swig.so.14.0.0
libtool: link: (cd ".libs" && rm -f "libgensio_python_swig.so.14" && ln -s "libgensio_python_swig.so.14.0.0" "libgensio_python_swig.so.14")
libtool: link: (cd ".libs" && rm -f "libgensio_python_swig.so" && ln -s "libgensio_python_swig.so.14.0.0" "libgensio_python_swig.so")
libtool: link: ar cr .libs/libgensio_python_swig.a  libgensio_python_swig_la-gensio_python_swig.o
libtool: link: ranlib .libs/libgensio_python_swig.a
libtool: link: ( cd ".libs" && rm -f "libgensio_python_swig.la" && ln -s "../libgensio_python_swig.la" "libgensio_python_swig.la" )
make[4]: Leaving directory '/<<PKGBUILDDIR>>/swig/python'
make[3]: *** [Makefile:497: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/swig'
make[2]: *** [Makefile:556: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:488: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j2 returned exit code 2
make: *** [debian/rules:21: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------