Control: tags -1 + patch On Mon, 8 May 2017 14:34:31 +0000 PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> wrote: > Here after rebuilding hdf5 in debug mode > > :~/Debian/nexus$ ./bug.py > H5get_libversion(majnum=0xbf8a5b04, minnum=0xbf8a5b08, relnum=0xbf8a5b0c) = SUCCEED; > H5Eset_auto2(estack=H5P_DEFAULT, func=NULL, client_data=NULL) = SUCCEED; > H5open() = SUCCEED; > H5Pcreate(cls=8 (genprop class)) = 18 (genprop list); > H5Pget_cache(plist=18 (genprop list), mdc_nelmts=0xbf8a5af8, rdcc_nslots=0xbf8a5afc, rdcc_nbytes=0xbf8a5b00, rdcc_w0=0xbf8a5b10) = SUCCEED; > H5Pset_cache(plist=18 (genprop list), mdc_nelmts=0, rdcc_nslots=521, rdcc_nbytes=1024000, rdcc_w0=0.75) = SUCCEED; > H5Pset_fclose_degree(plist=18 (genprop list), degree=H5F_CLOSE_STRONG) = SUCCEED; > H5check_version(majnum=1, minnum=10, relnum=0) = SUCCEED; > H5open() = SUCCEED; > H5Fcreate(filename=0x82517ef8, flags=2, fcpl=H5P_DEFAULT, fapl=18 (genprop list)) = 0 (file); > H5Pclose(plist=18 (genprop list)) = SUCCEED; > ERROR: cannot open file: filenamenxs.h5 > Traceback (most recent call last): > File "./bug.py", line 5, in <module> > e.save("filenamenxs.h5", 'w5') > File "/usr/lib/python2.7/dist-packages/nxs/tree.py", line 868, in save > file = NeXusTree(filename, format) > File "/usr/lib/python2.7/dist-packages/nxs/napi.py", line 320, in __init__ > raise NeXusError, "Could not %s %s"%(op,filename) This error and others are caused by HDF5 handles being stored as int instead of hid_t. This type changed from int to int64_t with release 1.10.0 of HDF5. Please find attached a patch proposal. Thanks, _g.
diff -Nru nexus-4.3.2-svn1921/debian/changelog nexus-4.3.2-svn1921/debian/changelog --- nexus-4.3.2-svn1921/debian/changelog 2016-07-22 23:05:27.000000000 +0200 +++ nexus-4.3.2-svn1921/debian/changelog 2017-05-09 19:49:46.000000000 +0200 @@ -1,3 +1,11 @@ +nexus (4.3.2-svn1921-5) UNRELEASED; urgency=medium + + * QA upload. + * New patch hdf5-1.10-support.patch to fix incorrect type for HDF5 + handles: should be hid_t instead of int (closes: #861736) + + -- Gilles Filippini <pini@debian.org> Tue, 09 May 2017 19:49:46 +0200 + nexus (4.3.2-svn1921-4) unstable; urgency=medium * QA upload. diff -Nru nexus-4.3.2-svn1921/debian/patches/hdf5-1.10-support.patch nexus-4.3.2-svn1921/debian/patches/hdf5-1.10-support.patch --- nexus-4.3.2-svn1921/debian/patches/hdf5-1.10-support.patch 1970-01-01 01:00:00.000000000 +0100 +++ nexus-4.3.2-svn1921/debian/patches/hdf5-1.10-support.patch 2017-05-09 19:49:46.000000000 +0200 @@ -0,0 +1,111 @@ +Description: HDF5 1.10.x uses 64 bit handles. They're not int anymore. +Author: Gilles Filippini <pini@debian.org> +Bug-Debian: https://bugs.debian.org/861736 +Index: nexus-4.3.2-svn1921/src/napi5.c +=================================================================== +--- nexus-4.3.2-svn1921.orig/src/napi5.c ++++ nexus-4.3.2-svn1921/src/napi5.c +@@ -54,12 +54,12 @@ extern void *NXpData; + hsize_t iCurrentIDX; + } iStack5[NXMAXSTACK]; + struct iStack5 iAtt5; +- int iFID; +- int iCurrentG; +- int iCurrentD; +- int iCurrentS; +- int iCurrentT; +- int iCurrentA; ++ hid_t iFID; ++ hid_t iCurrentG; ++ hid_t iCurrentD; ++ hid_t iCurrentS; ++ hid_t iCurrentT; ++ hid_t iCurrentA; + int iNX; + int iNXID; + int iStackPtr; +@@ -434,7 +434,7 @@ NXstatus NX5open(CONSTCHAR *filename, N + NXstatus NX5makegroup (NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass) + { + pNexusFile5 pFile; +- herr_t iRet; ++ hid_t iRet; + hid_t iVID; + hid_t attr1,aid1, aid2; + char pBuffer[1024] = ""; +@@ -487,7 +487,7 @@ NXstatus NX5open(CONSTCHAR *filename, N + + pNexusFile5 pFile; + hid_t attr1, atype; +- herr_t iRet; ++ hid_t iRet; + char pBuffer[1024]; + char data[128]; + +@@ -654,7 +654,7 @@ static hid_t nxToHDF5Type(int datatype) + int compress_type, int64_t chunk_size[]) + { + hid_t datatype1, dataspace, iNew; +- herr_t iRet; ++ hid_t iRet; + hid_t type, cparms = -1; + pNexusFile5 pFile; + char pBuffer[256]; +@@ -992,8 +992,8 @@ static hid_t nxToHDF5Type(int datatype) + return NX_OK; + } + /*------------------------------------------------------------------*/ +-static int getAttVID(pNexusFile5 pFile){ +- int vid; ++static hid_t getAttVID(pNexusFile5 pFile){ ++ hid_t vid; + if(pFile->iCurrentG == 0 && pFile->iCurrentD == 0){ + /* global attribute */ + vid = H5Gopen(pFile->iFID,"/", H5P_DEFAULT); +@@ -1007,7 +1007,7 @@ static int getAttVID(pNexusFile5 pFile){ + return vid; + } + /*---------------------------------------------------------------*/ +-static void killAttVID(pNexusFile5 pFile, int vid){ ++static void killAttVID(pNexusFile5 pFile, hid_t vid){ + if(pFile->iCurrentG == 0 && pFile->iCurrentD == 0){ + H5Gclose(vid); + } +@@ -1021,8 +1021,8 @@ static void killAttVID(pNexusFile5 pFile + pNexusFile5 pFile; + hid_t attr1, aid1, aid2; + hid_t type; +- herr_t iRet; +- int vid; ++ hid_t iRet; ++ hid_t vid; + + pFile = NXI5assert (fid); + +@@ -2028,7 +2028,7 @@ static int countObjectsInGroup(hid_t loc + int iPType,rank; + char *iname = NULL, *vlen_str = NULL; + hsize_t idx, intern_idx=-1; +- int vid; ++ hid_t vid; + H5O_info_t oinfo; + + pFile = NXI5assert (fileid); +@@ -2105,7 +2105,7 @@ static int countObjectsInGroup(hid_t loc + void *data, int* datalen, int* iType) + { + pNexusFile5 pFile; +- int iNew, vid; ++ hid_t iNew, vid; + herr_t iRet; + hid_t type, atype = -1; + char pBuffer[256]; +@@ -2157,7 +2157,7 @@ static int countObjectsInGroup(hid_t loc + { + pNexusFile5 pFile; + hid_t idx; +- int vid; ++ hid_t vid; + H5O_info_t oinfo; + + pFile = NXI5assert (fid); diff -Nru nexus-4.3.2-svn1921/debian/patches/series nexus-4.3.2-svn1921/debian/patches/series --- nexus-4.3.2-svn1921/debian/patches/series 2016-07-22 23:05:27.000000000 +0200 +++ nexus-4.3.2-svn1921/debian/patches/series 2017-05-09 19:49:46.000000000 +0200 @@ -1,2 +1,3 @@ 0001-these-days-nexus-without-hdf5-is-considered-broken.patch fix-hdf5-1-10-detection.patch +hdf5-1.10-support.patch
Attachment:
signature.asc
Description: OpenPGP digital signature