1

When trying to install h4toh5 on a Debian system, using:

    ./configure CC=/usr/bin/h4cc --with-hdf5=/usr/include/hdf5/serial

I have errors such as:

    checking for hdf5.h... no
    configure: error: cannot find HDF5 header files!

The installation instructions note the need to specify the location of the HDF5 library:

    HDF5 Library (--with-hdf5=)                                                   
      The location of HDF5 Library should be specified.    

In fact, I don't really understand what is meant by "location of HDF5 library" ...,

Could any one answer by referring to the output of "dpkg -L libhdf5-dev" command (shown below)?

First, I installed the libhdf5-dev library.

    cyue@LGGE130:~/Downloads/h4h5tools-2.2.2$ dpkg -l | grep hdf5
    ii  hdf5-helpers                          1.8.13+docs-15                                  amd64        Hierarchical Data Format 5 (HDF5) - Helper tools
    ii  libhdf5-8:amd64                       1.8.13+docs-15                                  amd64        Hierarchical Data Format 5 (HDF5) - runtime files - serial version
    ii  libhdf5-cpp-8:amd64                   1.8.13+docs-15                                  amd64        Hierarchical Data Format 5 (HDF5) - C++ libraries
    ii  libhdf5-dev                           1.8.13+docs-15                                  amd64        Hierarchical Data Format 5 (HDF5) - development files - serial version

