Slicer:Slicer 2.6 Building Leopard
From NAMIC Wiki
Home < Slicer:Slicer 2.6 Building Leopard
When you run ./slicer2/Scripts/genlib.tcl, you will get errors when trying to build incrTcl.
Running genlib.tcl again, the build should continue until partially through the ITK build, and then you will see this error:
Building CXX object Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_math.o /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx: In function 'bool vnl_math_isinf(float)': /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx:221: error: '__isnand' was not declared in this scope /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx: In function 'bool vnl_math_isinf(double)': /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx:223: error: '__isnand' was not declared in this scope /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx: In function 'bool vnl_math_isinf(long double)': /Users/hayes/slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx:225: error: '__isnand' was not declared in this scope make[2]: *** [Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_math.o] Error 1 make[1]: *** [Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/all] Error 2 make: *** [all] Error 2
This is due to a bug in ITK 2.6. You can either upgrade to a newer version of ITK, or you can open up the file:
slicer2/Lib/darwin-x86/Insight/Utilities/vxl/core/vnl/vnl_math.cxx
in a text editor, and remove line 66:
# define isnan(x) __isnand((double)x)
and replace it with the following:
#define isnan(x) std::isnan(x)
Then run genlib.tcl again.