Slicer:Slicer 2.6 Building Leopard

From Slicer Wiki
Jump to: navigation, search
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 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)

Save the file and run genlib.tcl again.

Next, you'll get the following error:

Building C object SlicerIO/CMakeFiles/slicerio.dir/slicerio.o
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c: In function 'slicerFopen':
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c:95: error: '__sF' undeclared (first use in this function)
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c:95: error: (Each undeclared identifier is reported only once
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c:95: error: for each function it appears in.)
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c: In function 'slicerFclose':
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c:211: error: '__sF' undeclared (first use in this function)
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c: In function 'slicerFread':
/Users/hayes/slicer2/Lib/darwin-x86/NAMICSandBox/SlicerIO/slicerio.c:258: error: '__sF' undeclared (first use in this function)
...etc.

You can just ignore this error. It will disable SlicerIO, but shouldn't affect other portions of Slicer.