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

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sun Jun 12 08:47:17 EDT 2011


Le 26 avr. 11 à 14:59, Brad King a écrit :

> On 04/26/2011 04:22 AM, Gaëtan Lehmann wrote:
>> Le 25 avr. 11 à 15:55, Brad King a écrit :
>>> H5_SIZEOF_OFF64_T?
>>
>> Here is what I found about off64_t in CMakeFiles/CMakeOutput.log
> [snp]
>> The check builds without problem and returns a 8 as size.
>> I don't really know where to look - maybe the include order?
>
> That is (indirectly) using CMake's check_type_size() macro which does
>
>    if(HAVE_SYS_TYPES_H)
>      set(headers "${headers}#include <sys/types.h>\n")
>    endif()
>    if(HAVE_STDINT_H)
>      set(headers "${headers}#include <stdint.h>\n")
>    endif()
>    if(HAVE_STDDEF_H)
>      set(headers "${headers}#include <stddef.h>\n")
>    endif()
>
> so that each of those headers is included in the check.  There is an
> option to turn the includes off but HDF5 is not using it.  Do those
> three HAVE_*_H values appear in the cache as ON?  What about
> H5_HAVE_STDINT_H?
>

With today's ITK master, I get those values in cache:

[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=8
CMakeCache.txt:HAVE_STDDEF_H:INTERNAL=1
CMakeCache.txt:HAVE_STDINT_H:INTERNAL=1
CMakeCache.txt:HAVE_SYS_TYPES_H:INTERNAL=1


With that change

[glehmann at itk2 build]$ git diff
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/ConfigureChecks.cmake  
b/Modules/ThirdParty/HDF5/src/itkhdf5/ConfigureChecks.cmake
index ac8bc1f..5b3eade 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/ConfigureChecks.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/ConfigureChecks.cmake
@@ -246,7 +246,7 @@ MACRO (H5_CHECK_TYPE_SIZE type var)
    SET (aType ${type})
    SET (aVar  ${var})
  #  MESSAGE (STATUS "Checking size of ${aType} and storing into $ 
{aVar}")
-  CHECK_TYPE_SIZE (${aType}   ${aVar})
+  CHECK_TYPE_SIZE (${aType}   ${aVar} BUILTIN_TYPES_ONLY)
    IF (NOT ${aVar})
      SET (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
  #    MESSAGE (STATUS "Size of ${aType} was NOT Found")

The value of H5_SIZEOF_OFF64_T looks better

[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

It still doesn't build though

[glehmann at itk2 build]$ make -j6 itkhdf5
Scanning dependencies of target H5make_libsettings
Scanning dependencies of target H5detect
Scanning dependencies of target itkzlib
[  0%] [  0%] [  0%] [  0%] [  0%] [  0%] Building C object Modules/ 
ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/H5make_libsettings.dir/ 
H5make_libsettings.c.o
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/compress.c.o
Building C object Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5detect.dir/H5detect.c.o
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/crc32.c.o
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/adler32.c.o
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/deflate.c.o
In file included from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5private.h:37,
                  from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5make_libsettings.c:46:
/home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
H5public.h:131:5: #error "nothing appropriate for ssize_t"
In file included from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5private.h:37,
                  from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5detect.c:57:
/home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
H5public.h:131:5: #error "nothing appropriate for ssize_t"
[  0%] In file included from /home/papha/glehmann/src/ITK/Modules/ 
ThirdParty/HDF5/src/itkhdf5/src/H5make_libsettings.c:46:
/home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
H5private.h:353: error: conflicting types for 'int8_t'
/usr/include/sys/int_types.h:54: error: previous declaration of  
'int8_t' was here
[  0%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib/ 
CMakeFiles/itkzlib.dir/gzio.c.o
gmake[3]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5make_libsettings.dir/H5make_libsettings.c.o] Error 1
gmake[2]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5make_libsettings.dir/all] Error 2
gmake[2]: *** Waiting for unfinished jobs....
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/inffast.c.o
In file included from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5detect.c:57:
/home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
H5private.h:353: error: conflicting types for 'int8_t'
/usr/include/sys/int_types.h:54: error: previous declaration of  
'int8_t' was here
[  0%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib/ 
CMakeFiles/itkzlib.dir/inflate.c.o
[  0%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib/ 
CMakeFiles/itkzlib.dir/inftrees.c.o
[  0%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib/ 
CMakeFiles/itkzlib.dir/trees.c.o
[  0%] gmake[3]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
CMakeFiles/H5detect.dir/H5detect.c.o] Error 1
gmake[2]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5detect.dir/all] Error 2
Building C object Modules/ThirdParty/ZLIB/src/itkzlib/CMakeFiles/ 
itkzlib.dir/uncompr.c.o
[  0%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib/ 
CMakeFiles/itkzlib.dir/zutil.c.o
Linking C static library ../../../../../lib/libitkzlib-4.0.a
[  0%] Built target itkzlib
gmake[1]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
itkhdf5.dir/rule] Error 2
gmake: *** [itkhdf5] Error 2


Gaëtan



> Try adding
>
> #include <stddef.h>
>
> in the #ifdef H5_STDC_HEADERS block of H5private.h.
>

Still the same error:

[glehmann at itk2 build]$ make -j6 itkhdf5
Scanning dependencies of target H5detect
[  0%] [  0%] Built target itkzlib
[  0%] Building C object Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o
Building C object Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5detect.dir/H5detect.c.o
In file included from /home/papha/glehmann/src/ITK/Modules/ThirdParty/ 
HDF5/src/itkhdf5/src/H5make_libsettings.c:46:
/home/papha/glehmann/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/ 
H5private.h:758: error: syntax error before "h5_stat_size_t"
gmake[3]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5make_libsettings.dir/H5make_libsettings.c.o] Error 1
gmake[2]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
H5make_libsettings.dir/all] Error 2
gmake[2]: *** Waiting for unfinished jobs....
Linking C executable ../../../../../../bin/H5detect
gmake[2]: *** Waiting for unfinished jobs....
[  0%] gmake[2]: *** Waiting for unfinished jobs....
Built target H5detect
gmake[1]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/ 
itkhdf5.dir/rule] Error 2
gmake: *** [itkhdf5] Error 2

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://mima2.jouy.inra.fr  http://www.itk.org
http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110612/88959e4e/attachment.pgp>


More information about the Insight-developers mailing list