The following command returns:

    cyue@LGGE130:~/Downloads/h4h5tools-2.2.2$ dpkg -L libhdf5-dev
    /.
    /usr
    /usr/share
    /usr/share/lintian
    /usr/share/lintian/overrides
    /usr/share/lintian/overrides/libhdf5-dev
    /usr/share/doc
    /usr/share/doc/libhdf5-dev
    /usr/share/doc/libhdf5-dev/changelog.Debian.gz
    /usr/share/doc/libhdf5-dev/changelog.gz
    /usr/share/doc/libhdf5-dev/copyright
    /usr/lib
    /usr/lib/x86_64-linux-gnu
    /usr/lib/x86_64-linux-gnu/hdf5
    /usr/lib/x86_64-linux-gnu/hdf5/serial
    /usr/lib/x86_64-linux-gnu/pkgconfig
    /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc
    /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.a
    /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.a
    /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.a
    /usr/lib/x86_64-linux-gnu/libhdf5_serial.a
    /usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.a
    /usr/lib/x86_64-linux-gnu/libhdf5_cpp.a
    /usr/lib/x86_64-linux-gnu/libhdf5_serial.settings
    /usr/include
    /usr/include/hdf5
    /usr/include/hdf5/serial
    /usr/include/hdf5/serial/h5tb.mod
    /usr/include/hdf5/serial/h5lt.mod
    /usr/include/hdf5/serial/h5im.mod
    /usr/include/hdf5/serial/h5ds.mod
    /usr/include/hdf5/serial/H5f90i.h
    /usr/include/hdf5/serial/H5f90i_gen.h
    /usr/include/hdf5/serial/H5VarLenType.h
    /usr/include/hdf5/serial/H5ArrayType.h
    /usr/include/hdf5/serial/H5CppDoc.h
    /usr/include/hdf5/serial/H5StrType.h
    /usr/include/hdf5/serial/H5PropList.h
    /usr/include/hdf5/serial/H5PredType.h
    /usr/include/hdf5/serial/H5Object.h
    /usr/include/hdf5/serial/H5Location.h
    /usr/include/hdf5/serial/H5Library.h
    /usr/include/hdf5/serial/H5IntType.h
    /usr/include/hdf5/serial/H5Include.h
    /usr/include/hdf5/serial/H5IdComponent.h
    /usr/include/hdf5/serial/H5Group.h
    /usr/include/hdf5/serial/H5FloatType.h
    /usr/include/hdf5/serial/H5File.h
    /usr/include/hdf5/serial/H5FcreatProp.h
    /usr/include/hdf5/serial/H5FaccProp.h
    /usr/include/hdf5/serial/H5Exception.h
    /usr/include/hdf5/serial/H5EnumType.h
    /usr/include/hdf5/serial/H5DxferProp.h
    /usr/include/hdf5/serial/H5DcreatProp.h
    /usr/include/hdf5/serial/H5DataType.h
    /usr/include/hdf5/serial/H5DataSpace.h
    /usr/include/hdf5/serial/H5DataSet.h
    /usr/include/hdf5/serial/H5CompType.h
    /usr/include/hdf5/serial/H5CommonFG.h
    /usr/include/hdf5/serial/H5Classes.h
    /usr/include/hdf5/serial/H5Attribute.h
    /usr/include/hdf5/serial/H5AtomType.h
    /usr/include/hdf5/serial/H5AbstractDs.h
    /usr/include/hdf5/serial/H5Cpp.h
    /usr/include/hdf5/serial/H5PacketTable.h
    /usr/include/hdf5/serial/H5PTpublic.h
    /usr/include/hdf5/serial/H5DSpublic.h
    /usr/include/hdf5/serial/H5TBpublic.h
    /usr/include/hdf5/serial/H5LTpublic.h
    /usr/include/hdf5/serial/H5IMpublic.h
    /usr/include/hdf5/serial/H5DOpublic.h
    /usr/include/hdf5/serial/hdf5_hl.h
    /usr/include/hdf5/serial/hdf5.mod
    /usr/include/hdf5/serial/h5z.mod
    /usr/include/hdf5/serial/h5test_kind_sizeof_mod.mod
    /usr/include/hdf5/serial/h5t_provisional.mod
    /usr/include/hdf5/serial/h5t.mod
    /usr/include/hdf5/serial/h5s.mod
    /usr/include/hdf5/serial/h5r_provisional.mod
    /usr/include/hdf5/serial/h5r.mod
    /usr/include/hdf5/serial/h5p_provisional.mod
    /usr/include/hdf5/serial/h5p.mod
    /usr/include/hdf5/serial/h5o_provisional.mod
    /usr/include/hdf5/serial/h5o.mod
    /usr/include/hdf5/serial/h5lib_provisional.mod
    /usr/include/hdf5/serial/h5lib.mod
    /usr/include/hdf5/serial/h5l_provisional.mod
    /usr/include/hdf5/serial/h5l.mod
    /usr/include/hdf5/serial/h5i.mod
    /usr/include/hdf5/serial/h5global.mod
    /usr/include/hdf5/serial/h5g.mod
    /usr/include/hdf5/serial/h5fortran_types.mod
    /usr/include/hdf5/serial/h5f_provisional.mod
    /usr/include/hdf5/serial/h5f.mod
    /usr/include/hdf5/serial/h5e_provisional.mod
    /usr/include/hdf5/serial/h5e.mod
    /usr/include/hdf5/serial/h5d_provisional.mod
    /usr/include/hdf5/serial/h5d.mod
    /usr/include/hdf5/serial/h5a_provisional.mod
    /usr/include/hdf5/serial/h5a.mod
    /usr/include/hdf5/serial/h5_dble_interface.mod
    /usr/include/hdf5/serial/H5Zpublic.h
    /usr/include/hdf5/serial/H5Tpublic.h
    /usr/include/hdf5/serial/H5Spublic.h
    /usr/include/hdf5/serial/H5Rpublic.h
    /usr/include/hdf5/serial/H5PLextern.h
    /usr/include/hdf5/serial/H5Ppublic.h
    /usr/include/hdf5/serial/H5Opublic.h
    /usr/include/hdf5/serial/H5MMpublic.h
    /usr/include/hdf5/serial/H5Lpublic.h
    /usr/include/hdf5/serial/H5Ipublic.h
    /usr/include/hdf5/serial/H5Gpublic.h
    /usr/include/hdf5/serial/H5FDstdio.h
    /usr/include/hdf5/serial/H5FDsec2.h
    /usr/include/hdf5/serial/H5FDmulti.h
    /usr/include/hdf5/serial/H5FDmpio.h
    /usr/include/hdf5/serial/H5FDmpi.h
    /usr/include/hdf5/serial/H5FDlog.h
    /usr/include/hdf5/serial/H5FDfamily.h
    /usr/include/hdf5/serial/H5FDdirect.h
    /usr/include/hdf5/serial/H5FDcore.h
    /usr/include/hdf5/serial/H5FDpublic.h
    /usr/include/hdf5/serial/H5Fpublic.h
    /usr/include/hdf5/serial/H5Epublic.h
    /usr/include/hdf5/serial/H5Epubgen.h
    /usr/include/hdf5/serial/H5Dpublic.h
    /usr/include/hdf5/serial/H5Cpublic.h
    /usr/include/hdf5/serial/H5ACpublic.h
    /usr/include/hdf5/serial/H5Apublic.h
    /usr/include/hdf5/serial/H5version.h
    /usr/include/hdf5/serial/H5public.h
    /usr/include/hdf5/serial/H5pubconf.h
    /usr/include/hdf5/serial/H5overflow.h
    /usr/include/hdf5/serial/H5api_adpt.h
    /usr/include/hdf5/serial/hdf5.h
    /usr/share/doc/libhdf5-dev/RELEASE.txt.gz
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.so
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.a
    /usr/lib/x86_64-linux-gnu/hdf5/serial/include
    /usr/lib/x86_64-linux-gnu/hdf5/serial/lib
    /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.settings
    /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so
    /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
    /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so
    /usr/lib/x86_64-linux-gnu/libhdf5_serial.so
    /usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so
    /usr/lib/x86_64-linux-gnu/libhdf5_cpp.so

