#1144980 apbs: FTBFS with swig 4.5.0

Package:
src:apbs
Source:
src:apbs
Submitter:
Rafael Laboissière
Date:
2026-08-21 06:49:01 UTC
Severity:
normal
Tags:
#1144980#5
Date:
2026-08-21 06:37:26 UTC
From:
To:
Dear Maintainer,

The apbs package FTBFS with swig 4.5.0, which is currently in unstable. An excerpt of the build log is shown below.

This is due to the removal of the Python 2 compatibility macros in version 4.5.0. According to the SWIG authors, these macros were retained in the generated code (pyhead.swg) solely for user typemaps. Any typemap using these macros must be updated to call the Python 3 C API directly.

Best,

Rafael Laboissière

##### Build log excerpt

[ 99%] Linking C executable ../bin/coulomb
cd /home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/manip && /usr/bin/cmake -E cmake_link_script CMakeFiles/coulomb.dir/link.txt --verbose=1
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c: In function ‘parseInputFromString’:
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3656:15: error: implicit declaration of function ‘PyString_Size’; did you mean ‘PyMa
pping_Size’? [-Wimplicit-function-declaration]
 3656 |     bufsize = PyString_Size(string);
      |               ^~~~~~~~~~~~~
      |               PyMapping_Size
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3661:23: error: implicit declaration of function ‘PyString_AsString’ [-Wimplicit-fun
ction-declaration]
 3661 |     Vio_bufTake(sock, PyString_AsString(string), bufsize);
      |                       ^~~~~~~~~~~~~~~~~
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3661:23: error: passing argument 2 of ‘Vio_bufTake’ makes pointer from integer witho
ut a cast [-Wint-conversion]
 3661 |     Vio_bufTake(sock, PyString_AsString(string), bufsize);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       int
In file included from /usr/include/maloc/vsys.h:38,
                 from /usr/include/maloc/maloc.h:40,
                 from /home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3258:
/usr/include/maloc/vio.h:364:44: note: expected ‘char *’ but argument is of type ‘int’
  364 | VEXTERNC void Vio_bufTake(Vio *thee, char *buf, int bufsize);
      |                                      ~~~~~~^~~
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c: In function ‘getForces’:
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3819:10: error: implicit declaration of function ‘PyString_FromString’; did you mean
 ‘PyLong_FromString’? [-Wimplicit-function-declaration]
 3819 |     qf = PyString_FromString("qf");
      |          ^~~~~~~~~~~~~~~~~~~
      |          PyLong_FromString
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3819:8: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes
pointer from integer without a cast [-Wint-conversion]
 3819 |     qf = PyString_FromString("qf");
      |        ^
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3820:8: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes
pointer from integer without a cast [-Wint-conversion]
 3820 |     db = PyString_FromString("db");
      |        ^
/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu/tools/python/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c:3821:8: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes
pointer from integer without a cast [-Wint-conversion]
 3821 |     ib = PyString_FromString("ib");
      |        ^
make[3]: *** [tools/python/CMakeFiles/_apbslib.dir/build.make:82: tools/python/CMakeFiles/_apbslib.dir/CMakeFiles/_apbslib.dir/apbslibPYTHON_wrap.c.o] Error 1
make[3]: Leaving directory '/home/rafael/automate/swig-4.5.0/tmp/apbs-3.4.1/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:1995: tools/python/CMakeFiles/_apbslib.dir/all] Error 2

#1144980#10
Date:
2026-08-21 06:46:41 UTC
From:
To:
I proposed a patch for fixing the issue as a merge request at Salsa:
https://salsa.debian.org/debichem-team/apbs/-/merge_requests/1

Best,

Rafael Laboissière