[Insight-users] how to compile?
Alberto Bert
abert at mauriziano . it
Tue, 3 Sep 2002 12:57:20 +0200
Hi Luis,
On Aug 30 at 01:02PM-0400, Luis Ibanez wrote:
>
> 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 ....
Actually gcc is a symb link to gcc-3.0...
>
> Please make sure that you declare the
> environment variables:
>
> CXX=g++3
> CC=gcc3
>
> before you run Cmake.
...anyway I've tryed.
>
> 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".
OK, I've also update the pre-proc to cpp-3.0
>
>
> Please let us know if you have any problem,
Well, after some trial, it compiles, BUT:
In order to compile I've to deselect everything concerning vtk and fltk:
BUILD_AUXILIARY *ON
BUILD_EXAMPLES *ON
BUILD_FEM_CODE *ON
BUILD_METAIMAGE *ON
BUILD_SHARED_LIBS *ON
BUILD_TESTING *ON
CMAKE_CXX_FLAGS *-g
CMAKE_C_FLAGS *-g
CMAKE_INSTALL_PREFIX */usr/local
DART_ROOT *NOTFOUND
EXECUTABLE_OUTPUT_PATH */space/src/itk/beta2/without_vtk_fl/bin
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/without_vtk_fl/lib
USE_FLTK *OFF
USE_VTK *OFF
VW_RAW_DATA_PATH *NOTFOUND
Else:
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/gcc-3.0/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/gcc-3.0/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
it gives the error reported below.
Note that if I include fltk options (no vtk), it doesn't work too
(with diffrent errors "undefined references".)
I've got vtk 4.0 (compiled with gcc-2.95, but should not matter) and fltk 1.0.11-5
installed (debian pack.)
Maybe some error in the ccmake selection...
Anyway now I can go on with my work,
thak you very much,
Alberto
Error got with the second cmake setting:
/usr/bin/cmake -S/space/src/itk/beta2/Insight -O/space/src/itk/beta2/gcc-3.0 -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/gcc-3.0
cmake.depends is up-to-date
/space/src/itk/beta2/gcc-3.0/Utilities: building default_target
/usr/bin/cmake -S/space/src/itk/beta2/Insight/Utilities -O/space/src/itk/beta2/gcc-3.0/Utilities -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/gcc-3.0
cmake.depends is up-to-date
/space/src/itk/beta2/gcc-3.0/Utilities/zlib: building default_target
/usr/bin/cmake -S/space/src/itk/beta2/Insight/Utilities/zlib -O/space/src/itk/beta2/gcc-3.0/Utilities/zlib -H/space/src/itk/beta2/Insight -B/space/src/itk/beta2/gcc-3.0
cmake.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/gcc-3.0 -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/gcc-3.0/Code/Numerics/vxl -I/space/src/itk/beta2/Insight/Code/Numerics/vxl -I/space/src/itk/beta2/gcc-3.0/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 `
+=' 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: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 `
%=' token
/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