Bug#911609: libpdl-io-hdf5-perl: FTBFS with HDF5 1.10.3

2018-10-22 Thread Sebastiaan Couwenberg
Control: tags -1 pending

Hi Gilles,

Thanks for the patch, it's been committed in git and a new upload to
unstable will follow shortly.

The patch has also been forwarded upstream, but that issue has seen no
activity from upstream since it was created in 2016...

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



signature.asc
Description: OpenPGP digital signature


Bug#911609: libpdl-io-hdf5-perl: FTBFS with HDF5 1.10.3

2018-10-22 Thread Gilles Filippini
Source: libpdl-io-hdf5-perl
Version: 1:0.73-4
Severity: important
Tags: patch

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

libpdl-io-hdf5-perl FTBFS against HDF5 1.10.3 currently in experimental:
make[1]: Leaving directory '/<>'
   dh_auto_test -O--parallel
make -j5 test TEST_VERBOSE=1
make[1]: Entering directory '/<>'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- HDF5.bs 
blib/arch/auto/PDL/IO/HDF5/HDF5.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" 
"-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" 
t/*.t
HDF5-DIAG: Error detected in HDF5 (1.10.3) thread 140450522435520:
  #000: ../../../src/H5Ddeprec.c line 257 in H5Dextend(): unable to extend 
dataset
major: Dataset
minor: Unable to initialize object
  #001: ../../../src/H5Dint.c line 2603 in H5D__set_extent(): dataset has 
contiguous storage
major: Invalid arguments to routine
minor: Out of range
Error extending dataset in PDL::IO::HDF5::Dataset:set
 at t/attribPDL.t line 33.

#   Failed test at t/attribPDL.t line 67.
# Looks like you failed 1 test of 13.
t/attribPDL.t .
...

All failures are related to the error above, occuring during dataset creation.
As I undertand it, in dataset->set(), the dataset is first created, then
extended to store the data. In HDF5 1.10.3, dataset extension now relies on
H5D__set_extent() where we have:
/* Check if we are allowed to modify the space; only datasets with chunked 
and external storage are allowed to be modified */  
   
if(H5D_COMPACT == dset->shared->layout.type)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact 
storage")
if(H5D_CONTIGUOUS == dset->shared->layout.type && 0 == 
dset->shared->dcpl_cache.efl.nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous 
storage")

The attached patch fixes the failing tests by creating the datasets with the
option 'unlimited' to workaround the problem.

Thanks,

_g.

- -- System Information:
Distributor ID: PureOS
Description:PureOS GNU/Linux 8
Release:8
Codename:   green
Architecture: x86_64

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAlvN1GQACgkQ7+hsbH/+
z4OGVQf8CMu/FyaZn35Z63qmZ6fKGS+ba24kifwHexnAnbDCtU16V8wO/oykgJH0
qbdztqGexfRK6rrYcdb1tC2/P790CrPaTREUwMWqyYudOQpA24uX6SqaH4W2MbYX
KYe1YBG5KfaN5m7tUiAoMc5DtZOreo5jk/++77g9Ygx9BMm8LxjN9pVab41GD3VW
4ACyJFLt9Q6Iv2SC0jq91Ssb1+N3kbDT8Pm8ty645sMgoJhWxDV0wWroZe0cPAx8
ZbgXZ2vYf7k2TH5uLbblqvwgsngMB/uE+nwxvFqWXeR3wOqiJqSjXCdmeughqXZn
9XngiQEzBC+ihYL4LTnYkJStBarW6g==
=bbcn
-END PGP SIGNATURE-
diff -Nru libpdl-io-hdf5-perl-0.73/debian/changelog 
libpdl-io-hdf5-perl-0.73/debian/changelog
--- libpdl-io-hdf5-perl-0.73/debian/changelog   2018-07-22 19:38:40.0 
+0200
+++ libpdl-io-hdf5-perl-0.73/debian/changelog   2018-10-22 15:30:22.0 
+0200
@@ -1,3 +1,10 @@
+libpdl-io-hdf5-perl (1:0.73-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New patch to support HDF5-1.10.3
+
+ -- Gilles Filippini   Mon, 22 Oct 2018 15:30:22 +0200
+
 libpdl-io-hdf5-perl (1:0.73-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru libpdl-io-hdf5-perl-0.73/debian/patches/hdf5-1.10.3.patch 
libpdl-io-hdf5-perl-0.73/debian/patches/hdf5-1.10.3.patch
--- libpdl-io-hdf5-perl-0.73/debian/patches/hdf5-1.10.3.patch   1970-01-01 
01:00:00.0 +0100
+++ libpdl-io-hdf5-perl-0.73/debian/patches/hdf5-1.10.3.patch   2018-10-22 
15:02:03.0 +0200
@@ -0,0 +1,79 @@
+Index: libpdl-io-hdf5-perl-0.73/t/attribPDL.t
+===
+--- libpdl-io-hdf5-perl-0.73.orig/t/attribPDL.t
 libpdl-io-hdf5-perl-0.73/t/attribPDL.t
+@@ -30,7 +30,7 @@ my $group=$hdf5->group('Radiometric info
+ 
+ # Store a dataset
+ my $dataset=$group->dataset('SP_BT');
+-$dataset->set($bt);
++$dataset->set($bt, unlimited => 1);
+ 
+ # Store a scalar and pdl attribute
+ $dataset->attrSet('UNITS'=>'K');
+Index: libpdl-io-hdf5-perl-0.73/t/group.t
+===
+--- libpdl-io-hdf5-perl-0.73.orig/t/group.t
 libpdl-io-hdf5-perl-0.73/t/group.t
+@@ -78,7 +78,7 @@ my $dataset = new PDL::IO::HDF5::Dataset
+ my $pdl = sequence(5,4);
+ 
+ 
+-ok( $dataset->set($pdl) );
++ok( $dataset->set($pdl, unlimited => 1) );
+ # print "pdl written = \n".$pdl."\n";
+ 
+ 
+Index: libpdl-io-hdf5-perl-0.73/t/reference.t
+===
+--- libpdl-io-hdf5-perl-0.73.orig/t/reference.t
 libpdl-io-hdf5-perl-0.73/t/reference.t
+@@ -18,7 +18,7 @@ my