[From nobody Thu Mar 26 15:21:06 2026
Received: (at submit) by bugs.debian.org; 7 Jan 2026 14:05:57 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-10.9 required=4.0 tests=BAYES_00,FOURLA,
 FROMDEVELOPER,FVGT_m_MULTI_ODD,HEADER_FROM_DIFFERENT_DOMAINS,
 PGPSIGNATURE,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
 RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,
 SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 94; hammy, 150; neutral, 227; spammy,
 0. spammytokens: hammytokens:0.000-+--sk:taint_o,
 0.000-+--sk:TAINT_O, 
 0.000-+--cmake, 0.000-+--sk:taint_u, 0.000-+--sk:TAINT_U
Return-path: &lt;SRS0=8Q8j=7M=debian.org=pini@bou-fi.net&gt;
Received: from mail.bou-fi.net ([51.255.91.82]:32914)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;SRS0=8Q8j=7M=debian.org=pini@bou-fi.net&gt;)
 id 1vdUAe-002i0a-2M for submit@bugs.debian.org;
 Wed, 07 Jan 2026 14:05:57 +0000
Content-Type: multipart/mixed; boundary=&quot;===============1870307732897142776==&quot;
Authentication-Results: mail.bou-fi.net;
 auth=pass smtp.mailfrom=pini@debian.org
MIME-Version: 1.0
From: Gilles Filippini &lt;pini@debian.org&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: wscript: support cmake built HDF5 and fix HDF5+MPI detection
Message-ID: &lt;176779006150.12523.16815149334613091188.reportbug@pinibrem14&gt;
Date: Wed, 07 Jan 2026 13:47:41 +0100
X-Spamd-Bar: --
X-Greylist: delayed 2399 seconds by postgrey-1.37 at buxtehude;
 Wed, 07 Jan 2026 14:05:56 UTC
Delivered-To: submit@bugs.debian.org

This is a multi-part MIME message sent by reportbug.


--===============1870307732897142776==
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Source: xmds2
Version: 3.1.0+dfsg2-11
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

While testing the build of xmds2 against cmake built HDF5 (1.14.6
currently in experimental) I noticed a couple if issues regarding HDF5
detection by the wscript tool.

Firstly, it extracts the HDF5 libpath from the full path of HDF5 static
library returned by 'h5cc -show -noshlib'. While it works currently,
it doesn't work with a cmake built HDF5 where the h5cc output comes
from pkg-config.

I propose to parse the -L link option from 'h5cc -show -shlib' instead
which works in both cases.

Secondly the HDF5 detection with MPI is not correct as is uses 'h5cc'
instead of 'h5pcc'. 

Please see the attached patch proposal which should fix both issues. I've
tested it against autotools built HDF5 1.14.5 in unstable and cmake built
HDF5 1.14.6 in experimental.

Best,
_g.

- -- System Information:
Debian Release: 12.0
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-34-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAmleVeQACgkQ7+hsbH/+
z4MYGQgAiyGpyeFO+VQ4IsMiHEuemFRu+morkQQf+zdGPUP2oVacWtAjeEfv3mlf
TM/XPsZSwb+ilY9YHWP4f9V+FY++m1n6bQM+zwSKIaR7CTwKPPcy8Ie36iDhokIp
1nDe6VrR4Ih9pn3PleKZts6Dzp5TEZT6m2ReUSMdXkk1FCg3dNPlBb57EXkhS7PU
/P2MwaSVmIR0/pplczcVBilJMZTWzbhkZjgzBrGRt0evYTntHQrGkbB1iz/4ikpZ
vpdQmWkzbR2CTYwu8PYf8ap23Tg/zQfKrtq2opYWm7lpBAz25/SNR0gCKCrJuGiZ
dsNIQdEJH4nlCE6z+GrdvutGbJF9HQ==
=EQzW
-----END PGP SIGNATURE-----

--===============1870307732897142776==
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=&quot;xmds2.debdiff&quot;

