tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
335 stars 97 forks source link

Build fails due to changes in HDF5 v 1.10 #37

Closed robertsawko closed 8 years ago

robertsawko commented 8 years ago

This may be rushing things a little, but I am building on the latest Arch Linux update and I run into an error that I post below.

matio had been building previously, so I assume that there must have been a change in HDF5. I can confirm that if I downgrade to 1.8 it works fine.

I expect this to be an issue with matio being deployed on different systems, but would it be possible to get a new branch?

mat73.c: In function ‘Mat_H5ReadDatasetInfo’:
mat73.c:610:60: error: incompatible type for argument 3 of ‘H5Rdereference2’
                 ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                                                            ^~~~~~~
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:610:26: error: too few arguments to function ‘H5Rdereference2’
                 ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                          ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
mat73.c: In function ‘Mat_H5ReadGroupInfo’:
mat73.c:909:49: error: incompatible type for argument 3 of ‘H5Rdereference2’
                                                 ref_ids+l);
                                                 ^~~~~~~
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:908:34: error: too few arguments to function ‘H5Rdereference2’
                         ref_id = H5Rdereference(field_id,H5R_OBJECT,
                                  ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
mat73.c: In function ‘Mat_H5ReadNextReferenceInfo’:
mat73.c:1070:68: error: incompatible type for argument 3 of ‘H5Rdereference2’
                         ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                                                                    ^~~~~~~
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:1070:34: error: too few arguments to function ‘H5Rdereference2’
                         ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                                  ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
mat73.c: In function ‘Mat_VarRead73’:
mat73.c:2271:60: error: incompatible type for argument 3 of ‘H5Rdereference2’
                 dset_id = H5Rdereference(ref_id,H5R_OBJECT,&matvar->internal->hdf5_ref);
                                                            ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:2271:27: error: too few arguments to function ‘H5Rdereference2’
                 dset_id = H5Rdereference(ref_id,H5R_OBJECT,&matvar->internal->hdf5_ref);
                           ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
mat73.c: In function ‘Mat_VarReadData73’:
mat73.c:2526:60: error: incompatible type for argument 3 of ‘H5Rdereference2’
                 dset_id = H5Rdereference(ref_id,H5R_OBJECT,&matvar->internal->hdf5_ref);
                                                            ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:2526:27: error: too few arguments to function ‘H5Rdereference2’
                 dset_id = H5Rdereference(ref_id,H5R_OBJECT,&matvar->internal->hdf5_ref);
                           ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
mat73.c: In function ‘Mat_VarReadNextInfoIterate’:
mat73.c:2842:68: error: incompatible type for argument 3 of ‘H5Rdereference2’
                         ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                                                                    ^~~~~~~
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: expected ‘H5R_type_t {aka enum <anonymous>}’ but argument is of type ‘hobj_ref_t * {aka long unsigned int *}’
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
              ^~~~~~~~~~~~~~~
In file included from /usr/include/H5public.h:34:0,
                 from /usr/include/hdf5.h:24,
                 from matio_private.h:37,
                 from mat73.c:38:
mat73.c:2842:34: error: too few arguments to function ‘H5Rdereference2’
                         ref_id = H5Rdereference(dset_id,H5R_OBJECT,ref_ids+i);
                                  ^
In file included from /usr/include/hdf5.h:38:0,
                 from matio_private.h:37,
                 from mat73.c:38:
/usr/include/H5Rpublic.h:63:14: note: declared here
 H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
tbeu commented 8 years ago

Yes, I am already aware of H5Rdereference2 being introduced in HDF5 v1.10.x. I want to fix it for upcoming matio v1.5.7.

tbeu commented 8 years ago

Can you please check if d59ed90 works for you. It only will be the case if HDF5 v1.10 is configured without --disable-deprecated-symbols.

tbeu commented 8 years ago

@robertsawko Did you find some minutes to test the patch? Thanks.

robertsawko commented 8 years ago

Sorry, I forgot about this. Will test it today.

robertsawko commented 8 years ago

Yep. That worked for me! Thanks.