[Insight-developers] HDF5 failing to compile with gcc3.4

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sun Jun 12 09:01:14 EDT 2011


Le 10 mai 11 à 16:00, Brad King a écrit :

> On 05/10/2011 08:40 AM, Gaëtan Lehmann wrote:
>>> #include <stddef.h>
>>>
>>> in the #ifdef H5_STDC_HEADERS block of H5private.h.
>>
>> I did try to add that include, without success.
>
> The rest of my questions from the end of that thread will help:
>
> On 04/26/2011 08:59 AM, Brad King wrote:
>> 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?
>
> What is the state of these cache values?
>
> The H5private.h header also has this:
>
> #ifdef H5_HAVE_UNISTD_H
> #   include <sys/types.h>
> #   include <unistd.h>
> #endif
> ...
> #ifndef __cplusplus
> #ifdef H5_HAVE_STDINT_H
> #   include <stdint.h>
> #endif
> #endif
>
> Are either of these being included in the translation units that fail?
> (Just add a #error in each block by hand to test it.)

adding a #error in those blocks results in the expected error on the  
#error macros.


[glehmann at itk2 build]$ git diff
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h b/ 
Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
index 24149a8..f642529 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
@@ -64,6 +64,7 @@
   * compliant. Otherwise all bets are off.
   */
  #ifdef H5_HAVE_UNISTD_H
+#error
  #   include <sys/types.h>
  #   include <unistd.h>
  #endif

[glehmann at itk2 build]$ git diff
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h b/ 
Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
index 24149a8..9b5e125 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5private.h
@@ -77,6 +77,7 @@
   */
  #ifndef __cplusplus
  #ifdef H5_HAVE_STDINT_H
+#error
  #   include <stdint.h>
  #endif
  #endif


>
>> Brad, I can't give you a direct access to that machine, but maybe we
>> can plan a skype meeting to fix that problem?
>
> Sure, we can do this if we can't resolve it with a couple more emails.
>
> Thanks,
> -Brad

-- 
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/4e38043c/attachment.pgp>


More information about the Insight-developers mailing list