#1145354 gdcm: FTBFS with swig 4.5.0

Package:
src:gdcm
Source:
src:gdcm
Submitter:
Rafael Laboissière
Date:
2026-08-27 14:37:02 UTC
Severity:
normal
Tags:
#1145354#5
Date:
2026-08-24 12:35:20 UTC
From:
To:
Dear Maintainer,

The gdcm 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

[538/600] /usr/bin/x86_64-linux-gnu-g++ -Dgdcmswig_EXPORTS -I<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Source/Common -I<<BUILD-DIR>>/gdcm-3.0.24/Source/Common -I<<BUILD-DIR>>/gdcm-3.0.24/Source/DataStructur
eAndEncodingDefinition -I<<BUILD-DIR>>/gdcm-3.0.24/Source/InformationObjectDefinition -I<<BUILD-DIR>>/gdcm-3.0.24/Source/MediaStorageAndFileFormat -I<<BUILD-DIR>>/gdcm-3.0.24/Source/DataDictionary -I<<BUILD-DIR>
otection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -fPIC -MD -MT Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o -MF
Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o.d -o Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o -c <<BUILD-DIR>>/gdcm-3.0.
24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx
FAILED: [code=1] Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o
/usr/bin/x86_64-linux-gnu-g++ -Dgdcmswig_EXPORTS -I<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Source/Common -I<<BUILD-DIR>>/gdcm-3.0.24/Source/Common -I<<BUILD-DIR>>/gdcm-3.0.24/Source/DataStructureAndEncodi
ngDefinition -I<<BUILD-DIR>>/gdcm-3.0.24/Source/InformationObjectDefinition -I<<BUILD-DIR>>/gdcm-3.0.24/Source/MediaStorageAndFileFormat -I<<BUILD-DIR>>/gdcm-3.0.24/Source/DataDictionary -I<<BUILD-DIR>>/gdcm-3.0
.24/Source/MessageExchangeDefinition -I<<BUILD-DIR>>/gdcm-3.0.24/Wrapping/Python -I/usr/include/python3.14 -g -O2 -ffile-prefix-map=<<BUILD-DIR>>/gdcm-3.0.24=. -fstack-protector-strong -fstack-clash-protection -
Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -fPIC -MD -MT Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o -MF Wrapping/P
ython/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o.d -o Wrapping/Python/CMakeFiles/gdcmswig.dir/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx.o -c <<BUILD-DIR>>/gdcm-3.0.24/obj-x86
_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_DataElement_SetByteStringValue(PyObject*, PyObject*)’:
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:23137:12: error: ‘PyString_AsString’ was not declared in this scope
23137 |     arg2 = PyString_AsString(swig_obj[1]);
      |            ^~~~~~~~~~~~~~~~~
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:23141:25: error: ‘PyString_Size’ was not declared in this scope; did you mean ‘PyMapping_Size’?
23141 |     Py_ssize_t length = PyString_Size(swig_obj[1]);
      |                         ^~~~~~~~~~~~~
      |                         PyMapping_Size
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_Bitmap_GetDimensions(PyObject*, PyObject*)’:
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:32202:21: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’?
32202 |       PyObject *o = PyInt_FromLong((long) result[i]);
      |                     ^~~~~~~~~~~~~~
      |                     PyLong_FromLong
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_CSAElement_SetByteStringValue(PyObject*, PyObject*)’:
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:37910:12: error: ‘PyString_AsString’ was not declared in this scope
37910 |     arg2 = PyString_AsString(swig_obj[1]);
      |            ^~~~~~~~~~~~~~~~~
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:37914:25: error: ‘PyString_Size’ was not declared in this scope; did you mean ‘PyMapping_Size’?
37914 |     Py_ssize_t length = PyString_Size(swig_obj[1]);
      |                         ^~~~~~~~~~~~~
      |                         PyMapping_Size
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_ImageCodec_GetDimensions(PyObject*, PyObject*)’:
<<BUILD-DIR>>/gdcm-3.0.24/obj-x86_64-linux-gnu/Wrapping/Python/CMakeFiles/gdcmswig.dir/gdcmswigPYTHON_wrap.cxx:74406:21: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’?
74406 |       PyObject *o = PyInt_FromLong((long) result[i]);
      |                     ^~~~~~~~~~~~~~
      |                     PyLong_FromLong

