[Insight-developers] Overloading ambiguity error while compiling Slicer; Solaris, ITK 3-18

Attila Nagy nagy.attila at yahoo.com
Sat Jul 31 18:26:19 EDT 2010


Hi folks,

while trying to compile Slicer for Solaris, I ran into this problem (see at the end of the mail).
Some parameters: x86 64 bit mode, ITK-3.18, Studio express 10/06 (or 06/10, I never know... :)), Slicer 3-6
I did not have this error with earlier compiler versions (S12, S12u1) (*).
In fact I think I see what the problem might be: math_iso.h is included in math.h, and math_iso.h only contains one definition (double, double), not the other one. A cast would maybe do, but we're talking about a .txx file, and metaprogramming is waay beyond me :)
According to Su..^W Oracle Studio's IDE the offending code is in 
Code/Review/itkLabelPerimeterEstimationCalculator.txx

(http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/itkLabelPerimeterEstimationCalculator.txx?view=log&root=Insight&pathrev=ITK-3-18)

in line 155:
int numberOfNeighbors = (int)vcl_pow( 2.0, ImageDimension );

Could maybe somebody take a look at it?

(*): this may simply indicate that this ambiguity was not caught by earlier compiler versions, for example:
http://forums.sun.com/thread.jspa?threadID=5330068
and
http://forums.sun.com/thread.jspa?threadID=5330068

Thanks very much,
Attila

ps: I could overcome the warning at least :D

======== output ============

"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3/Applications/CLI/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h", line 129: Warning: Identifier expected instead of "}".
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Review/itkLabelPerimeterEstimationCalculator.txx", line 155: Error: Overloading ambiguity between "std::pow(double, double)" and "std::pow(double, int)".
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Review/itkShapeLabelMapFilter.txx", line 68:     Where: While instantiating "itk::LabelPerimeterEstimationCalculator<itk::Image<unsigned char, 3>>::Compute()".
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Review/itkShapeLabelMapFilter.txx", line 68:     Where: Instantiated from itk::ShapeLabelMapFilter<itk::LabelMap<itk::StatisticsLabelObject<unsigned char, 3>>, itk::Image<unsigned char, 3>>::BeforeThreadedGenerateData().
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Review/itkStatisticsLabelMapFilter.txx", line 44:     Where: Instantiated from itk::StatisticsLabelMapFilter<itk::LabelMap<itk::StatisticsLabelObject<unsigned char, 3>>, itk::Image<unsigned char, 3>>::BeforeThreadedGenerateData().
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Common/itkObjectFactory.h", line 52:     Where: Instantiated from itk::LabelImageToStatisticsLabelMapFilter<itk::Image<unsigned char, 3>, itk::Image<unsigned char, 3>, itk::LabelMap<itk::StatisticsLabelObject<unsigned char, 3>>>::GenerateData().
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3-lib/Insight/Code/Common/itkObjectFactory.h", line 52:     Where: Instantiated from itk::DoCenteredInitialization<itk::Image<float, 3>, itk::Image<float, 3>, itk::VersorRigid3DTransform<double>, itk::CenteredVersorTransformInitializer<itk::Image<float, 3>, itk::Image<float, 3>>>(itk::SmartPointer<itk::Image<float, 3>>&, itk::SmartPointer<itk::Image<float, 3>>&, itk::SmartPointer<itk::SpatialObject<3>>&, itk::SmartPointer<itk::SpatialObject<3>>&, unsigned, unsigned, std::string &).
"/ufsbckp/head-64-slicer/studio.ex-apache/Slicer3/Applications/CLI/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx", line 706:     Where: Instantiated from non-template code.
1 Error(s) and 1 Warning(s) detected.
gmake[6]: *** [Applications/CLI/BRAINSTools/BRAINSCommonLib/CMakeFiles/BRAINSCommonLib.dir/BRAINSFitHelper.cxx.o] Error 2



      


More information about the Insight-developers mailing list