[Insight-developers] ITK 3.14 cannot build with GCC on non-ix86 (due to Rounding code) vnl_math_rnd_halfinttoeven

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 22 08:22:37 EDT 2009


Hi Steve,

Thanks for pointing this out.

This seems to indicate that some TRY_COMPILE and TRY_RUN
tests from VNL are not being executed correctly in these
platforms.

We will have to track where in the code we are testing for

          VNL_CHECK_FPU_ROUNDING_MODE

The test may be improper for that architecture, or it may
not be executed correctly there.


------

inline int vnl_math_rnd_halfinttoeven(double  x)
{
# ifdef VNL_CHECK_FPU_ROUNDING_MODE
   assert(fegetround()==FE_TONEAREST);
# endif
   int r;
   __asm__ __volatile__ ("fistpl %0" : "=m"(r) : "t"(x) : "st");
   return r;
}

------------


   Luis



--------------------------
Mathieu Malaterre wrote:
> On Wed, Jul 22, 2009 at 8:07 AM, Steve M. Robbins<steve at sumost.ca> wrote:
> 
>>Hi,
>>
>>Has anyone successfully built ITK using GCC on a platform other than
>>x86 or amd64?
>>
>>The Debian builds for 3.14 are failing [1] on all platforms (other
>>than i386 and amd64), mainly with this error:
>>
>>
>>>/build/buildd-insighttoolkit_3.14.0-1-alpha-pWsSda/insighttoolkit-3.14.0/Utilities/vxl/core/vnl/vnl_math.h: In member function 'virtual void itk::SPSAOptimizer::GenerateDelta(unsigned int)':
>>>/build/buildd-insighttoolkit_3.14.0-1-alpha-pWsSda/insighttoolkit-3.14.0/Utilities/vxl/core/vnl/vnl_math.h:220: error: unknown register name 'st' in 'asm'
>>>make[3]: *** [Code/Numerics/CMakeFiles/ITKNumerics.dir/itkSPSAOptimizer.o] Error 1
> 
> 
> There is another error on hppa (I guess the asm might still fail),
> apparently there is an issue with the size of char:
> 
> https://buildd.debian.org/fetch.cgi?pkg=insighttoolkit&arch=hppa&ver=3.14.0-1&stamp=1248118205&file=log&as=raw
> 
> ...
> cd /build/buildd/insighttoolkit-3.14.0/Build/Utilities/kwsys &&
> /usr/bin/c++   -Ditksys_EXPORTS -DKWSYS_NAMESPACE=itksys
> -Wno-deprecated  -ftemplate-depth-50 -Wall -Wno-deprecated -O3
> -DNDEBUG -fPIC -I/build/buildd/insighttoolkit-3.14.0/Build
> -I/build/buildd/insighttoolkit-3.14.0/Code/Algorithms
> -I/build/buildd/insighttoolkit-3.14.0/Code/BasicFilters
> -I/build/buildd/insighttoolkit-3.14.0/Code/Common
> -I/build/buildd/insighttoolkit-3.14.0/Code/Numerics
> -I/build/buildd/insighttoolkit-3.14.0/Code/IO
> -I/build/buildd/insighttoolkit-3.14.0/Code/Numerics/FEM
> -I/build/buildd/insighttoolkit-3.14.0/Code/Numerics/NeuralNetworks
> -I/build/buildd/insighttoolkit-3.14.0/Code/SpatialObject
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/MetaIO
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/NrrdIO
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/NrrdIO
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/DICOMParser
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/DICOMParser
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/expat
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/expat
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/nifti/niftilib
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/nifti/znzlib
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/itkExtHdrs
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities
> -I/build/buildd/insighttoolkit-3.14.0/Utilities
> -I/build/buildd/insighttoolkit-3.14.0/Code/Numerics/Statistics
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/vxl/v3p/netlib
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/vxl/vcl
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/vxl/core
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/vxl/v3p/netlib
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/vxl/vcl
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/vxl/core
> -I/build/buildd/insighttoolkit-3.14.0/Build/Utilities/gdcm
> -I/build/buildd/insighttoolkit-3.14.0/Utilities/gdcm/src   -o
> CMakeFiles/itksys.dir/SystemInformation.o -c
> /build/buildd/insighttoolkit-3.14.0/Utilities/kwsys/SystemInformation.cxx
> In file included from
> /build/buildd/insighttoolkit-3.14.0/Utilities/kwsys/SystemInformation.cxx:21:
> /build/buildd/insighttoolkit-3.14.0/Build/Utilities/itksys/FundamentalType.h:62:24:
> error: operator '==' has no left operand
> /build/buildd/insighttoolkit-3.14.0/Build/Utilities/itksys/FundamentalType.h:66:3:
> error: #error "No native data type can represent an 8-bit integer."
> make[3]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/SystemInformation.o] Error 1
> make[3]: Leaving directory `/build/buildd/insighttoolkit-3.14.0/Build'
> ...
> 
> 
> 2cts


More information about the Insight-developers mailing list