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

Johnson, Hans J hans-johnson at uiowa.edu
Wed Jan 13 20:16:42 EST 2016


I’m making a patch for this.

I’ve noticed this today as well.

mkdir XX;
cd XX;
cmake -DCMAKE_CXX_STANDARD:STRING=11 ../ITK;
make –j23

Before this patch, there was a build failure.
After this patch it is now building.

I made modifications to more closely match upstream VXL.

Gerrit- review at :  http://review.source.kitware.com/#/c/20658/

Hans

From: Insight-developers <insight-developers-bounces at itk.org<mailto:insight-developers-bounces at itk.org>> on behalf of Bradley Lowekamp <brad at lowekamp.net<mailto:brad at lowekamp.net>>
Date: Wednesday, January 13, 2016 at 6:38 PM
To: Isaiah Norton <isaiah.norton at gmail.com<mailto:isaiah.norton at gmail.com>>
Cc: SPL Slicer Devel <slicer-devel at bwh.harvard.edu<mailto:slicer-devel at bwh.harvard.edu>>, Insight Developers <insight-developers at itk.org<mailto:insight-developers at itk.org>>
Subject: Re: [ITK-dev] [slicer-devel] build error in simpleitk

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<mailto: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<mailto: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<mailto: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<mailto: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<mailto: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<mailto: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.


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20160114/6a59bc24/attachment.html>


More information about the Insight-developers mailing list