[Insight-users] SegmentationEditor : ERRATA

Luis Ibanez luis.ibanez@kitware.com
Wed, 18 Sep 2002 23:03:27 -0400


Hi Mathieu,

My guess about the error you reported turned out to be bogus.

The actual origin of the error was a duplicate symbol in the
SegmentationEditor code. The error disappeared when using
static libraries because the linker didn't care about the
repeated symbols.

ITK can be built with shared libraries without problem under
Linux.

Brad fixed the actual problem in the code, so you may be able
to rebuild now using shared libraries.
(that is, turning BUILD_SHARED_LIBS=ON).


   My apologies for the wrong hint.


        Luis




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

Luis Ibanez wrote:

 >
 > Hi Mathieu,
 >
 > The duplicate symbols could be a consequence of your configuration
 > settings. It looks like you enabled the "shared" libraries option.
 > Our current approach for automatic instantiation of templates doesn't
 > allow to create shared libraries directly.  In order to create shared
 > libraries it will be necessary to manually instantiate the particular
 > classes. (an example of how to do this is available at directories
 > Examples/ITKFiltersLib and Examples/ITKRegistrationLib)
 >
 > Please disable the "BUILD_SHARED_LIBS" option and also avoid the use
 > of "-g" and "-O2" simultaneously.  This combination is know to produce
 > inconsistent code.
 >
 > Also, since you have been trying several compilers, please make sure
 > that you recompile all the packages using the same C++ compiler.
 > This includes VTK and FLTK.
 >
 >
 > Please let us know if you continue experiencing any problem,
 >
 >   Thanks
 >
 >     Luis
 >
 >
 >
 > -=================================================
 >
 >
 > Mathieu Malaterre wrote:
 >
 >> hi all,
 >>
 >>   I am still stuck on trying to build SegmentationEditor on a Linux
 >> Box. Last time I had troubles with gcc-3.1.1 which lack some
 >> string-functions (in bas_string.h). So I switch to gcc-3.2, which
 >> passes where gcc-3.1.1 failed.
 >> But now I get those weird errors:
 >>
 >>
 >> [mmalat@ibm InsightBin]$ cd Examples/SegmentationEditor/Common/
 >> [mmalat@ibm Common]$ make
 >> /usr/local/bin/cmake
 >> -S/home/mmalat/Stage2002/Insight/Examples/SegmentationEditor/Common
 >> -O/home/mmalat/Stage2002/InsightBin3/Examples/SegmentationEditor/Common
 >> -H/home/mmalat/Stage2002/Insight -B/home/mmalat/Stage2002/InsightBin3
 >> rm -f libvtkWSTCommonTCL.so
 >> /usr/bin/g++  -rdynamic -shared -g -O2 -Wno-deprecated
 >> -ftemplate-depth-50 -o
 >> /home/mmalat/Stage2002/InsightBin3/Lib/libvtkWSTCommonTCL.so
 >> vtkWSTCommonTCLInit.o vtkBinaryVolumeTcl.o vtkBinaryVolumeLogicTcl.o
 >> vtkBoundingBoxTcl.o vtkPatchedImageReaderTcl.o
 >> vtkPatchedLookupTableTcl.o vtkWSBoundingBoxManagerTcl.o
 >> vtkWSLookupTableManagerTcl.o vtkBinaryVolumeTcl.o
 >> vtkBinaryVolumeLogicTcl.o vtkBoundingBoxTcl.o
 >> vtkPatchedImageReaderTcl.o vtkPatchedLookupTableTcl.o
 >> vtkWSBoundingBoxManagerTcl.o vtkWSLookupTableManagerTcl.o
 >> vtkITKWatershedFilterAndWriterTcl.o
 >> -L/home/mmalat/Stage2002/InsightBin3/Lib
 >> -L/home/mmalat/Stage2002/VTKBin3/Lib
 >> 
-L/home/mmalat/Stage2002/InsightBin3/Examples/Examples/SegmentationEditor/Common 

 >> -L/home/mmalat/Stage2002/InsightBin3/Examples/Examples/vtkITK/Common
 >> -L/usr/X11R6/lib -lpthread -ldl -lpthread -ldl -lm -lGL -lXt  -lSM
 >> -lICE  -L/usr/X11R6/lib -lX11 -lXext  -lm -lITKAlgorithms
 >> -lVXLNumerics -lITKCommon -lITKBasicFilters -lm -lvtkFilteringTCL
 >> -lvtkCommonTCL -ltcl -lITKNumerics -lITKCommon -lVXLNumerics -lGL
 >> -lXt  -lSM -lICE -L/usr/X11R6/lib -lX11 -lXext  -lvtkFiltering
 >> -lvtkCommon -lpthread -lm -ldl
 >> 
-Wl,-rpath,/home/mmalat/Stage2002/InsightBin3/Lib:/home/mmalat/Stage2002/VTKBin3/Lib:/home/mmalat/Stage2002/InsightBin3/Examples/Examples/SegmentationEditor/Common:/home/mmalat/Stage2002/InsightBin3/Examples/Examples/vtkITK/Common:/usr/X11R6/lib 

 >>
 >> vtkBinaryVolumeTcl.o: In function `vtkBinaryVolumeNewCommand()':
 >> 
/home/mmalat/Stage2002/InsightBin3/Examples/SegmentationEditor/Common/vtkBinaryVolumeTcl.cxx:9: 

 >> multiple definition of `vtkBinaryVolumeNewCommand()'
 >> 
vtkBinaryVolumeTcl.o:/home/mmalat/Stage2002/InsightBin3/Examples/SegmentationEditor/Common/vtkBinaryVolumeTcl.cxx:9: 

 >> first defined here
 >>
 >> [snip]
 >>
 >> I found on itk mailing list a similar error:
 >> http://www.itk.org/pipermail/insight-users/2002-July/000659.html
 >>
 >> but I switched python off and I am still getting this error. Does
 >> anyone knows how to work around, any help appreciate. Thank you !
 >>
 >> mathieu
 >>
 >>
 >> _______________________________________________
 >> Insight-users mailing list
 >> Insight-users@public.kitware.com
 >> http://public.kitware.com/mailman/listinfo/insight-users
 >>
 >
 >
 >