# Multiple build problems

**URL:** <https://forum.hdfgroup.org/t/multiple-build-problems/9687>\
**Category:** HDFView / Java HDF Object Package\
**Created:** [April 20, 2022, 3:36pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687 "2022-04-20T15:36:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![blazej.86](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@blazej.86](https://forum.hdfgroup.org/u/blazej.86)\
**Post date:** [April 20, 2022, 3:36pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/1 "2022-04-20T15:36:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [April 22, 2022, 3:34pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/2 "2022-04-22T15:34:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![blazej.86](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@blazej.86](https://forum.hdfgroup.org/u/blazej.86)\
**Post date:** [April 26, 2022, 11:33am UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/3 "2022-04-26T11:33:10Z")

</div>

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? 😃

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [April 26, 2022, 2:45pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/4 "2022-04-26T14:45:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [April 27, 2022, 4:15pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/5 "2022-04-27T16:15:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![blazej.86](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@blazej.86](https://forum.hdfgroup.org/u/blazej.86)\
**Post date:** [April 29, 2022, 2:50pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/6 "2022-04-29T14:50:47Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [April 29, 2022, 3:17pm UTC](https://forum.hdfgroup.org/t/multiple-build-problems/9687/7 "2022-04-29T15:17:22Z")

</div>

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
