Control: tags -1 + patch

Hi,

Gilles Filippini a écrit le 09/06/2026 à 11:57 :
Source: haskell-hdf5
Version: 1.8.15-1
Severity: important
Tags: ftbfs

Hi,

During a test rebuild of HDF5's reverse dependcies against HDF5 2.1.0
currently in experimental, haskell-hdf5 FTBFS with:

src/Bindings/HDF5/Datatype.hs:183:13: error: [GHC-88464]
     Variable not in scope:
       h5t_decode :: InArray CChar -> IO Bindings.HDF5.Raw.H5I.HId_t
     Suggested fix:
       Perhaps use one of these:
         ‘h5p_decode’ (imported from Bindings.HDF5.Raw.H5P),
         ‘h5t_decode1’ (imported from Bindings.HDF5.Raw.H5T),
         ‘h5t_encode’ (imported from Bindings.HDF5.Raw.H5T)
     |
183 |             h5t_decode (InArray buf)
     |             ^^^^^^^^^^


H5Tdecode() was deprecated starting with HDF5 2.0.0. I'm not familiar
at all with Haskell so I don't have any clue how to patch haskell-hdf5
so that it builds correctly against HDF5 1.14.6 in unstable and HDF5
2.1.0 in experimental.
Please review the attached patch.

Thanks,
_g.
diff -Nru haskell-hdf5-1.8.15/debian/changelog 
haskell-hdf5-1.8.15/debian/changelog
--- haskell-hdf5-1.8.15/debian/changelog        2026-01-11 21:19:24.000000000 
+0100
+++ haskell-hdf5-1.8.15/debian/changelog        2026-06-20 13:19:39.000000000 
+0200
@@ -1,3 +1,10 @@
+haskell-hdf5 (1.8.15-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * HDF5 2.1.0 support (closes: #1139497)
+
+ -- Gilles Filippini <[email protected]>  Sat, 20 Jun 2026 13:19:39 +0200
+
 haskell-hdf5 (1.8.15-1) unstable; urgency=medium
 
   * Build using dh-haskell
diff -Nru haskell-hdf5-1.8.15/debian/patches/hdf5-2.1.0.patch 
haskell-hdf5-1.8.15/debian/patches/hdf5-2.1.0.patch
--- haskell-hdf5-1.8.15/debian/patches/hdf5-2.1.0.patch 1970-01-01 
01:00:00.000000000 +0100
+++ haskell-hdf5-1.8.15/debian/patches/hdf5-2.1.0.patch 2026-06-20 
13:19:39.000000000 +0200
@@ -0,0 +1,27 @@
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5T.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5T.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5T.hsc
+@@ -694,7 +694,21 @@ h5t_MIPS_F64 = h5t_IEEE_F64BE
+ -- or negative on failure.
+ --
+ -- > hid_t H5Tdecode(const void *buf);
+-#ccall H5Tdecode, InArray a -> IO <hid_t>
++#if defined(H5Tdecode_vers)
++# ccall H5Tdecode1, InArray a -> IO <hid_t>
++# ccall H5Tdecode2, InArray a -> <size_t> -> IO <hid_t>
++# if H5Tdecode_vers == 1
++h5t_decode :: InArray a -> IO HId_t
++h5t_decode = h5t_decode1
++# elif H5Tdecode_vers == 2
++h5t_decode :: InArray a -> Size_t -> IO HId_t
++h5t_decode = h5t_decode2
++# else
++#  error TODO
++# endif
++#else
++# ccall H5Tdecode, InArray a -> IO <hid_t>
++#endif
+ 
+ -- > herr_t H5Tflush(hid_t type_id);
+ #ccall H5Tflush, <hid_t> -> IO <herr_t>
diff -Nru haskell-hdf5-1.8.15/debian/patches/series 
haskell-hdf5-1.8.15/debian/patches/series
--- haskell-hdf5-1.8.15/debian/patches/series   2026-01-11 21:19:24.000000000 
+0100
+++ haskell-hdf5-1.8.15/debian/patches/series   2026-06-20 13:19:39.000000000 
+0200
@@ -1 +1,2 @@
 no-rts-n
+hdf5-2.1.0.patch

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to