#1145860 unbound: FTBFS: ./pythonmod/interface.h:3372:43: error: implicit declaration of function 'PyString_FromString'; did you mean 'PyLong_FromString'? [-Wimplicit-function-declaration]

#1145860#5
Date:
2026-08-27 11:53:38 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:unbound, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
cp smallapp/unbound-control-setup.sh unbound-control-setup
chmod +x unbound-control-setup
/usr/bin/swig -python -o libunbound/python/libunbound_wrap.c -I. -I../.. -I/usr/include/python3.14 -DPY_MAJOR_VERSION=3 ../../libunbound/python/libunbound.i
touch util/configparser.h
./libtool --tag=CC --mode=compile x86_64-linux-gnu-gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I../.. -I/usr/include/python3.14 -DSRCDIR=../.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffile-prefix-map=../../= -pthread  -o pythonmod.lo -c ../../pythonmod/pythonmod.c
libtool: compile:  x86_64-linux-gnu-gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I../.. -I/usr/include/python3.14 -DSRCDIR=../.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffile-prefix-map=../../= -pthread -c ../../pythonmod/pythonmod.c  -fPIC -DPIC -o .libs/pythonmod.o
In file included from ../../pythonmod/pythonmod.c:145:
./pythonmod/interface.h: In function 'GetNameAsLabelList':
./pythonmod/interface.h:3372:43: error: implicit declaration of function 'PyString_FromString'; did you mean 'PyLong_FromString'? [-Wimplicit-function-declaration]
 3372 |                 PyList_SetItem(list, cnt, PyString_FromString(buf));
      |                                           ^~~~~~~~~~~~~~~~~~~
      |                                           PyLong_FromString
./pythonmod/interface.h:3372:43: error: passing argument 3 of 'PyList_SetItem' makes pointer from integer without a cast [-Wint-conversion]
 3372 |                 PyList_SetItem(list, cnt, PyString_FromString(buf));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                           |
      |                                           int
In file included from /usr/include/python3.14/Python.h:92,
                 from ../../pythonmod/pythonmod.c:54:
/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 *);
      |                                                        ^~~~~~~~~~
In file included from /usr/include/python3.14/Python.h:64:
./pythonmod/interface.h: In function 'CharArrayAsStringList':
/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/listobject.h:50:50: note: in expansion of macro '_PyObject_CAST'
   50 |     PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
      |                                                  ^~~~~~~~~~~~~~
./pythonmod/interface.h:3389:13: note: in expansion of macro 'PyList_SET_ITEM'
 3389 |             PyList_SET_ITEM(list, i, PyString_FromString(array[i]));
      |             ^~~~~~~~~~~~~~~
./pythonmod/interface.h: In function 'dnameAsStr':
./pythonmod/interface.h:3740:15: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 3740 |        return PyString_FromString(buf);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_get_data_rr_len':
./pythonmod/interface.h:3980:16: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration]
 3980 |         return PyInt_FromLong(d->rr_len[idx]);
      |                ^~~~~~~~~~~~~~
      |                PyLong_FromLong
./pythonmod/interface.h:3980:16: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 3980 |         return PyInt_FromLong(d->rr_len[idx]);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_get_data_rr_ttl':
./pythonmod/interface.h:3992:16: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 3992 |         return PyInt_FromLong(d->rr_ttl[idx]);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_sockaddr_storage_port':
./pythonmod/interface.h:4114:20: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 4114 |             return PyInt_FromLong(ntohs(sa4->sin_port));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h:4119:20: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 4119 |             return PyInt_FromLong(ntohs(sa6->sin6_port));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_sockaddr_storage_flowinfo':
./pythonmod/interface.h:4133:16: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 4133 |         return PyInt_FromLong(ntohl(sa6->sin6_flowinfo));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_sockaddr_storage_scope_id':
./pythonmod/interface.h:4144:16: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 4144 |         return PyInt_FromLong(ntohl(sa6->sin6_scope_id));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function '_edns_option_opt_code_get':
./pythonmod/interface.h:4150:16: error: returning 'int' from a function with return type 'PyObject *' {aka 'struct _object *'} makes pointer from integer without a cast [-Wint-conversion]
 4150 |         return PyInt_FromLong(opt_code);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
./pythonmod/interface.h: In function 'python_inplace_cb_reply_generic':
./pythonmod/interface.h:4557:19: error: implicit declaration of function 'PyInt_AsLong'; did you mean 'PyLong_AsLong'? [-Wimplicit-function-declaration]
 4557 |             res = PyInt_AsLong(result);
      |                   ^~~~~~~~~~~~
      |                   PyLong_AsLong
../../pythonmod/pythonmod.c: In function 'log_py_err':
../../pythonmod/pythonmod.c:249:14: error: implicit declaration of function 'PyString_Check'; did you mean 'PyMapping_Check'? [-Wimplicit-function-declaration]
  249 |         if (!PyString_Check(obResult) && !PyUnicode_Check(obResult)) {
      |              ^~~~~~~~~~~~~~
      |              PyMapping_Check
../../pythonmod/pythonmod.c:256:26: error: implicit declaration of function 'PyString_AsString' [-Wimplicit-function-declaration]
  256 |                 result = PyString_AsString(obResult);
      |                          ^~~~~~~~~~~~~~~~~
../../pythonmod/pythonmod.c:256:24: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  256 |                 result = PyString_AsString(obResult);
      |                        ^
../../pythonmod/pythonmod.c: In function 'pythonmod_init':
../../pythonmod/pythonmod.c:453:10: error: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  453 |    fname = PyString_FromString(pe->fname);
      |          ^
touch dnstap/dnstap.pb-c.h
./libtool --tag=CC --mode=compile x86_64-linux-gnu-gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I../.. -I/usr/include/python3.14 -DSRCDIR=../.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffile-prefix-map=../../= -pthread  -o libunbound_wrap.lo -c libunbound/python/libunbound_wrap.c
make[4]: *** [Makefile:322: pythonmod.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-linux-gnu-gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I../.. -I/usr/include/python3.14 -DSRCDIR=../.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffile-prefix-map=../../= -pthread -c libunbound/python/libunbound_wrap.c  -fPIC -DPIC -o .libs/libunbound_wrap.o
libtool: compile:  x86_64-linux-gnu-gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I../.. -I/usr/include/python3.14 -DSRCDIR=../.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffile-prefix-map=../../= -pthread -c libunbound/python/libunbound_wrap.c -o libunbound_wrap.o >/dev/null 2>&1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/b/unbound'
make[3]: *** [debian/rules:75: b/unbound/build-stamp] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: *** [debian/rules:55: build] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:55: install] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:55: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------