[Insight-users] Re: Build problem

Gavin Baker gavinb+xtk at cs . mu . OZ . AU
Tue, 18 Nov 2003 14:50:08 +1100


Hello Zuang,

On Mon, Nov 17, 2003 at 01:40:42PM -0500, Zhuang Song wrote:

> I've tried several times to download ITK 1.4 tar file or use CVS, and
> then built it. It can't complete the make process for ITK itself. The
> error message is shown below.
> 
> make[7]: *** [Templates/vnl_vector+long_double-.o] Error 1
>
> [...snip...]

Something fundamental has gone wrong here.  I suggest you start with the
released 1.4 version of ITK, at least to begin with.  I also suggest you
have a read through the most excellent ITK Software Guide (available for
purchase or download at the main ITK website).  Chapter 2 contains quite
some detail on how to compile and install ITK.

The build process is quite straightforward.  First, make sure you have a
recent version of CMake (1.8).  Start from a fresh clean directory.  Then
you should be able to do something like:

% tar xfz ~/Downloads/InsightToolkit-1.4.0.tar.gz
% mkdir itk-linux
% cd itk-linux
% ccmake ../InsightToolkit-1.4.0

In this way you can keep the source tree separate from the build tree.  The
final command will invoke the interactive CMake program to configure paths
and options.

Then make sure everything gets configured properly.  In particular, on Unix
you should enable using the system zlib, png, and so on.  To speed things
up, I suggest you also disable BUILD_TESTING and BUILD_EXAMPLES, but enable
BUILD_SHARED_LIBS.

Make sure that the compiler is set correctly (use 't' to view the advanced
options), as your message indicated a problem there.  The C++ compiler is
set by CMAKE_CXX_COMPILER, and should be either 'c++' or 'g++' depending on
your system.  Similarly, CMAKE_C_COMPILER should be either 'cc' or 'gcc'
depending on your system.

After configuring with 'c' is complete, you can use 'g' to generate the
Makefiles.  Then just run the build:

% make

This will take a while...

There are lots of good docs on the ITK website, including tutorials and
getting started info at:

  http://www . itk . org/HTML/Tutorials . htm

If you are still having further problems, we would need to see what commands
you ran prior to getting the errors you pasted (above).

Good luck...

  :: Gavin

-- 
Gavin Baker                                Computer Vision Lab (CVMIL)
http://www . cs . mu . oz . au/~gavinb                 University of Melbourne