Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Mar 2020 17:07:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 245168] science/hdf5: [patch] incorrect function signature for H5Oget_info_by_name
Message-ID:  <bug-245168-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245168

            Bug ID: 245168
           Summary: science/hdf5: [patch] incorrect function signature for
                    H5Oget_info_by_name
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: d8zNeCFG@aon.at
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

Scenario:
- latest ports, updated from svn
- hdf5 updated to 1.12.0
- trying to compile graphics/vigra

Result:
- Fails with

/usr/bin/c++  -DHasEXR -DHasHDF5 -DHasJPEG -DHasPNG -DHasTIFF -DHasZLIB
-Dvigraimpex_EXPORTS
-I/usr/tmp/a/SRC/FreeBSD-ports/head/graphics/vigra/work/vigra-8acd73a/inclu=
de
-isystem /usr/local/include -isystem /usr/local/include/OpenEXR -std=3Dc++11
-pthread -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -fPIC=20=20=20
-DH5_BUILT_AS_DYNAMIC_LIB -std=3Dgnu++11 -MD -MT
src/impex/CMakeFiles/vigraimpex.dir/hdf5impex.cxx.o -MF
src/impex/CMakeFiles/vigraimpex.dir/hdf5impex.cxx.o.d -o
src/impex/CMakeFiles/vigraimpex.dir/hdf5impex.cxx.o -c
/usr/tmp/a/SRC/FreeBSD-ports/head/graphics/vigra/work/vigra-8acd73a/src/imp=
ex/hdf5impex.cxx
/usr/tmp/a/SRC/FreeBSD-ports/head/graphics/vigra/work/vigra-8acd73a/src/imp=
ex/hdf5impex.cxx:193:5:
error: no matching function for call to 'H5Oget_info_by_name3'
    H5Oget_info_by_name(loc_id, name, &infobuf, H5P_DEFAULT);
    ^~~~~~~~~~~~~~~~~~~
/usr/local/include/H5version.h:772:31: note: expanded from macro
'H5Oget_info_by_name'
  #define H5Oget_info_by_name H5Oget_info_by_name3
                              ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/H5Opublic.h:188:15: note: candidate function not viable:
requires 5 arguments, but 4 were provided
H5_DLL herr_t H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info=
2_t
*oinfo,
              ^
1 error generated.

Analysis:
- It seems that the HDF5 source code is incorrect
- In H5version.h, H5Oget_info_by_name is defined as H5Oget_info_by_name3
- But the function signatures are different:
  . H5Oget_info_by_name( hid_t loc_id, const char *object_name, H5O_info_t
*object_info, hid_t lapl_id ); /* from
https://support.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfoByName */
  . H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo,
unsigned fields, hid_t lapl_id); /* from /usr/local/include/H5Opublic.h */

Patch (getting vigra to compile, I have no idea whether H5O_INFO_ALL is the
correct value to use):

--- ./src/H5version.h.ORIG      2020-02-29 00:52:15.000000000 +0100
+++ ./src/H5version.h   2020-03-29 18:55:46.915455000 +0200
@@ -769,7 +769,7 @@
   #ifndef H5Oget_info_by_name_vers
     #define H5Oget_info_by_name_vers 3
   #endif /* H5Oget_info_by_name_vers */
-  #define H5Oget_info_by_name H5Oget_info_by_name3
+  #define H5Oget_info_by_name(loc_id, name, oinfo, lapl_id)
H5Oget_info_by_name3(loc_id, name, oinfo, H5O_INFO_ALL, lapl_id)
 #elif H5Oget_info_by_name_vers =3D=3D 2
   #define H5Oget_info_by_name H5Oget_info_by_name2
 #elif H5Oget_info_by_name_vers =3D=3D 1

... but looking around in this file the same problem probably exists for a
number of other functions which have a "fields" parameter

-- Martin

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245168-7788>