[Insight-users] Installation build errors

Neil Killeen Neil.Killeen@atnf.csiro.au
Mon, 18 Nov 2002 12:43:28 +1100 (EST)


Luis (& Leila)

On Thu, 14 Nov 2002, Luis Ibanez wrote:
>
> Hi Neil,
>
> ITK do compile cleanly with gcc 3.1
> It also compiles without problem with gcc 3.2
>
> There is a nightly build on gcc3.2 on the dashboard.
>
> The typical problems we have found with these
> compilers are
>
> 1) inconsistent installation (e.g. mixing
>     libraries between the different versions
>     of the compiler).
>
> 2) inconsistent setup of the CC and CXX
>     environment variables. Before you run
>     CMake you have to make sure that CXX
>     points to the g++ executable and CC
>     points to the gcc executable of the
>     corresponding version. (CC should not
>     point to g++).
>

I found that if i used g++ (rather than cc) i made
little progress.  The very first compilation of
C source with g++ failed with a very long list of errors.
So I have been using 'cc' and 'gcc-2.95.3'

>
> Please let us know if you find any further problems.
>
>
>    Thanks
>      Luis
>

well i have yet to get the whole system to build.  as
i indicated, I resolved those linking errors.  However,
I am now encountering another compile  error.

This is occurring in many files, but the first is when executing

#!/bin/csh
gcc -ftemplate-depth-50 -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Testing/Code/Common  \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Algorithms \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/BasicFilters \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/IO \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/FEM \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/Statistics \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/build/Code/Numerics/vxl \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/build/Code/Numerics/vxl/vcl \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl/vcl \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/SpatialObject \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/png \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/zlib \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/MetaIO \
-I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/build \
-c
/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Testing/Code/Common/itkDynamicMeshTest.cxx \
-o itkDynamicMeshTest.o



The error actually comes from the assembler, and is


/usr/ccs/bin/as: "/var/tmp/ccZyzg8T.s", line 9410: error: can't compute
value of an expression involving an external symbol

Ack !  I don't rightly no what symbol in the C++ is upsetting it.

I have tried various fiddlings about with the code to see if I could
resolve this.

The first few lines, after all the typedefs, are

int itkDynamicMeshTest(int, char**)
{

  /**
   * Create the mesh through its object factory.
   */


  MeshType::Pointer mesh(MeshType::New());



If I comment out all of the contents except this one remaining line the
error still occurs.  If I comment out  this line as well, the error
goes away (as you might expect), but at least it indictaes the typedef
definitions get through ok.

I have tried replacing this line with one without the typedefs, but
to no avail (same error).

I found however, that gcc-3.1.1 does compile this factory class ok.

So presently I am stuck with the fact that the gcc-3.1.1 build I tried
earlier failed with templating errors, and the gcc-2.95.3 is failing
with the above error  :-(

I don't know if there are some switched for 2.95.3 that might help.
But fundamentally, I don't know why its unhappy.  Possibly some
combination of namespaces and heavy typedef-ing.

Any thoughts ?

Perhaps I will try again to get 3.1.1 going...

cheers
Neil