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),
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.
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Parallel Computing
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.
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