#1145354#10
Date:
2026-08-24 12:43:52 UTC
From:
To:
I proposed a patch for fixing the issue as a merge request at Salsa:
https://salsa.debian.org/med-team/gdcm/-/merge_requests/5

Best,

Rafael Laboissière

#1145354#17
Date:
2026-08-27 14:22:01 UTC
From:
To:
Hello,

Bug #1145354 in gdcm reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/gdcm/-/commit/41d3be1856fc497016c7640c90dd46e215523ce0
------------------------------------------------------------------------
Add patch for fixing FTBFS with swig 4.5.0

Closes: #1145354
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1145354

#1145354#24
Date:
2026-08-27 14:34:07 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
gdcm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1145354@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <locutusofborg@debian.org> (supplier of updated gdcm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 27 Aug 2026 16:22:07 +0200
Source: gdcm
Built-For-Profiles: noudeb
Architecture: source
Version: 3.0.24-14
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Gianfranco Costamagna <locutusofborg@debian.org>
Closes: 1145354
Changes:
 gdcm (3.0.24-14) unstable; urgency=medium
 .
   * Team upload
 .
   [ Rafael Laboissière ]
   * Add patch for fixing FTBFS with swig 4.5.0 (Closes: #1145354)
Checksums-Sha1:
 bd3ce22de656b52c480f45d6bd67edf7957b4bae 3124 gdcm_3.0.24-14.dsc
 c5780cf2a4571bcce557ee43d9e0c32bf06ff979 291224 gdcm_3.0.24-14.debian.tar.xz
 1c144b13ffbbf54c0ba28bd65a198f7ef5d4279b 15275 gdcm_3.0.24-14_source.buildinfo
Checksums-Sha256:
 ae6705699fbe5486ce40feeca33c3dda7e422c505102f4fe3b3ab2b3c1bab3dc 3124 gdcm_3.0.24-14.dsc
 8126d21f7408ec5ceed6eec4c6d30f8a484fe04f1ca2d1452e6337b3b352bf10 291224 gdcm_3.0.24-14.debian.tar.xz
 811e0d1d151b59e1d848888fae8284045621bd3277ff86fdbce93f233822f501 15275 gdcm_3.0.24-14_source.buildinfo
Files:
 48953a426af390a111195e121e1d1f9e 3124 libs - gdcm_3.0.24-14.dsc
 3fe06ad78940279101a26a82fc823003 291224 libs - gdcm_3.0.24-14.debian.tar.xz
 26932f733eb6a4965f21145cb63ee44d 15275 libs - gdcm_3.0.24-14_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmqQSDcACgkQ808JdE6f
Xdm4Yw//fvc3mrdX4IqiqneRsd9JYeZJdmBtons0v/lCoBDsRIa0XFtb6uSkdDr2
XN8ip6w3lW4yLNNunqF6ihgnOd85AICJBTnl6FO5V3U7Tqx3Cbr8T0RAQhsecYFU
VanX0DCeoqUTCEaCAPX8g+tHwdaQGcqnMScI39OMMWafrf8D68+DGXwl2COLhGvk
/VtsGibVsVm+mVzlT7dgWZ8QnDSuU8O2D1oh2+WGNsyh9Uxm19Am0sH1Gn5gGhG2
rCen/bejjEOyh7Rb1Ze1quydDjcmH8yhE1Um7ji8v/ED9ssoVqd5jGv9pcQsOydo
PWKsqMFUPeBec58OJiFKOkSZZ1OUxleGE8Hi06xnhPIbffpCA1z2jpwPVKalVrwN
YJdniziRTy0f7iykiHwn7lb1NoR7dsbHHwfPvxbhwLYXnb13xeLxt2KLwlfS6Ak+
UI3JyCtnd0/h5LUY2E6c5rqzlcfJx9eVqJnPtlQtWrfLvI3SlNjXd2tlFz2ChKYI
wdxePvVdyxhit3VbChDEsp0qNIEukX/r3/xMi5HrrW939y8B9lMgabI9vZ8meOa/
+u1wS4oLrpCzQJUWPTwyML9oj2LwvhbJgQYdegtQqBBZmJyYbCIgprH7B/RwUCJs
cMbJv0GD54fFUn5OmVa6PAsMaUUEAL9AAj6hC3rm2Odsa9S3SWQ=
=ineG
-----END PGP SIGNATURE-----