[Insight-users] RE: compile problem: vnl object files not linked in!

Luis Ibanez luis.ibanez at kitware.com
Fri, 06 Feb 2004 21:58:16 -0500


Hi Zach,

Thanks for sending your CMakeCache.txt file.

It seems that the error you are facing is due to an
ITK/VXL bug that only manifests itself with the linker
on the Mac.

Brad commited a fix for it on January 28.

Please update your CVS checkout  in order to
get Brad's corrections.


Let us know if you still find any problems,


   Thanks,


     Luis


-------------------------
Zachary Pincus wrote:

> Thanks for the quick reply, Luis!
> 
> The CMake cache file is attached to this email, as a gzipped  
> attachment. (The mailing list software kept bouncing my message because  
> it was too large.)
> 
> The build directory I am using was freshly created -- there were no  
> other static build attempts in the same directory before.
> 
> Here is some additional information:
> 
> I reran ccmake to get verbose output so I could indicate the precise  
> link command that causes the trouble.
> Here is relevant output from the verbose makefile:
> -------------------
> make[6]: Entering directory  
> `/Volumes/Atlotl/zpincus/Downloads/Libraries/ImageSegmentationToolkit/ 
> itk-bin/Code/Common'
> Building shared library  
> /Volumes/Atlotl/zpincus/Downloads/Libraries/ImageSegmentationToolkit/ 
> itk-bin/bin/libitkvnl_inst.dylib...
> /sw/bin/cmake -E remove -f  
> /Volumes/Atlotl/zpincus/Downloads/Libraries/ImageSegmentationToolkit/ 
> itk-bin/bin/libitkvnl_inst.dylib
> c++ -dynamiclib   -o  
> /Volumes/Atlotl/zpincus/Downloads/Libraries/ImageSegmentationToolkit/ 
> itk-bin/bin/libitkvnl_inst.dylib vnl_matrix_fixed_ref+double.4.3-.o  
> vnl_matrix_fixed_ref+double.4.4-.o vnl_matrix_fixed_ref+double.2.3-.o  
> vnl_matrix_fixed_ref+double.2.2-.o vnl_matrix_fixed_ref+double.3.12-.o  
> vnl_matrix_fixed+double.3.12-.o vnl_vector+unsigned_char-.o   -L/sw/lib  
> -L.
> --------------------
> 
> It looks like a lot of the .o object files that are needed for linking  
> are not included on the link line -- e.g. vnl_math.o and such, where  
> the missing symbols are defined.
> 
> In fact, if I manually go to the Code/Common directory and execute the  
> command:
> c++ -dynamiclib -o  
> /Volumes/Atlotl/zpincus/Downloads/Libraries/ImageSegmentationToolkit/ 
> itk-bin/bin/libitkvnl_inst.dylib vnl_matrix_fixed_ref+double.4.3-.o  
> vnl_matrix_fixed_ref+double.4.4-.o vnl_matrix_fixed_ref+double.2.3-.o  
> vnl_matrix_fixed_ref+double.2.2-.o vnl_matrix_fixed_ref+double.3.12-.o  
> vnl_matrix_fixed+double.3.12-.o vnl_vector+unsigned_char-.o  
> ../../Utilities/vxl/core/vnl/vnl_math.o -L/sw/lib -L.
> 
> (note that I have explicitly included the vnl_math.o file from it's  
> home several directories away)
> Then the link errors no longer include complaints about missing symbols  
> from vnl_math.
> So it seems pretty clearly to be a problem with not including enough of  
> the vnl object files on that link line.
> 
> Thanks,
> 
> Zach Pincus
> 
> Department of Biochemistry and Program in Biomedical Informatics
> Stanford University School of Medicine
>