[ITK] [ITK-dev] [slicer-devel] build error in simpleitk

Bradley Lowekamp brad at lowekamp.net
Wed Jan 13 19:38:23 EST 2016


Hello,

The patch looks pretty good. Thank you for contributing.

Can you please submit the patch to ITK Gerrit for review?

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

Thanks
Brad

> On Jan 13, 2016, at 6:47 PM, Isaiah Norton <isaiah.norton at gmail.com> wrote:
> 
> (cc: insight-devel)
> 
> We are also seeing this issue, and several SimpleITK dashboards are failing with the same error for the OS X 10.9 (since bumping to ITK 4.9) and 10.10 (since yesterday) dashboards:
> https://open.cdash.org/buildSummary.php?buildid=4188623
> 
> It looks like this is essentially caused by SimpleITK being compiled with `-std=c++11`, whereas ITK (and VXL) are not. So, there is a mismatch between the configured definition of `VCL_CONSTEXPR` and the `VCL_STATIC_CONST_INIT_*` macros.
> 
> For reference, VCL_CONSTEXPR was introduced here:
> http://review.source.kitware.com/#/c/20386/
> 
> A proposed patch [1] is attached.
> 
> Best,
> Isaiah
> 
> [1] https://github.com/ihnorton/ITK/commit/0f748d8c86ffb2369c3a343c0db5ca87b067843e
> 
> 
> 
>> On Mon, Jan 11, 2016 at 11:21 AM, Steve Pieper <pieper at isomics.com> wrote:
>> Hi - 
>> 
>> This morning with Xcode 7.2 on mac 10.11.2 I get the build errors pasted below.  This was in a fresh build directory.  With SimpleITK turned off the build completes and everything works as expected.
>> 
>> I found an old issue with similar errors [1] but nothing lately.  
>> 
>> -Steve
>> 
>> [1] https://issues.itk.org/jira/browse/ITK-2976
>> 
>> 
>> 
>> 
>> 
>> 
>> In file included from /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_c_vector.h:26:
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:388:41: error: declaration of constexpr static data member
>> 
>>       'zero' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);
>> 
>>                                         ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:390:41: error: declaration of constexpr static data member
>> 
>>       'one' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F);
>> 
>>                                         ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:392:41: error: declaration of constexpr static data member
>> 
>>       'maxval' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR float maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F);
>> 
>>                                         ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:411:42: error: declaration of constexpr static data member
>> 
>>       'zero' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
>> 
>>                                          ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:413:42: error: declaration of constexpr static data member
>> 
>>       'one' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
>> 
>>                                          ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:415:42: error: declaration of constexpr static data member
>> 
>>       'maxval' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
>> 
>>                                          ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:434:47: error: declaration of constexpr static data member
>> 
>>       'zero' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
>> 
>>                                               ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:436:47: error: declaration of constexpr static data member
>> 
>>       'one' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
>> 
>>                                               ^
>> 
>> /Users/pieper/slicer4/latest/Slicer-superbuild/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:438:47: error: declaration of constexpr static data member
>> 
>>       'maxval' requires an initializer
>> 
>>   static VNL_EXPORT VCL_CONSTEXPR long double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
>> 
>>                                               ^
>> 
>> 9 errors generated.
>> 
>> make[8]: *** [Code/Explicit/src/CMakeFiles/SimpleITKExplicit.dir/sitkExplicitITKComposeImageFilter.cxx.o] Error 1
>> 
>> make[7]: *** [Code/Explicit/src/CMakeFiles/SimpleITKExplicit.dir/all] Error 2
>> 
>> make[6]: *** [all] Error 2
>> 
>> make[5]: *** [SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-build] Error 2
>> 
>> make[4]: *** [CMakeFiles/SimpleITK.dir/all] Error 2
>> 
>> make[3]: *** [all] Error 2
>> 
>> make[2]: *** [SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-build] Error 2
>> 
>> make[1]: *** [CMakeFiles/SimpleITK.dir/all] Error 2
>> 
>> make: *** [all] Error 2
>> 
>> 
>> _______________________________________________
>> slicer-devel mailing list
>> slicer-devel at bwh.harvard.edu
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
>> To unsubscribe: send email to slicer-devel-request at bwh.harvard.edu with unsubscribe as the subject
>> http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
>> 
>> 
>> The information in this e-mail is intended only for the person to whom it is
>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>> contains patient information, please contact the Partners Compliance HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>> but does not contain patient information, please contact the sender and properly
>> dispose of the e-mail.
> 
> <0001-COMP-fix-build-with-std-c-11-when-ITK-VXL-initially-.patch>
> _______________________________________________
> slicer-devel mailing list
> slicer-devel at bwh.harvard.edu
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
> To unsubscribe: send email to slicer-devel-request at bwh.harvard.edu with unsubscribe as the subject
> http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160113/93c2c757/attachment.html>
-------------- next part --------------
_______________________________________________
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://kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list