[Insight-developers] help with hdf5 module on 64-bit sun

Brad King brad.king at kitware.com
Mon Jun 13 14:12:38 EDT 2011


On 06/12/2011 08:47 AM, Gaëtan Lehmann wrote:
> CMakeCache.txt:H5_HAVE_STDINT_H:INTERNAL=1
> CMakeCache.txt:H5_SIZEOF_OFF64_T:INTERNAL=8
> CMakeCache.txt:HAVE_STDDEF_H:INTERNAL=1
> CMakeCache.txt:HAVE_STDINT_H:INTERNAL=1
> CMakeCache.txt:HAVE_SYS_TYPES_H:INTERNAL=1

Good.  What about H5_STDC_HEADERS?

> -  CHECK_TYPE_SIZE (${aType}   ${aVar})
> +  CHECK_TYPE_SIZE (${aType}   ${aVar} BUILTIN_TYPES_ONLY)
[snip]
> [glehmann at itk2 build]$ egrep '^(HAVE_SYS_TYPES_H|HAVE_STDINT_H| 
> HAVE_STDDEF_H|H5_HAVE_STDINT_H|H5_SIZEOF_OFF64_T):' *
> CMakeCache.txt:H5_HAVE_STDINT_H:INTERNAL=1
> CMakeCache.txt:H5_SIZEOF_OFF64_T:INTERNAL=0
> CMakeCache.txt:HAVE_STDDEF_H:INTERNAL=1
> CMakeCache.txt:HAVE_STDINT_H:INTERNAL=1
> CMakeCache.txt:HAVE_SYS_TYPES_H:INTERNAL=1

Good.

> It still doesn't build though

The BUILTIN_TYPES_ONLY change was good for experimentation but is
not expected to fix the build.

> Still the same error:
[snip]
> /home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
> H5private.h:758: error: syntax error before "h5_stat_size_t"

The off64_t is supposed to be defined in sys/types.h when the large file
API is enabled.  I think that H5pubconf.h is defining _LARGE_FILES which
may hide the "64" names and replace the raw names (off_t) with 64-bit
versions.  The _LARGE_FILES macro is not defined during the try-compile,
leading to the inconsistency.  Please try this:

  echo "#include <sys/types.h>" > types.c
  /local/bin/gcc -E types.c -dD > types_default.c
  /local/bin/gcc -E types.c -dD -D_LARGE_FILES > types_LARGE_FILES.c

and send me the output files (off-list).

Thanks,
-Brad


More information about the Insight-developers mailing list