FS#49428 - [octave] fails to save in hdf5 format

Attached to Project: Arch Linux
Opened by Giuseppe Borzi (gborzi) - Saturday, 21 May 2016, 10:30 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 04 February 2017, 22:52 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: After the upgrade to hdf5 1.10 octave fails to save in hdf5 format, complaining that "the size of octave_hdf5_id is smaller than the size of HDF5 hid_t".
This bug has been reported in https://savannah.gnu.org/bugs/?47858 (I'm not the person that filled the bug).
I made a quick and dirty hack based on the above warning, i.e. added the following line in PKGBUILD, at the end of prepare():

sed -i -e 's/typedef int octave_hdf5_id/typedef long octave_hdf5_id/' libinterp/corefcn/oct-hdf5-id.h

Also, I prepended CPPFLAGS="$CPPFLAGS -DH5_USE_18_API" before ./configure in build(). See https://www.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html for details.
I don't know if this fix works for i686, not having an i686 system I'm unable to test it.


Additional info:
* package version(s): octave 4.0.2-1, hdf5-1.10.0-1
* config and/or log files etc.


Steps to reproduce:
in octave type:

>> m=rand(3,3);
>> save -hdf5 "pp.h5" m
warning: the size of octave_hdf5_id is smaller than the size of HDF5 hid_t
HDF5-DIAG: Error detected in HDF5 (1.10.0) thread 0:
#000: H5D.c line 121 in H5Dcreate2(): not a location ID
major: Invalid arguments to routine
minor: Inappropriate type
#001: H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
error: save: error while writing 'm' to hdf5 file
warning: save: no such variable 'm'

the file is created but loading it with the fixed octave reports

>> load -hdf5 "pp.h5"
>> m
m =

1x1 struct array containing the fields:

type
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 04 February 2017, 22:52 GMT
Reason for closing:  Fixed

Loading...