Multiple build problems

I am trying to build the latest HDFView from source and I run into multiple errors. The versions I’m using:

  • hdfview-3.1.3
  • hdf5-1.13.1
  • hdf-4.2.13
  • szip-2.1.1
  1. The docs say:

Set the HDFLIBS and HDF5LIBS environment variables to point to the install location of HDF4 and HDF5. (If you do not want to include the HDF4 library just set HDFLIBS to the path for HDF5.)

When I do that I get

[javac] /hdfview-3.1.3/src/org.hdfgroup.object/module-info.java:10: error: module not found: jarhdf
  1. After downloading and building hdf

output:

[javac] Compiling 98 source files to /hdfview-3.1.3/build/classes
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5Datatype.java:144: error: constructor H5O_info_t in class H5O_info_t cannot be applied to given types;
[javac]         objInfo = new H5O_info_t(-1L, -1L, 0, 0, -1L, 0L, 0L, 0L, 0L, null, null, null);
[javac]                   ^
[javac]   required: long,H5O_token_t,int,int,long,long,long,long,long
[javac]   found:    long,long,int,int,long,long,long,long,long,<null>,<null>,<null>
[javac]   reason: actual and formal argument lists differ in length
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5CompoundDS.java:178: error: constructor H5O_info_t in class H5O_info_t cannot be applied to given types;
[javac]         objInfo = new H5O_info_t(-1L, -1L, 0, 0, -1L, 0L, 0L, 0L, 0L, null, null, null);
[javac]                   ^
[javac]   required: long,H5O_token_t,int,int,long,long,long,long,long
[javac]   found:    long,long,int,int,long,long,long,long,long,<null>,<null>,<null>
[javac]   reason: actual and formal argument lists differ in length
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5File.java:2433: error: incompatible types: long[] cannot be converted to H5O_token_t[]
[javac]             H5.H5Gget_obj_info_full(fid, fullPath, objNames, objTypes, null, fNos, objRefs, indexType, indexOrder);
[javac]                                                                                    ^
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5File.java:3035: error: incompatible types: String cannot be converted to long
[javac]         H5.H5export_dataset(file_export_name, object.getFile(), object.getFullName(), binary_order);
[javac]                                                             ^
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5Group.java:99: error: constructor H5O_info_t in class H5O_info_t cannot be applied to given types;
[javac]         obj_info = new H5O_info_t(-1L, -1L, 0, 0, -1L, 0L, 0L, 0L, 0L, null, null, null);
[javac]                    ^
[javac]   required: long,H5O_token_t,int,int,long,long,long,long,long
[javac]   found:    long,long,int,int,long,long,long,long,long,<null>,<null>,<null>
[javac]   reason: actual and formal argument lists differ in length
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5Link.java:61: error: constructor H5O_info_t in class H5O_info_t cannot be applied to given types;
[javac]         obj_info = new H5O_info_t(-1L, -1L, -1, 0, -1L, 0L, 0L, 0L, 0L, null,null,null);
[javac]                    ^
[javac]   required: long,H5O_token_t,int,int,long,long,long,long,long
[javac]   found:    long,long,int,int,long,long,long,long,long,<null>,<null>,<null>
[javac]   reason: actual and formal argument lists differ in length
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5ScalarDS.java:123: error: constructor H5O_info_t in class H5O_info_t cannot be applied to given types;
[javac]         objInfo = new H5O_info_t(-1L, -1L, 0, 0, -1L, 0L, 0L, 0L, 0L, null, null, null);
[javac]                   ^
[javac]   required: long,H5O_token_t,int,int,long,long,long,long,long
[javac]   found:    long,long,int,int,long,long,long,long,long,<null>,<null>,<null>
[javac]   reason: actual and formal argument lists differ in length
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[javac] 7 errors
  1. After trying with hdf5-1.10.8

output:

[javac] Compiling 98 source files to /hdfview-3.1.3/build/classes
[javac] /hdfview-3.1.3/src/org.hdfgroup.object/hdf/object/h5/H5File.java:3035: error: incompatible types: String cannot be converted to long
[javac]         H5.H5export_dataset(file_export_name, object.getFile(), object.getFullName(), binary_order);
[javac]                                                             ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[javac] 1 error

Tried with OpenJDK 11 and 17, there is no difference. Anyone can help?

Multiple issues here - version 3.1.x only works with 1.10 based hdf5.
I had HDF4 optional, but likely broke that option in the latest (3.1.3 included) haven’t gone back to fix.
Next release of HDFView 3.2.0 will support hdf5 1.12. (Probably hdf5 1.13 - although I have a hdfview master branch that works with develop)

Bottom line; 3.1.3 will not work with hdf5 1.12.x or 1.13.x.

But I also tried with 1.10.8 and got another error (see the bottom of my post). Can you provide combination of versions that works together? :smiley:

That is a very strange error - H5.H5export_dataset is from the hdf5 library and both 1.10 and 1.12 have the same args. So looking at the 1.10.8 vs 1.10.7 (The actual release 3.1.3 is based on) there is the problem. 1.10.8 changed the API! Somehow we missed that in our release checks.

This will be fixed in 1.10.9 release next month.
However, note that the next HDFView releases (1.12.2 and 1.10.9 based) will be fixing some important attribute issues and it will be using the most recent 1.12 and 1.10 releases.
After saying that, we do not want to break compile with older releases (currently that is on the 1.10 releases) like we did here.

Allen

Nice, I managed to build the package with 1.10.7. One more suggestion is if you can fix the java docs in hdf-4 because building it with anything newer than java 15 fails due to use of deprecated HTML attributes in docs. Unfortunately java 16 is the lowest available version on Ubuntu 20.04 which includes jpackage

Yes, we have hdf4 changes in the works - due to be released soon (sometime this year). But there are some new platform issues that need to be addressed first.

I will check if I can get some of those java issues updated into the repo.

Allen