Bug#1139497: haskell-hdf5: FTBFS against HDF5 2.1.0 - Variable not in scope: h5t_decode
Gilles Filippini
pini at debian.org
Sat Jun 20 14:51:12 BST 2026
Gilles Filippini a écrit le 20/06/2026 à 13:47 :
> 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.
Patch updated to fix hkl FTBFS.
Best,
_g.
-------------- next part --------------
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 <pini at debian.org> 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,184 @@
+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>
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Core.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/Core.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Core.hsc
+@@ -15,15 +15,17 @@ import Bindings.HDF5.Raw.H5I
+
+ import Foreign.Ptr.Conventions
+
+-#mangle_ident "H5FD_CORE"
++#if defined(H5FD_core_init)
++# mangle_ident "H5FD_CORE"
+ :: HId_t
+-#mangle_ident "H5FD_CORE"
++# mangle_ident "H5FD_CORE"
+ = unsafePerformIO (#mangle_ident "H5FD_core_init")
+
+ -- |Initialize this driver by registering the driver with the library.
+ --
+ -- > hid_t H5FD_core_init(void);x
+-#ccall H5FD_core_init, IO <hid_t>
++# ccall H5FD_core_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+ -- |Shut down the VFD.
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Family.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/Family.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Family.hsc
+@@ -25,15 +25,17 @@ import Bindings.HDF5.Raw.H5
+ import Bindings.HDF5.Raw.H5I
+ import Foreign.Ptr.Conventions
+
+-#mangle_ident "H5FD_FAMILY"
++#if defined(H5FD_family_init)
++# mangle_ident "H5FD_FAMILY"
+ :: HId_t
+-#mangle_ident "H5FD_FAMILY"
++# mangle_ident "H5FD_FAMILY"
+ = unsafePerformIO (#mangle_ident "H5FD_family_init")
+
+ -- |Initialize this driver by registering the driver with the library.
+ --
+ -- > hid_t H5FD_family_init(void);
+-#ccall H5FD_family_init, IO <hid_t>
++# ccall H5FD_family_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+ -- |Shut down the VFD.
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Log.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/Log.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Log.hsc
+@@ -18,10 +18,12 @@ import System.IO.Unsafe (unsafePerformIO
+ import Bindings.HDF5.Raw.H5
+ import Bindings.HDF5.Raw.H5I
+
+-#mangle_ident "H5FD_LOG"
++#if defined(H5FD_family_init)
++# mangle_ident "H5FD_LOG"
+ :: HId_t
+-#mangle_ident "H5FD_LOG"
++# mangle_ident "H5FD_LOG"
+ = unsafePerformIO (#mangle_ident "H5FD_log_init")
++#endif
+
+ -- * Flags for 'h5p_set_fapl_log'
+
+@@ -62,7 +64,9 @@ import Bindings.HDF5.Raw.H5I
+ -- |Initialize this driver by registering the driver with the library.
+ --
+ -- > hid_t H5FD_log_init(void);
+-#ccall H5FD_log_init, IO <hid_t>
++#if defined(H5FD_family_init)
++# ccall H5FD_log_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+ -- |Shut down the VFD.
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
+@@ -16,9 +16,10 @@ import Bindings.HDF5.Raw.H5I
+ import Bindings.HDF5.Raw.H5FD
+ import Foreign.Ptr.Conventions
+
+-#mangle_ident "H5FD_MULTI"
++#if defined(H5FD_multi_init)
++# mangle_ident "H5FD_MULTI"
+ :: HId_t
+-#mangle_ident "H5FD_MULTI"
++# mangle_ident "H5FD_MULTI"
+ = unsafePerformIO (#mangle_ident "H5FD_multi_init")
+
+ -- |Initialize this driver by registering the driver with the library.
+@@ -27,7 +28,8 @@ import Foreign.Ptr.Conventions
+ -- returns a negative value.
+ --
+ -- > hid_t H5FD_multi_init(void);
+-#ccall H5FD_multi_init, IO <hid_t>
++# ccall H5FD_multi_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+ -- Shut down the VFD
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
+@@ -15,15 +15,17 @@ import System.IO.Unsafe (unsafePerformIO
+ import Bindings.HDF5.Raw.H5
+ import Bindings.HDF5.Raw.H5I
+
+-#mangle_ident "H5FD_SEC2"
++#if defined(H5FD_sec2_init)
++# mangle_ident "H5FD_SEC2"
+ :: HId_t
+-#mangle_ident "H5FD_SEC2"
++# mangle_ident "H5FD_SEC2"
+ = unsafePerformIO (#mangle_ident "H5FD_sec2_init")
+
+ -- |Initialize this driver by registering the driver with the library.
+ --
+ -- > hid_t H5FD_sec2_init(void);
+-#ccall H5FD_sec2_init, IO <hid_t>
++# ccall H5FD_sec2_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+ -- |Shut down the VFD.
+Index: haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
+===================================================================
+--- haskell-hdf5-1.8.15.orig/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
++++ haskell-hdf5-1.8.15/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
+@@ -9,15 +9,17 @@ import System.IO.Unsafe (unsafePerformIO
+ import Bindings.HDF5.Raw.H5
+ import Bindings.HDF5.Raw.H5I
+
+-#mangle_ident "H5FD_STDIO"
++#if defined(H5FD_stdio_init)
++# mangle_ident "H5FD_STDIO"
+ :: HId_t
+-#mangle_ident "H5FD_STDIO"
++# mangle_ident "H5FD_STDIO"
+ = unsafePerformIO (#mangle_ident "H5FD_stdio_init")
+
+ -- |Initialize this driver by registering the driver with the library.
+ --
+ -- > hid_t H5FD_stdio_init(void);
+-#ccall H5FD_stdio_init, IO <hid_t>
++# ccall H5FD_stdio_init, IO <hid_t>
++#endif
+
+ #if H5_VERSION_LE(1,8,18)
+
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 2025-02-19 04:45:44.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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20260620/558ab937/attachment-0001.sig>
More information about the Pkg-haskell-maintainers
mailing list