Errors When Running Examples

Hi all,

I decided to change over to a Linux machine and I’m trying to see if I installed HDF5 correctly. I’m trying to run through the example script run-all-ex.sh and I’ve encountered some errors.

At first, it wasn’t detecting the run language scripts due to the file extensions being different. I fixed those–rewrote in the run-all-ex.sh script to expect things like run-c-ex.sh.in–but now when it’s running the tests, it gives the following error:

Run c examples

################# h5_crtdat #################
./run-c-ex.sh.in: line 53: @prefix@/bin/h5pcc: No such file or directory
messed up compiling h5_crdat.c
rm: cannot remove '*.o': No such file or directory
rm: cannot remove '*.h5': No such file or directory

Done

Looking at the bin directory, and there isn’t an h5pcc directory. Should there be? Did I just install it incorrectly?

Thanks in advance!

Gabriella

Hi Gabriella,

The files with the .sh.in extensions are input files for .sh scripts such as run-c-ex.sh.in. They can’t be run directly, but will be used when running configure to produce the corresponding files with .sh extensions.

The scripts are intended to run examples installed in $prefix/share/hdf5_examples by building and installing HDF5 according to these build/install steps:

  1.  configure
    
  2.  make
    
  3.  (make check – recommended but not required)
    
  4.  make install
    

For more details see the “Quick installation” section of the INSTALL file in the release_docs directory of the HDF5 source.

If you built HDF5 in this manner and ran run-all-ex.sh in the share/hdf5_examples subdirectory of your HDF5 install directory, please send more details about your build or install procedure. The *.sh scripts should be created with all necessary variables set through the build process. If the scripts were not created correctly we are interested in finding the failure.

Larry

1 Like

Hi Larry,

Yes, I followed the instructions as specified under https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake.

I am currently running CMake 3.12.0-rc3.

The steps I performed were as follows:

  1. Download CMake-hdf5-1.10.1.tar.gz
  2. Run build-unix.sh
  3. Run HDF5-1.10.1-Linux.sh
  4. Attempt to run hdf5-1.10.1/examples/run-all-ex.sh
  5. Receive error as specified in previous post

After downloading HDF5_Examples, I was unable to find run-all-ex.sh: it is only located in /hdf5-1.10.1/examples. I did run the ctest command in the README, though it stated no tests were found. In addition, the README states that Linux.sh should be executed in order to create the HDF5Examples directory. However, no such script exists after following the above steps.

If no other users have reported any issues, I suspect I missed a step or two during installation, which is why it might be failing. Since I was unable to find a workaround, I am utilizing HDFql instead. However, if you need further information in order to find the failure, please let me know.

Thanks for the insight,
Gabriella

Oh, I see. The run-*-ex.sh scripts are for autotools builds and will not work with CMake builds. More recent CMake-hdf5 tar files should include an examples project for testing examples with HDF5 built with CMake.

Thank you for reporting the issue. We will review the instructions and scripts to try to make the CMake vs. autotools differences more clear.

Larry