[Insight-users] Compilation error with itkV4

Matt McCormick matt.mccormick at kitware.com
Tue Oct 18 11:02:03 EDT 2011


Hi Claire,

Yes, these stddef problems were fixed a while ago in ITKv4.  We have a
Fedora 15 box on our dashboard

http://public.kitware.com/dashboard.php?name=itk

and I personally use gcc 4.6.1.


So, you could either use ITK upstream,

http://www.itk.org/Wiki/ITK/Git


Or you could help the CTK developers upgrade the ITKv4 version they use.


Thanks,
Matt

On Tue, Oct 18, 2011 at 10:34 AM, Claire Mouton
<Claire.Mouton at creatis.insa-lyon.fr> wrote:
> Hi Matt,
>
> Yes this is a problem caused by gcc 4.6 that is shipped with fedora15. the
> new version of gcc doesn't include stddef anymore in all standard libs:
> have a look at this:
>
> http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006478.html
>
>
> Thanks,
> Claire
>
> On Tuesday, October 18, 2011 01:54:24 PM you wrote:
>> Hi Claire,
>>
>> If you compile the latest ITKv4, you will not see this problem.  It is
>> built regularly wil gcc 4.6.  The CTK superbuild must be using an old
>> version.
>>
>> Thanks,
>> Matt
>>
>> On Tuesday, October 18, 2011, Claire Mouton <
>>
>> Claire.Mouton at creatis.insa-lyon.fr> wrote:
>> > Hi,
>> >
>> > I am trying to copile ITK v4 and I meet the following error.
>> >
>> > I am working witin this environmant :
>> > Linux ei-cmo-230 2.6.40.6-0.fc15.i686.PAE #1 SMP Tue Oct 4 00:44:38 UTC
>>
>> 2011
>>
>> > i686 i686 i386 GNU/Linux
>> >
>> > with gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
>> >
>> >
>> >
>> > Building CXX object Utilities/MetaIO/CMakeFiles/ITKMetaIO.dir/metaUtils.o
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx: In
>>
>> function
>>
>> > ‘bool MET_StringToWordArray(const char*, int*, char***)’:
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:800:3:
>> > error: ‘ptrdiff_t’ was not declared in this scope
>>
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:800:3:
>> note:
>> > suggested alternatives:
>> > /usr/lib/gcc/i686-redhat-linux/4.6.1/../../../../include/c++/4.6.1/i686-
>> > redhat-linux/bits/c++config.h:156:15: note:   ‘std::ptrdiff_t’
>> > /usr/lib/gcc/i686-redhat-linux/4.6.1/../../../../include/c++/4.6.1/i686-
>> > redhat-linux/bits/c++config.h:156:15: note:   ‘std::ptrdiff_t’
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:800:13:
>> > error: expected ‘;’ before ‘l’
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:802:13:
>> > error: expected ‘;’ before ‘p’
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:803:9:
>> > error: ‘p’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:803:11:
>> > error: ‘l’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:809:13:
>> > error: expected ‘;’ before ‘pp’
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:811:9:
>> > error: ‘pp’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:811:12:
>> > error: ‘l’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:824:3:
>> > error: ‘pp’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:824:6:
>> > error: ‘l’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:840:13:
>> > error: expected ‘;’ before ‘i’
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:841:7:
>> > error: ‘i’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:843:8:
>> > error: ‘p’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:849:11:
>> > error: ‘p’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:853:5:
>> > error: ‘j’ was not declared in this scope
>> > /home2/code/CTK/CTK-superbuild/ITK/Utilities/MetaIO/metaUtils.cxx:854:11:
>> > error: ‘p’ was not declared in this scope
>> > make[2]: *** [Utilities/MetaIO/CMakeFiles/ITKMetaIO.dir/metaUtils.o]
>> > Error
>>
>> 1
>>
>> > make[1]: *** [Utilities/MetaIO/CMakeFiles/ITKMetaIO.dir/all] Error 2
>> > make: *** [all] Error 2
>> >
>> >
>> >
>> >
>> > Any suggestion to help?
>> >
>> > Regards,
>> > Claire
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list