[Insight-users] Problems while trying to compile the examples.
Luis Ibanez
luis . ibanez at kitware . com
Mon, 15 Jul 2002 12:14:45 -0400
Hi Linglan,
Some examples have dependencies that
condition if they are built or not.
For example, some of them require FLTK
to be installed, some others require VTK.
By enabling just Auxiliary and Examples it is to
expect that not all the examples will be compiled.
About the second group or errors that you posted:
It is not a good idea to call ccmake in subdirectories.
(e.g. in Insight/Examples) since CMake will navigate
downstream in the directory tree but not into the
parent directory.
Please invoke "ccmake" in the top build directory
and give the source directory as parameter.
For example, I usually build Insight in:
~/lib/Insight
so, I cd to ~/lib/Insight and invoke
ccmake ~/src/Insight
given that ~/src/Insight is where the sources are.
Then, I can call "make" at any level of the
directory tree.
The invokation of ccmake in subdirectories will
result in inconsistent Makefiles since most of
the project-wide settings will not be available
at the subdirectory level.
Please let us know if that helps,
Thanks
Luis
===================================================
Linglan Edwards wrote:
> Hi,
>
> I set the BUILD_AUXILIARY and BUILD_EXAMPLES on, and generated the
make file. I
> did a make. at various places including a lot of the examples, I got the
> following kind of messages:
>
> ....
> c++ -g -O2 -ftemplate-depth-50
> -I/Development/ITK/Insight/Examples/MRIBiasCorrection
-I/Development/ITK/Insight
> -I/Development/ITK/Insight/Code/Numerics
-I/Development/ITK/Insight/Code/Common
> -I/Development/ITK/Insight/Code/IO
-I/Development/ITK/Insight/Code/Numerics/vxl
> -I/Development/ITK/Insight/Code/Numerics/vxl
> -I/Development/ITK/Insight/Code/Numerics/vxl/vcl
> -I/Development/ITK/Insight/Code/Numerics/vxl/vcl
> -I/Development/ITK/Insight/Utilities/png
> -I/Development/ITK/Insight/Utilities/zlib
> -I/Development/ITK/Insight/Code/BasicFilters
> -I/Development/ITK/Insight/Code/Algorithms
> -I/Development/ITK/Insight/Code/Numerics/Statistics
> -I/Development/ITK/Insight/Auxiliary/MetaImage
> -I/Development/ITK/Insight/Examples/MRIBiasCorrection -D_PTHREADS -c
> /Development/ITK/Insight/Examples/MRIBiasCorrection/ImageCorrector -o
> ImageCorrector.o
> c++:
/Development/ITK/Insight/Examples/MRIBiasCorrection/ImageCorrector: linker
> input file unused since linking not done
>
> -------
>
> I found that a lot of the examples were not compiled. Then I went
into the
> ./Examples directory, did a ccmake, and then 'make', and got the
following error
> messages:
> -------
> c++ -g -O2 itkAntiAliasBinaryImageFilterExample.o /Code/Common
> /Code/BasicFilters /Code/Algorithms /Code/Common /Code/IO
> /Examples/StreamedWatershedSegmentation/ParameterFileParser
>
-L/Development/ITK/Insight/Examples/StreamedWatershedSegmentation/ParameterFileP
> arser -lVXLNumerics -lITKCommon -lITKBasicFilters -lCio -lm -lparam
> -lITKBasicFilters -lITKCommon -lVXLNumerics -lITKIO -lVXLNumerics
-lITKCommon
> -lITKBasicFilters -lCio -lm -lparam -lITKBasicFilters -lITKCommon
-lVXLNumerics
> -lITKIO
>
-Wl,-R,/Development/ITK/Insight/Examples/StreamedWatershedSegmentation/Parameter
> FileParser -o itkAntiAliasBinaryImageFilterExample
> c++: /Code/Common: No such file or directory
> c++: /Code/BasicFilters: No such file or directory
> c++: /Code/Algorithms: No such file or directory
> c++: /Code/Common: No such file or directory
> c++: /Code/IO: No such file or directory
> c++: /Examples/StreamedWatershedSegmentation/ParameterFileParser: No
such file
> or directory
> *** Error code 1
> The following command caused the error:
> c++ -g -O2 itkAntiAliasBinaryImageFilterExample.o /Code/Common
> /Code/BasicFilters /Code/Algorithms /Code/Common /Code/IO
> /Examples/StreamedWatershedSegmentation/ParameterFileParser
>
-L/Development/ITK/Insight/Examples/StreamedWatershedSegmentation/ParameterFileP
> arser -lVXLNumerics -lITKCommon -lITKBasicFilters -lCio -lm -lparam
> -lITKBasicFilters -lITKCommon -lVXLNumerics -lITKIO -lVXLNumerics
-lITKCommon
> -lITKBasicFilters -lCio -lm -lparam -lITKBasicFilters -lITKCommon
-lVXLNumerics
> -lITKIO
>
-Wl,-R,/Development/ITK/Insight/Examples/StreamedWatershedSegmentation/Parameter
> FileParser -o itkAntiAliasBinaryImageFilterExample
> make: Fatal error: Command failed for target
> `itkAntiAliasBinaryImageFilterExample'
> Current working directory
> /Development/ITK/Insight/Examples/AntiAliasBinaryImageFilter
> *** Error code 1
> The following command caused the error:
> make - all
> make: Fatal error: Command failed for target `default_target'
> Current working directory
> /Development/ITK/Insight/Examples/AntiAliasBinaryImageFilter
> *** Error code 1
> The following command caused the error:
> cd /Development/ITK/Insight/Examples/AntiAliasBinaryImageFilter; make -
> default_target
> make: Fatal error: Command failed for target
> `default_target_AntiAliasBinaryImageFilter'
> Current working directory /Development/ITK/Insight/Examples
> *** Error code 1
> The following command caused the error:
> make - all
> make: Fatal error: Command failed for target `default_target'
> -------
>
> Did I miss something?
>
> Thanks,
>
> Linglan
> ============================
> Linglan Edwards, Ph.D.
> Senior Software Engineer
> National Library of Medicine
> Phone: (301) 435-3147
> Email: linglan@nlm.nih.gov
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>