[Insight-users] how to compile?

Luis Ibanez luis . ibanez at kitware . com
Fri, 30 Aug 2002 13:02:41 -0400


Hi Alberto,

It seems that the configuration is not picking
up gcc3.

The executable is usually named "g++3" for C++ and
"gcc3" for the C compiler.

Your command line is showing:

     usr/bin/gcc -g -O2 ....

Please make sure that you declare the
environment variables:

       CXX=g++3
       CC=gcc3

before you run Cmake.

After running CMake you may want to verify the
content of the CMakeCache.txt file and look for
the "g++3" string.

Also, avoid to use the combination " -g -O2 ",
this is known to cause problems in some cases.
Try using only "-g".


Please let us know if you have any problem,

   Thanks


    Luis




=========================================================

Please

Alberto Bert wrote:

> Hi Luis,
> 
> On Aug 30 at 10:43AM-0400, Luis Ibanez wrote:
> 
>>The Beta2 tarball is the most recent release,
>>please use this one.
>>(This is the one that corresponds to our 0_7
>>tag in CVS)
>>
> 
> Ups, sorry...
> 
> 
>>Luis
>>
> 
> Now I cannot compile the beta2 using gcc-3.0.4, I'm starting to think to be a little stupid  :-o
> 
> Thank you Luis,
> Alberto
> 
> *** Here is my ccmake configuration: ***
> 
>  BUILD_AUXILIARY                  ON                                                    
>  BUILD_EXAMPLES                   ON                                                    
>  BUILD_FEM_CODE                   ON                                                    
>  BUILD_FLTKIMAGEVIEWER            ON                                                    
>  BUILD_METAIMAGE                  ON                                                    
>  BUILD_SHARED_LIBS                ON                                                    
>  BUILD_TESTING                    ON                                                    
>  BUILD_VTKINTERFACE               ON                                                    
>  CABLE                            /usr/local/bin/cable                                  
>  CABLE_BUILD_DIR                  NOTFOUND                                              
>  CABLE_INCLUDE_DIR                /usr/local/share/Cable/include                        
>  CABLE_TCL_LIBRARY                /usr/local/lib/libCableTclFacility.so                 
>  EXECUTABLE_OUTPUT_PATH           /space/src/itk/beta2/Linux-2.4.18/bin                 
>  FLTK_BASE_LIBRARY                /usr/lib/libfltk.so                                   
>  FLTK_FLUID_EXE                   /usr/bin/fluid                                        
>  FLTK_INCLUDE_PATH                /usr/include                                          
>  ITK_DATA_ROOT                    /space/src/itk/beta2/Insight/Testing/Data             
>  ITK_USE_SYSTEM_STDLIB            ON                                                    
>  ITK_WRAP_TCL                     OFF                                                   
>  LIBRARY_OUTPUT_PATH              /space/src/itk/beta2/Linux-2.4.18/lib                 
>  TCL_INCLUDE_PATH                 /usr/include/tcl8.3                                   
>  TCL_LIBRARY                      /usr/lib/libtcl8.3.so                                 
>  TCL_LIBRARY_DEBUG                NOTFOUND                                              
>  TCL_STUB_LIBRARY                 /usr/lib/libtclstub8.3.a                              
>  TCL_STUB_LIBRARY_DEBUG           NOTFOUND                                              
>  TCL_TCLSH                        /usr/bin/tclsh                                        
>  TK_INCLUDE_PATH                  /usr/include/tcl8.3                                     TK_LIBRARY                       /usr/lib/libtk8.3.so                                  
>  TK_LIBRARY_DEBUG                 NOTFOUND                                              
>  TK_STUB_LIBRARY                  /usr/lib/libtkstub8.3.a                               
>  TK_STUB_LIBRARY_DEBUG            NOTFOUND                                              
>  TK_WISH                          /usr/bin/wish                                         
>  USE_FLTK                         ON                                                    
>  USE_FLTK_VERSION_1.0.11          ON                                                    
>  USE_FLTK_VERSION_1.1             OFF                                                   
>  USE_INSTALLED_VTK                ON                                                    
>  USE_VTK                          ON                                                    
>  VTKITK_WRAP_TCL                  OFF                                                   
>  VTK_BINARY_PATH                  NOTFOUND                                              
>  VTK_INSTALL_PATH                 /usr/local                                            
>  VW_RAW_DATA_PATH                 NOTFOUND 
> 
> *** The whole make output: ***
> 
> /usr/bin/cmake -S/space/src/itk/beta2/Insight -O/space/src/itk/beta2/Linux-2.4.18 -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/Linux-2.4.18
> cmake.depends is up-to-date
> /space/src/itk/beta2/Linux-2.4.18/Utilities: building default_target
> /usr/bin/cmake -S/space/src/itk/beta2/Insight/Utilities -O/space/src/itk/beta2/Linux-2.4.18/Utilities -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/Linux-2.4.18
> cmake.depends is up-to-date
> /space/src/itk/beta2/Linux-2.4.18/Utilities/zlib: building default_target
> /usr/bin/cmake -S/space/src/itk/beta2/Insight/Utilities/zlib -O/space/src/itk/beta2/Linux-2.4.18/Utilities/zlib -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/Linux-2.4.18cmake.depends is up-to-date
> /usr/bin/gcc -g -O2 -Ditkzlib_EXPORTS -fPIC -I/space/src/itk/beta2/Insight/Utilities/zlib -I/space/src/itk/beta2/Linux-2.4.18 -I/space/src/itk/beta2/Insight/Code/Numerics -I/space/src/itk/beta2/Insight/Code/Common -I/space/src/itk/beta2/Insight/Code/IO -I/space/src/itk/beta2/Linux-2.4.18/Code/Numerics/vxl -I/space/src/itk/beta2/Insight/Code/Numerics/vxl -I/space/src/itk/beta2/Linux-2.4.18/Code/Numerics/vxl/vcl -I/space/src/itk/beta2/Insight/Code/Numerics/vxl/vcl -I/space/src/itk/beta2/Insight/Utilities/png -I/space/src/itk/beta2/Insight/Utilities/zlib -I/usr/local/include/vtk   -D_PTHREADS  -I/usr/X11R6/include -c /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c -o adler32.o
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:21: `adler' was not 
>    declared in this scope
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:21: `buf' was not 
>    declared in this scope
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:21: `len' was not 
>    declared in this scope
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:22: `uLong adler32' 
>    redeclared as different kind of symbol
> /space/src/itk/beta2/Insight/Utilities/zlib/zlib.h:821: previous declaration of
>    `uLong adler32(long unsigned int, const Bytef*, unsigned int)'
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:22: initializer list 
>    being treated as compound expression
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:22: syntax error before `
>    adler'
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:25: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:27: `adler' was not 
>    declared in this scope
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:30: parse error before `
>    if' 
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:34: syntax error before `
>    -=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: parse error before `{
>    ' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:36: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:37: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:38: syntax error before `
>    -=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:42: syntax error before `
>    +=' token
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:44: syntax error before `
> /space/src/itk/beta2/Insight/Utilities/zlib/adler32.c:45: syntax error before `
>    %=' token
> make[5]: *** [adler32.o] Error 1
> make[4]: *** [default_target] Error 2
> make[3]: *** [default_target_zlib] Error 2
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Utilities] Error 2
> make: *** [default_target] Error 2
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>