Bug#1144324: swig: Causes GDAL to FTBFS

Sebastiaan Couwenberg <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.rc
Message-ID <[email protected]>
On 8/14/26 6:53 AM, Sebastiaan Couwenberg wrote:
> On 8/13/26 8:21 PM, Bas Couwenberg wrote:
>> 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
>> "
> 
> 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.

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

-- 
  PGP Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
0001-Include-pycontainer.swg-only-for-C.patch (text/x-patch, 1.7 KB)
From 48b597bbc486bcd6e130910d0055edc55acd53f0 Mon Sep 17 00:00:00 2001
From: Bas Couwenberg <[email protected]>
Date: Fri, 14 Aug 2026 07:24:07 +0200
Subject: Include pycontainer.swg only for C++.

---
 debian/changelog                         | 7 +++++++
 debian/patches/include-pycontainer.patch | 8 +++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a445207c2..4397d0389 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+swig (4.5.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Include pycontainer.swg only for C++.
+
+ -- Bas Couwenberg <[email protected]>  Fri, 14 Aug 2026 07:22:12 +0200
+
 swig (4.5.0-1) unstable; urgency=medium
 
   * New upstream version 4.5.0
diff --git a/debian/patches/include-pycontainer.patch b/debian/patches/include-pycontainer.patch
index 0cfc9ae9b..5ecc7a7d0 100644
--- a/debian/patches/include-pycontainer.patch
+++ b/debian/patches/include-pycontainer.patch
@@ -7,9 +7,9 @@ Author: Rafael Laboissière <[email protected]>
 Forwarded: no
 Last-Modified: 2026-08-12
 
---- swig-4.5.0.orig/Lib/python/python.swg
-+++ swig-4.5.0/Lib/python/python.swg
-@@ -55,3 +55,9 @@
+--- a/Lib/python/python.swg
++++ b/Lib/python/python.swg
+@@ -55,3 +55,11 @@
   * For backward compatibility
   * ------------------------------------------------------------ */
  %include <pybackward.swg>
@@ -18,4 +18,6 @@ Last-Modified: 2026-08-12
 + * This seems to be necessary to build the Debian package xdmf.
 + * See Bug#1024555 (https://bugs.debian.org/1024555)
 + * ------------------------------------------------------------ */
++#ifdef __cplusplus
 +%include <pycontainer.swg>
++#endif
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.