[MINC-users] Linker errors on OS X Tiger when compiling ITK MINC2ImageIO
Thomas Mansi
thomas_mansi at yahoo.fr
Sat Apr 5 16:10:49 EDT 2008
Dear all,
I would like to test the MINC IO factory of ITK but I am experiencing
some linking problems when compiling the tools.
I am on Mac OS X Tiger (32bits), HDF5 v 1.6.1 and here is what I did
so far.
+ I successfully compiled and installed netcdf 1.6.2 with -fno-common
option
+ I successfully compiled minc 2.0.15 without -fno-common option.
With -fno-common, I have the following linker error:
/bin/sh ./libtool --tag=CC --mode=link gcc -fno-common -o
minctoecat conversion/minctoecat/minctoecat.o conversion/minctoecat/
ecat_write.o conversion/minctoecat/machine_indep.o libvolume_io2.la
libminc2.la -lhdf5 -lz -lnetcdf -lm gcc -fno-common -o minctoecat
conversion/minctoecat/minctoecat.o conversion/minctoecat/ecat_write.o
conversion/minctoecat/machine_indep.o ./.libs/
libvolume_io2.a ./.libs/libminc2.a /usr/local//lib/libhdf5.dylib -lz /
usr/local//lib/libnetcdf.a -lm/usr/bin/ld: multiple definitions of
symbol _matrix_errnoconversion/minctoecat/minctoecat.o definition of
_matrix_errno in section (__DATA,__common)conversion/minctoecat/
ecat_write.o definition of _matrix_errno in section (__DATA,__common)/
usr/bin/ld: multiple definitions of symbol _matrix_errtxtconversion/
minctoecat/minctoecat.o definition of _matrix_errtxt in section
(__DATA,__common)conversion/minctoecat/ecat_write.o definition of
_matrix_errtxt in section (__DATA,__common)conversion/minctoecat/
machine_indep.o definition of _matrix_errno in section
(__DATA,__common)conversion/minctoecat/machine_indep.o definition of
_matrix_errtxt in section (__DATA,__common)collect2: ld returned 1
exit status
+ I then compile a CVS version of ITK. I enabled MINC2 support as
well as ITK_USE_REVIEW to compile the itkMINC2ImageIO files. But then
I get these linker errors (with or without -fno-common option):
[ 95%] Building CXX object Code/Review/CMakeFiles/ITKIOMINC2.dir/
itkMINC2ImageIO.o[ 95%] Building CXX object Code/Review/CMakeFiles/
ITKIOMINC2.dir/itkMINC2ImageIOFactory.oLinking CXX shared
library ../../bin/libITKIOMINC2.dylibld: common symbols not allowed
with MH_DYLIB output format with the -multi_module option/usr/local/
lib/libminc2.a(hdf_convenience.o) definition of common __m2_list
(size 16)/usr/local/lib/libminc2.a(minc_globdef.o) definition of
common _minc_call_depth (size 16)/usr/local/lib/libminc2.a
(minc_globdef.o) definition of common _minc_trash_var (size 16)/usr/
bin/libtool: internal link edit command failed
Do you have any idea about these issues? Have I missed something in
the installation procedure of MINC2?
Thank you in advance for your precious help!
Thomas
More information about the MINC-users
mailing list