Notice that I do have the /usr/include/hdf5/serial/hdf5.h file, So I don't know what's going on (given my elementry level of linux software installation ...). The relavant information in the config.log is:

    | #endif                                                                        
    | #ifdef HAVE_STDINT_H                                                          
    | # include <stdint.h>                                                          
    | #endif                                                                        
    | #ifdef HAVE_UNISTD_H                                                          
    | # include <unistd.h>                                                          
    | #endif                                                                        
    | #include <hdf5.h>                                                             
    configure:4580: result: no                                                      
    configure:4580: checking hdf5.h presence                                        
    configure:4580: /usr/bin/h4cc -E  -I/usr/include/hdf5/serial//include conftest.c
    conftest.c:12:18: fatal error: hdf5.h: No such file or directory                
     #include <hdf5.h>                                                              
                      ^                                                             
    compilation terminated.                                                         
    configure:4580: $? = 1                                                          
    configure: failed program was:                                                  
    | /* confdefs.h */                                                              
    | #define PACKAGE_NAME "H4H5Tools"                                              
    | #define PACKAGE_TARNAME "h4h5tools"                                           
    | #define PACKAGE_VERSION "2.2.2"                                               
    | #define PACKAGE_STRING "H4H5Tools 2.2.2"                                      
    | #define PACKAGE_BUGREPORT "help@hdfgroup.org"                                 
    | #define PACKAGE_URL ""                                                        
    | #define PACKAGE "h4h5tools"                                                   
    | #define VERSION "2.2.2"                                                       
    | #define STDC_HEADERS 1                                                        
    | /* end confdefs.h.  */                                                        
    | #include <hdf5.h>                                                             
    configure:4580: result: no                                                      
    configure:4580: checking for hdf5.h                                             
    configure:4580: result: no                                                      
    configure:4587: error: cannot find HDF5 header files!                           
  • Note at the end of ./configure command I provided "--with-hdf5=/usr/include/hdf5/serial", then in the proceeding line of the error message in config.log is "-I/usr/include/hdf5/serial//include", looks like it adds a /include directly after what's been provided. I searched in the codes of "hdf5.h", there are several places having line of " #include "hdf5.h", and a line of "bin/locate_sw: if [ -r $sw/include/hdf5.h -a -r $sw/lib/libhdf5.a -a -r $sw/bin/h5dump ]; then ". – wiswit Aug 16 '15 at 14:28
  • OK, I find both ./configure CC=/usr/bin/h4cc --with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial and ./configure CC=/usr/bin/h4cc --with-hdf5=/usr/include/hdf5/serial/,/usr/lib/x86_64-linux-gnu/hdf5/serial/ are able to make the error disappear and successfully compile. – wiswit Aug 16 '15 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.