Encountering Compile Errors While Building a ParaView Plug-in

I am attempting to build a ParaView plug-in. During the building process, I’ve encountered two errors associated with the H50visit function.

After consulting the HDF5 compatibility macros documentation
HDF5 compatibility macros documentation

I tried replacing ‘H50visit’ with ‘H50visit1’, but this attempt was unsuccessful.

If anyone is familiar with resolving these compatibility issues and can guide me on how to compile successfully, please share your insights.

Best regards,

Paraview version 5.12 is compiled before building the plug-in

Below is the error message I received during the build process:

~/Downloads/paraview_build/Plugins/PVESSI/build$ make
[  7%] Generating the wrap hierarchy for PVESSIReaders
[  7%] Built target PVESSIReaders-hierarchy
[ 14%] Building CXX object Plugin/Reader/CMakeFiles/PVESSIReaders.dir/vtkPVESSIReader.cxx.o
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx: In member function ‘void vtkPVESSIReader::Domain_Initializer(int)’:
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:2238:97: error: too few arguments to function ‘herr_t vtkhdf5_H5Ovisit3(hid_t, H5_index_t, H5_iter_order_t, H5O_iterate2_t, void*, unsigned int)’
      status = H5Ovisit (id_Physical_Element_Groups, H5_INDEX_NAME, H5_ITER_NATIVE, op_func, NULL);
                                                                                                 ^
In file included from /home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/H5public.h:32:0,
                 from /home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/hdf5.h:22,
                 from /home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.h:34,
                 from /home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:1:
/home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/H5Opublic.h:1205:15: note: declared here
 H5_DLL herr_t H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2_t op,
               ^
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:2242:94: error: too few arguments to function ‘herr_t vtkhdf5_H5Ovisit3(hid_t, H5_index_t, H5_iter_order_t, H5O_iterate2_t, void*, unsigned int)’
      status = H5Ovisit (id_Physical_Node_Groups, H5_INDEX_NAME, H5_ITER_NATIVE, op_func, NULL);
                                                                                              ^
In file included from /home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/H5public.h:32:0,
                 from /home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/hdf5.h:22,
                 from /home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.h:34,
                 from /home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:1:
/home/hp-z8/Downloads/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src/H5Opublic.h:1205:15: note: declared here
 H5_DLL herr_t H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2_t op,
               ^
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:2272:32: warning: passing NULL to non-pointer argument 1 of ‘herr_t vtkhdf5_H5Eset_auto2(hid_t, H5E_auto2_t, void*)’ [-Wconversion-null]
   H5Eset_auto (NULL, NULL, NULL);  // To stop HDF% from printing error message
                                ^
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx: In member function ‘void vtkPVESSIReader::Update_Time_Steps()’:
/home/hp-z8/Downloads/paraview_build/Plugins/PVESSI/Plugin/Reader/vtkPVESSIReader.cxx:3026:31: warning: passing NULL to non-pointer argument 1 of ‘herr_t vtkhdf5_H5Eset_auto2(hid_t, H5E_auto2_t, void*)’ [-Wconversion-null]
  H5Eset_auto (NULL, NULL, NULL);  // To stop HDF5 from printing error message
                               ^
make[2]: *** [Plugin/Reader/CMakeFiles/PVESSIReaders.dir/build.make:76: Plugin/Reader/CMakeFiles/PVESSIReaders.dir/vtkPVESSIReader.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:257: Plugin/Reader/CMakeFiles/PVESSIReaders.dir/all] Error 2
make: *** [Makefile:136: all] Error 2


Your build is using a copy of HDF5 that is bundled into ParaView. Furthermore, I note that the Paraview developers offer a plugin build tool. With these considerations, I suggest that a better way to get assistance with a plugin build problem is to contact the Paraview support forum.

I think your problem is solvable here, but Paraview is probably more familiar with plugin scenarios like this one. It is possible that you encountered a versioning problem in the plugin that should be addressed and fixed directly by Paraview. HTH.

You referenced the compatibility macros. Note that that doc page presents several different approaches to solve the same problem. If you have code that was known to work with a previous HDF5 version, then I recommend specifically the “Application Mapping Options” as by far the easiest solution. The Function Mapping Options are more complicated to apply.

For example, if your plugin was known to work correctly with HDF5-1.10.x, then simply add -DH5_USE_110_API to your compile line, and make no other changes to the existing plugin code. Regardless, this is still likely a versioning problem that Paraview should look at.