[ITK-dev] Build errors using a different C and CXX compiler

Dženan Zukić dzenanz at gmail.com
Fri Apr 7 14:29:58 EDT 2017


Microsoft already did the same!
https://developercommunity.visualstudio.com/comments/6266/view.html

ITK is an excellent stress test case for compilers because of big code size
and omnipresent templates :)

Regards,
Dženan

On Fri, Apr 7, 2017 at 1:49 PM, Lefman, Jonathan <jonathan.lefman at intel.com>
wrote:

> There is a confirmed bug in the latest release of the Intel Compiler. Any
> code which compiles in gcc should compile under icc. There is a workaround
> listed in the last comment here: https://software.intel.com/en-
> us/comment/1902247. I will notify once a fix has been released. I will
> try to find out if we can include ITK in regular build tests for ICC
> development.
>
> -Jon
>
> -----Original Message-----
> From: Matt McCormick [mailto:matt.mccormick at kitware.com]
> Sent: Thursday, April 6, 2017 3:40 PM
> To: Lefman, Jonathan <jonathan.lefman at intel.com>
> Cc: insight-developers at itk.org
> Subject: Re: Build errors using a different C and CXX compiler
>
> Excellent, thanks, Jon!
>
> On Thu, Apr 6, 2017 at 3:35 PM, Lefman, Jonathan <
> jonathan.lefman at intel.com> wrote:
> > Matt,
> >
> > I just met with a technical lead for the Intel compiler front-end group
> to review this issue. I may have uncovered a bug in the front-end logic.
> They are investigating to dig into the reason for this anomaly. When I
> receive their analysis, I will report back what the next steps are.
> >
> > -Jon
> >
> > -----Original Message-----
> > From: Matt McCormick [mailto:matt.mccormick at kitware.com]
> > Sent: Wednesday, April 5, 2017 5:17 PM
> > To: Lefman, Jonathan <jonathan.lefman at intel.com>
> > Cc: insight-developers at itk.org
> > Subject: Re: Build errors using a different C and CXX compiler
> >
> > Hi Jon,
> >
> > It does not look like we have working builds of ICC on the dashboard
> [1]. As they say, if it not tested, it is broken. There are two x86_64 ICC
> builds, but they either have a build system issue, or ITK needs to be
> updated to use this compiler. What version of the compiler is it?
> >
> > Thanks,
> > Matt
> >
> > [1] https://open.cdash.org/index.php?project=Insight
> >
> > On Wed, Apr 5, 2017 at 4:57 PM, Lefman, Jonathan <
> jonathan.lefman at intel.com> wrote:
> >> Hi all,
> >>
> >>
> >>
> >> I am attempting to build ITK from source (have tried using v4.11.0
> >> and
> >> master) using a different CXX compiler. To start, I do not have an
> >> issue when I utilize the default compiler (gcc) as much compiler.
> >> This works fine; tests are successful.
> >>
> >>
> >>
> >> The error I encounter on both Ubuntu and Centos systems is the same.
> >> It looks like this on the make output:
> >>
> >> [ 58%] Building CXX object
> >> Modules/Core/ImageFunction/test/CMakeFiles/ITKImageFunctionTestDriver.
> >> dir/itkRayCastInterpolateImageFunctionTest.cxx.o
> >>
> >> /src/ITK/Modules/Core/ImageFunction/include/
> itkRayCastInterpolateImageFunction.hxx(38):
> >> error: member "<unnamed>::RayCastHelper<TInputImage,
> >> TCoordRep>::InputImageDimension [with TInputImage=itk::Image<unsigned
> >> TCoordRep>char,
> >> 3U>, TCoordRep=double]" was referenced but not defined
> >>
> >>     itkStaticConstMacro(InputImageDimension, unsigned int,
> >>
> >>     ^
> >>
> >>
> >>
> >> compilation aborted for
> >> /src/ITK/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFu
> >> n
> >> ctionTest.cxx
> >> (code 2)
> >>
> >> make[2]: ***
> >> [Modules/Core/ImageFunction/test/CMakeFiles/ITKImageFunctionTestDrive
> >> r .dir/itkRayCastInterpolateImageFunctionTest.cxx.o]
> >> Error 2
> >>
> >> make[1]: ***
> >> [Modules/Core/ImageFunction/test/CMakeFiles/ITKImageFunctionTestDrive
> >> r
> >> .dir/all]
> >> Error 2
> >>
> >> make: *** [all] Error 2
> >>
> >>
> >>
> >> My cmake setup looks like this:
> >>
> >> CC=/intel/bin/icc CXX=/intel/bin/icc cmake
> >> -DCMAKE_CXX_COMPILER:FILEPATH=$CXX -DCMAKE_C_COMPILER:FILEPATH=$CC
> >> -DModule_PerformanceBenchmarking:BOOL=ON ..
> >>
> >>
> >>
> >> Example generated CXX_FLAGS are from:
> >> ./Modules/Core/ImageFunction/test/CMakeFiles/ITKImageFunctionTestDriv
> >> e
> >> r.dir/flags.make
> >>
> >> # compile CXX with /intel/bin/icc
> >>
> >> CXX_FLAGS =   -w2 -wd1268 -wd981 -wd383 -wd1418 -wd1419 -wd2259 -wd1572
> >> -wd424 -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch
> >> -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -Wno-deprecated
> >> -Wno-invalid-offsetof -Woverloaded-virtual  -O3 -DNDEBUG -fPIE
> >> -I/src/ITK/Modules/Core/ImageAdaptors/include
> >> -I/src/ITK/build_icc/Modules/ThirdParty/KWIML/src
> >> -I/src/ITK/Modules/ThirdParty/KWIML/src
> >> -I/src/ITK/build_icc/Modules/ThirdParty/KWSys/src
> >> -I/src/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib
> >> -I/src/ITK/Modules/ThirdParty/VNL/src/vxl/vcl
> >> -I/src/ITK/Modules/ThirdParty/VNL/src/vxl/core
> >> -I/src/ITK/build_icc/Modules/ThirdParty/VNL/src/vxl/v3p/netlib
> >> -I/src/ITK/build_icc/Modules/ThirdParty/VNL/src/vxl/vcl
> >> -I/src/ITK/build_icc/Modules/ThirdParty/VNL/src/vxl/core
> >> -I/src/ITK/Modules/ThirdParty/VNLInstantiation/include
> >> -I/src/ITK/build_icc/Modules/Core/Common
> >> -I/src/ITK/Modules/Core/Common/include
> >> -I/src/ITK/build_icc/Modules/ThirdParty/Netlib
> >> -I/src/ITK/Modules/Numerics/Statistics/include
> >> -I/src/ITK/Modules/Filtering/ImageFilterBase/include
> >> -I/src/ITK/Modules/Core/Transform/include
> >> -I/src/ITK/Modules/Core/ImageFunction/include
> >> -I/src/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion
> >> -I/src/ITK/build_icc/Modules/ThirdParty/DoubleConversion/src/double-c
> >> o
> >> nversion
> >> -I/src/ITK/Modules/IO/BMP/include
> >> -I/src/ITK/build_icc/Modules/ThirdParty/Expat/src/expat
> >> -I/src/ITK/Modules/ThirdParty/Expat/src/expat
> >> -I/src/ITK/build_icc/Modules/ThirdParty/ZLIB/src
> >> -I/src/ITK/Modules/ThirdParty/ZLIB/src
> >> -I/src/ITK/build_icc/Modules/ThirdParty/GDCM
> >> -I/src/ITK/build_icc/Modules/ThirdParty/GDCM/src/gdcm/Source/Common
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFil
> >> e
> >> Format
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/Common
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectD
> >> e
> >> finition
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/MessageExchangeDef
> >> i
> >> nition
> >> -I/src/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEn
> >> c odingDefinition -I/src/ITK/Modules/IO/GDCM/include
> >> -I/src/ITK/Modules/IO/GIPL/include
> >> -I/src/ITK/build_icc/Modules/IO/ImageBase
> >> -I/src/ITK/Modules/IO/ImageBase/include
> >> -I/src/ITK/Modules/IO/JPEG/include
> >> -I/src/ITK/build_icc/Modules/ThirdParty/MetaIO/src/MetaIO/src
> >> -I/src/ITK/Modules/ThirdParty/MetaIO/src/MetaIO/src
> >> -I/src/ITK/Modules/IO/Meta/include
> >> -I/src/ITK/Modules/IO/NIFTI/include
> >> -I/src/ITK/Modules/IO/NRRD/include -I/src/ITK/Modules/IO/PNG/include
> >> -I/src/ITK/Modules/IO/TIFF/include -I/src/ITK/Modules/IO/VTK/include
> >> -I/src/ITK/Modules/Core/TestKernel/include
> >> -I/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo
> >> -I/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl
> >>
> >>
> >>
> >> Does anyone have a pointer to see where this error comes from? Thank
> you.
> >>
> >>
> >>
> >> -Jon
> >>
> >>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20170407/9fd31f34/attachment.html>


More information about the Insight-developers mailing list