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 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 script to expect things like–but now when it’s running the tests, it gives the following error:

Run c examples

################# h5_crtdat #################
./ 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


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

Thanks in advance!


Hi Gabriella,

The files with the extensions are input files for .sh scripts such as 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 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.


1 Like

Hi Larry,

Yes, I followed the instructions as specified under

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
  3. Run
  4. Attempt to run hdf5-1.10.1/examples/
  5. Receive error as specified in previous post

After downloading HDF5_Examples, I was unable to find 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 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,

Oh, I see. The run-* 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.