Dear Maintainer,
As discussed with upstream in GDAL issue #15023 [0], it FTBFS since swig was updated to 4.5.0:
extensions/gdalconst_wrap.c:3239:10: fatal error: iostream: No such file or directory
3239 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
The issue seems to be that iostream is a C++ header but the file suggests C source.
The pycontainer patch seems to be the culprit:
"
I can't reproduce the issue with SWIG 4.5.0 built from official SWIG tarballs, but looking at https://salsa.debian.org/debian/swig/-/blob/debian/master/debian/patches/include-pycontainer.patch , I believe it is the reason of the failure as it unconditionnally includes a SWIG .swg file only meant for C++. This patch to the SWIG package looks wrong to me
"
[0] https://github.com/OSGeo/gdal/issues/15023
Kind Regards,
Nas
Control: tags -1 patch Dropping include-pycontainer.patch (e.g. as per the attached patch) is confirmed the fix the issue. Has the issue been discussed with upstream or the patch forwarded? They likely can suggest a better fix. I don't know if it's possible to make the include conditional for C++, that might be a good alternative too. Kind Regards, Bas
The attached patch does that and also resolves the GDAL build failure. Either of these patches should be forwarded upstream to get their input on the best solution. Kind Regards, Bas
We believe that the bug you reported is fixed in the latest version of
swig, 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 1144324@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Rafael Laboissière <rafael@debian.org> (supplier of updated swig 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: Sat, 15 Aug 2026 07:47:03 +0000
Source: swig
Architecture: source
Version: 4.5.0-2
Distribution: unstable
Urgency: medium
Maintainer: Torsten Landschoff <torsten@debian.org>
Changed-By: Rafael Laboissière <rafael@debian.org>
Closes: 1144324
Changes:
swig (4.5.0-2) unstable; urgency=medium
.
[ Bas Couwenberg ]
* d/p/include-pycontainer.patch: Include pycontainer.swg only for C++
(Closes: #1144324)
Checksums-Sha1:
b369f121143af897ad718f516fd27bf75f91b521 2182 swig_4.5.0-2.dsc
49ff274969e5ce637b5b89009dbe009a34bbcdcf 20052 swig_4.5.0-2.debian.tar.xz
Checksums-Sha256:
5ee1d257d595956fe4c9e15e194ffedc73be0b7ab6fdd3e8ab3a73c1af65e914 2182 swig_4.5.0-2.dsc
8b65721cdbf67b8dba1acb78c0a68b30a11b262c3605fa06d6dc6100134d8197 20052 swig_4.5.0-2.debian.tar.xz
Files:
33837f1a6142ae8fef03d19ce6e0dcb6 2182 interpreters optional swig_4.5.0-2.dsc
5f85be77a5759c1e1ab35bf7ba4f585c 20052 interpreters optional swig_4.5.0-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQJGBAEBCgAwFiEEP0ZDkUmP6HS9tdmPISSqGYN4XJAFAmqAH4gSHHJhZmFlbEBk
ZWJpYW4ub3JnAAoJECEkqhmDeFyQqcQQAJCBSqlGu7LzqGqVYZNJIms56fNJKShh
991GavaJsMcQhhXzCLtR2iwZWgmNxmV2R43EfoSG86ewOrQi1ZX1ULbeFpwZXTfP
tdsfvRJUuhrFu4xjIie4VwySybO2wfAFI7+pThAwW4tjhZ6xFAGk6MPhMHq6MT7T
ZlnZNwhJTcQQ9MZn42s/rjHb4xBqWu1km6Rp+gDhqwbJIGs4JEDRPihXBJRvYrfw
7VBge9CNi2wGbShMtp9KxTBeO47vCLIX0c3glO6nBcIiQkWdRRK6hA0PEkC48ZZq
hbqpSW2FNKS980TrOGLQQ11IChE7l7K4iCzgnQU2QGgexO17jl0mlK7BrqvhbE5E
jW1kISCDQn2Dm+DKy5+6zneoS7fp0p4oilDeRnESu/ZHI3izihNg98RtEIo7gcL8
Tu5nBjz/87r+u0fSnq9jCF0qjGx9Fjvhzl7QMftTF7j2mrtHhnTNClCGV2X4dtXO
bkI3CV3KRWqTPx2XE2OvwETtaqGl7JpV9ewfzVoUM1rH9rHPOsXsC8T8JzgwYO3u
INDggAvGHh4Eijos3To7g3LlQLS/Quwp8YZUSsrX879+Mt8OBc0IoM3NBynXVs+F
t4veNLaQVLfUHfmA81wx7bLLeWREVSJY6cZ6w72Te1GaZPF4fqzoMNnDddeayNZd
qjxViAMScCgR
=T5QT
-----END PGP SIGNATURE-----
* Sebastiaan Couwenberg <sebastic@debian.org> [2026-08-14 07:46]: Thanks for you patch. I committed it at your name [1] and released version 4.5.0-2 of the package. I hope there will not be other collateral effects. As you are already in contact with the upstream authors regarding this issue, could you please forward your patch to them? Best, Rafael Laboissière [1] https://salsa.debian.org/debian/swig/-/commit/2995208e6103b136aaaf7920c72732409bfe7562
I hope so too, that's why it's good to forward the patch upstream to get their feedback, there might be better ways to fix the issue reported in #1024555. To clarify, I was in contact with GDAL upstream, not SWIG upstream. I'd prefer if you forward the patch to SWIG upstream as you're in a better position to coordinate with them, I'd rather not be the man in the middle. If you are unable or unwilling to upstream the patch I can do that despite the drawbacks. Kind Regards, Bas
* Sebastiaan Couwenberg <sebastic@debian.org> [2026-08-15 12:58]: I introduced the patch in order to avoid the xdmf package to FTBFS. Your patch works with xdmf, at least, which depends on SWIG's C++ wrappers. Oh, my bad. You are right. I apologize for the confusion. Best, Rafael Laboissière