[Insight-users] Link error compiling ITK
Luis Ibanez
luis.ibanez at kitware.com
Tue Jan 10 11:00:32 EST 2006
Hi Rene,
It seems that you have a misconfigured Linux system.
You may want ot reinstall your Linux system before you continue
experimenting with ITK.
There is not much that we can do to help you if your compiler
and system libraries are not installed correctly.
Have you tried building any other large size project in that
machine ?
VTK for example ?
BTW, note that GCC compiled code is not necesarily portable
across different versions of compilers. So, you shouldn't
expect code compiled for gcc 3.3 to be linkable with code
compiled with gcc 4.0. Most of the time it may work fine,
but the name mangling is not guaranteed to be stable accross
versions. All that to say, that part of the problem may be
that you may be mixing versions of gcc when building ITK
and your application.
Regards,
Luis
-----------------------------
René Sánchez Martín wrote:
> Dear ITK users:
>
> About one or two months ago I compiled ITK 2.4 with gcc 4.0 in the
> server of our lab. I tested it with some code and everything was fine.
> Two weeks ago, one of my partners in the lab started to use ITK. Last
> week, he had strange errors at execution time related to glibc:
>
> *** glibc detected *** free(): invalid pointer: 0x083b0c68 ***
>
>
> The code compiled but it crashed at execution time. The code was pretty
> simple, (it just read and image), so I suspected that the problem was
> rather related to ITK installation than the code itself. I take the code
> and tried in my laptop, and the result was the same. I suspected it was
> a problem with a system library (maybe libstdc++-libc6?) and I tried to
> compiled again and execute some code I have tested thousands of times in
> my own laptop and it didn't worked, neither in the server nor in my
> laptop. I am using Debian and I strongly believe that it is a problem
> with a package I updated in both machines (apt-get dist-upgrade).
>
> I tried to use more stable versions of gcc (gcc 3.4) and ITK (2.2) to
> solve the problem. I tried to compile ITK 2.2 and I had the following
> error:
>
> Building object file itkMaskImageFilterTest.o...
> Building object file itkMaskNegatedImageFilterTest.o...
> Building object file itkMathematicalMorphologyImageFilterTest.o...
> Building object file itkMaximumImageFilterTest.o...
> Building object file itkMeanImageFilterTest.o...
> Building object file itkMedianImageFilterTest.o...
> Building object file itkMinimumImageFilterTest.o...
> Building object file itkMinimumMaximumImageCalculatorTest.o...
> Building object file itkMinimumMaximumImageFilterTest.o...
> Building object file itkMirrorPadImageTest.o...
> Building object file itkMultiplyImageFilterTest.o...
> Building executable /home/dario/itk/itk2.2/bin/itkBasicFiltersTests...
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIfLj2EEES2_E8SetPolesEv'
> referenced in section `.rodata' of
> itkBSplineResampleImageFunctionTest.o: defined in discarded section
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIfLj2EEES2_E8SetPolesEv'
> of itkBSplineResampleImageFunctionTest.o
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIfLj2EEENS1_IdLj2EEEE8SetPolesEv'
> referenced in section `.rodata' of
> itkBSplineResampleImageFunctionTest.o: defined in discarded section
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIfLj2EEENS1_IdLj2EEEE8SetPolesEv'
> of itkBSplineResampleImageFunctionTest.o
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIfLj2EEEddE2:
>
> 3SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> referenced in section `.rodata' of
> itkBSplineResampleImageFunctionTest.o: defined in discarded section
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIfLj2EEEddE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> of itkBSplineResampleImageFunctionTest.o
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIfLj2EEEdfE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> referenced in section `.rodata' of
> itkBSplineResampleImageFunctionTest.o: defined in discarded section
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIfLj2EEEdfE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> of itkBSplineResampleImageFunctionTest.o
> `.gnu.linkonce.t._ZN3itk21StatisticsImageFilterINS_5ImageIhLj2EEEE10MakeOutputEj'
> referenced in section `.rodata' of itkBilateralImageFilterTest3.o:
> defined in
> discarded section
> `.gnu.linkonce.t._ZN3itk21StatisticsImageFilterINS_5ImageIhLj2EEEE10MakeOutputEj'
> of itkBilateralImageFilterTest3.o
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIdLj2EEES2_E8SetPolesEv'
> referenced in section `.rodata' of
> itkInterpolateImagePointsFilterTest.o: defined in discarded section
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIdLj2EEES2_E8SetPolesEv'
> of itkInterpolateImagePointsFilterTest.o
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositionImageFilterINS_5ImageIdLj3EEES2_E8SetPolesEv'
> referenced in section `.rodata' of
> itkInterpolateImagePointsFilterTest.o: defined in discarded section
> `.gnu.linkonce.t._ZN3itk31BSplineDecompositio:
> nImageFilterINS_5ImageIdLj3EEES2_E8SetPolesEv' of
> itkInterpolateImagePointsFilterTest.o
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIdLj3EEEddE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj3EEERK10vnl_matrixIlERS8_IdEj'
> referenced in section `.rodata' of
> itkInterpolateImagePointsFilterTest.o: defined in discarded section
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIdLj3EEEddE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj3EEERK10vnl_matrixIlERS8_IdEj'
> of itkInterpolateImagePointsFilterTest.o
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIdLj2EEEddE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> referenced in section `.rodata' of
> itkInterpolateImagePointsFilterTest.o: defined in discarded section
> `.gnu.linkonce.t._ZNK3itk31BSplineInterpolateImageFunctionINS_5ImageIdLj2EEEddE23SetInterpolationWeightsERKNS_15ContinuousIndexIdLj2EEERK10vnl_matrixIlERS8_IdEj'
> of itkInterpolateImagePointsFilterTest.o
> collect2: ld devolvió el estado de salida 1
> make[7]: *** [/home/dario/itk/itk2.2/bin/itkBasicFiltersTests] Error 1
> make[6]: *** [default_target] Error 2
> make[5]: *** [default_target_BasicFilters] Error 2
> make[4]: *** [default_target] Error 2
> make[3]: *** [default_target_Code] Error 2
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Testing] Error 2
> make: *** [default_target] Error 2
>
>
> I need to use ITK. I don't care if it is the 2.4 I have already compiled
> but doesn't seem to work in execution time or if it is the version I
> tried to compile. Any sugestion to get a solution?
>
> Thanks in advance.
>
> Rene Sanchez.
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list