Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Strange Error compiling the HDF5 library on linux

T__Varun
Beginner
631 Views

Hi

I am trying to compile the HDF5 library version hdf5-1.10.5 using the intel compilers on a Linux kernel 2.6.32-573.12.1.el6.x86_64. The ultimate goal is to use it inside a Fortran program. While building the library, I encounter the error:

In file included from H5Fprivate.h(34),
                 from H5Cprivate.h(35),
                 from H5ACprivate.h(33),
                 from H5.c(23):
H5VMprivate.h(464): error: identifier "CHAR_BIT" is undefined
      if(n >= (hsize_t)1 << ((sizeof(hsize_t) * CHAR_BIT) - 1))

I encountered this problem with almost all release versions of the HDF library so I am assuming the C compiler is somehow misconfigured. Do you have any ideas on how to circumvent this problem?

I saw some previous threads on this topic and also on the internet but did not find anything relavant.

0 Kudos
2 Replies
Viet_H_Intel
Moderator
631 Views

Try to find the source file which the error was emitted, then create a pre-processed file. 

Try to see where CHAR_BIT is defined, then see if that got included in the pre-processed file or not.

0 Kudos
T__Varun
Beginner
631 Views

I thought libraries like HDF5 are supposed to get compiled out of the box without modification especially since I could get it to work on a different system with a different version of the intel compiler

0 Kudos
Reply