diff -Nru xmds2-3.1.0+dfsg2/debian/changelog xmds2-3.1.0+dfsg2/debian/changelog
--- xmds2-3.1.0+dfsg2/debian/changelog	2025-09-26 15:19:18.000000000 +0200
+++ xmds2-3.1.0+dfsg2/debian/changelog	2026-01-07 10:38:44.000000000 +0100
@@ -1,3 +1,13 @@
+xmds2 (3.1.0+dfsg2-11.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New patches for wscript:
+    - support for cmake built HDF5
+    - use the correct MPI HDF5 variant when building with MPI
+  * The last item above requires libhdf5-mpi-dev as build dependency
+
+ -- Gilles Filippini &lt;pini@debian.org&gt;  Wed, 07 Jan 2026 10:38:44 +0100
+
 xmds2 (3.1.0+dfsg2-11) unstable; urgency=medium
 
   * d/control:
diff -Nru xmds2-3.1.0+dfsg2/debian/control xmds2-3.1.0+dfsg2/debian/control
--- xmds2-3.1.0+dfsg2/debian/control	2025-09-26 15:19:18.000000000 +0200
+++ xmds2-3.1.0+dfsg2/debian/control	2026-01-07 10:38:44.000000000 +0100
@@ -12,6 +12,7 @@
                libfftw3-mpi-dev &lt;!nocheck&gt;,
                libgsl-dev &lt;!nocheck&gt;,
                libhdf5-dev &lt;!nocheck&gt;,
+               libhdf5-mpi-dev &lt;!nocheck&gt;,
                libopenblas-dev | libblis-dev &lt;!nocheck&gt;,
                mpi-default-bin &lt;!nocheck&gt;,
                mpi-default-dev &lt;!nocheck&gt;,
diff -Nru xmds2-3.1.0+dfsg2/debian/patches/series xmds2-3.1.0+dfsg2/debian/patches/series
--- xmds2-3.1.0+dfsg2/debian/patches/series	2025-09-26 15:19:18.000000000 +0200
+++ xmds2-3.1.0+dfsg2/debian/patches/series	2026-01-07 10:38:44.000000000 +0100
@@ -14,3 +14,5 @@
 invalid-escape-sequences.patch
 replace-deprecated-distutils.patch
 auto-gitignore
+wscript-hdf5-cmake-support.patch
+wscript-hdf5-mpi-support.patch
diff -Nru xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-cmake-support.patch xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-cmake-support.patch
--- xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-cmake-support.patch	1970-01-01 01:00:00.000000000 +0100
+++ xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-cmake-support.patch	2026-01-07 10:38:44.000000000 +0100
@@ -0,0 +1,19 @@
+Description: fix the weird way wscript has to find out the HDF5 libpath
+ It should relies on the standard -L link flag instead of the broken
+ way the autotools generated h5cc tool handles static linking.
+ .
+ BTW this fix adds support for the cmake built HDF5 1.14.6 currently in
+ experimental. 
+Index: xmds2-3.1.0+dfsg2/xpdeint/support/wscript
+===================================================================
+--- xmds2-3.1.0+dfsg2.orig/xpdeint/support/wscript
++++ xmds2-3.1.0+dfsg2/xpdeint/support/wscript
+@@ -401,7 +401,7 @@ def configure(conf):
+             h5cc_shared_flags = conf.cmd_and_log([conf.env['H5CC'][0], '-show', '-shlib'])
+             h5cc_static_flags = conf.cmd_and_log([conf.env['H5CC'][0], '-show', '-noshlib'])
+             
+-            hdf5_libpath = re.search(r'(\S*)/libhdf5\.a', h5cc_static_flags).group(1)
++            hdf5_libpath = re.search(r'\s-L(\S+)', h5cc_shared_flags).group(1)
+             
+             conf.env.append_unique(&quot;LIBPATH_hdf5&quot;, hdf5_libpath)
+             
diff -Nru xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-mpi-support.patch xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-mpi-support.patch
--- xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-mpi-support.patch	1970-01-01 01:00:00.000000000 +0100
+++ xmds2-3.1.0+dfsg2/debian/patches/wscript-hdf5-mpi-support.patch	2026-01-07 10:38:44.000000000 +0100
@@ -0,0 +1,27 @@
+Description: When building for the MPI variant of HDF5 the helper should
+ be 'h5pcc' ('p' for 'parallel') instead of 'h5cc' which relates to the
+ serial variant.
+Index: xmds2-3.1.0+dfsg2/xpdeint/support/wscript
+===================================================================
+--- xmds2-3.1.0+dfsg2.orig/xpdeint/support/wscript
++++ xmds2-3.1.0+dfsg2/xpdeint/support/wscript
+@@ -397,9 +397,16 @@ def configure(conf):
+         )
+         
+         # Check for hdf5
+-        if conf.find_program('h5cc', var='H5CC', mandatory = False):
+-            h5cc_shared_flags = conf.cmd_and_log([conf.env['H5CC'][0], '-show', '-shlib'])
+-            h5cc_static_flags = conf.cmd_and_log([conf.env['H5CC'][0], '-show', '-noshlib'])
++        if conf.env['ENVIRONMENT_NAME'] == 'default':
++            hdf5_helper = 'h5cc'
++            hdf5_helper_var = 'H5CC'
++        else:
++            hdf5_helper = 'h5pcc'
++            hdf5_helper_var = 'H5PCC'
++
++        if conf.find_program(f'{hdf5_helper}', var=hdf5_helper_var, mandatory = False):
++            h5cc_shared_flags = conf.cmd_and_log([conf.env[hdf5_helper_var][0], '-show', '-shlib'])
++            h5cc_static_flags = conf.cmd_and_log([conf.env[hdf5_helper_var][0], '-show', '-noshlib'])
+             
+             hdf5_libpath = re.search(r'\s-L(\S+)', h5cc_shared_flags).group(1)
+             

--===============1870307732897142776==--
]