[MINC-users] minc2 build error in mincconvert

EJ Nikelski nikelski at bic.mni.mcgill.ca
Mon Nov 12 11:51:00 EST 2007


Hi again,

   Thanks for the feedback, Vlad & Andrew.  I've changed the build
paths to be more sane (less "whiffy"?), and am now building everything
into a "minc2' directory.

   I decided to build hdf5 w/o szip -- hoping that I never encounter a
minc2 volume using that compression (or does hdf5 build szip decoding
in by default?) -- as it looked to be causing some sort of a namespace
clash (with compress).  You know, this sort of namespace problem
doesn't happen with C++ ...

   So, I rebuilt, .. and am still getting a problem with "compress"
when building minc2 (everything else tested OK).  Specifically, I see
..

==============================================
01/quarantine/Nov2007/minc2/include  -g -O2 -MT
progs/mincconvert/mincconvert.o -MD -MP -MF $depbase.Tpo -c -o
progs/mincconvert/mincconvert.o progs/mincconvert/mincconvert.c &&\
        mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2
-L/data/raid01/quarantine/Nov2007/minc2/lib -o mincconvert
progs/mincconvert/mincconvert.o libvolume_io2.la libminc2.la -lhdf5
-lz -lnetcdf -lm
libtool: link: warning: library
`/data/raid01/quarantine/Nov2007/minc2/lib/libnetcdf.la' was moved.
libtool: link: warning: library
`/data/raid01/quarantine/Nov2007/minc2/lib/libnetcdf.la' was moved.
gcc -g -O2 -o mincconvert progs/mincconvert/mincconvert.o
-L/data/raid01/quarantine/Nov2007/minc2/lib ./.libs/libvolume_io2.a
./.libs/libminc2.a /data/raid01/quarantine/Nov2007/minc2/lib/libhdf5.a
-lz /data/raid01/quarantine/Nov2007/minc2/lib/libnetcdf.a -lm
/data/raid01/quarantine/Nov2007/minc2/lib/libz.a(compress.o): In
function `compress':
compress.c:(.text+0xe0): multiple definition of `compress'
progs/mincconvert/mincconvert.o:(.data+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `compress' changed from 4 in
progs/mincconvert/mincconvert.o to 178 in
/data/raid01/quarantine/Nov2007/minc2/lib/libz.a(compress.o)
/usr/bin/ld: Warning: type of symbol `compress' changed from 1 to 2 in
/data/raid01/quarantine/Nov2007/minc2/lib/libz.a(compress.o)
collect2: ld returned 1 exit status
make[2]: *** [mincconvert] Error 1
===============================

   BTW, note the libtool message ...
>>>libtool: link: warning: library
`/data/raid01/quarantine/Nov2007/minc2/lib/libnetcdf.la' was moved.

  Beats me what's causing this message. netcdf was "make cleaned" and
rebuilt from scratch. Nothing was "moved".  Also, mincconvert *does*
use an int called "compress", and zlib *does* have a function called
"compress".  Ideas?

As before, I'm using Ubuntu Edgy, and gcc as follows:
jnikelski at chimera:~/software/HClab_build/Nov2007/minc2/minc-2.0.14$
gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)

The build process is pretty quick, so I'd be willing to give pretty
much anything a try.

-Jim



On 11/12/07, Andrew Janke <a.janke at gmail.com> wrote:
> Hi Jim,
>
> I have only every used zlib compression in hdf5, I am currently using
> zlib 1.2.3 (as per yourself) and hdf5 1/6.5 although in my case I use
> the std debian/ubuntu libraries as compared to building them myself.
>
> I echo Vlads comment and would add that if you really do want separate
> sub-dirs for each "product" then I would reccomend using something
> like GNU stow to bring it all back together or you will have
> horrendous link-lines and LD_LIBRARY_PATH's.
>
> Alright, perhaps not horrendous, but decidedly "whiffy". :)
>
> As for the specific build error you are having I would guess that
> there is a compress in both zlib and szip? I have certainly not seen
> this error anyhow.
>
>
> a
>
>
> On Nov 11, 2007 9:21 AM, EJ Nikelski <nikelski at bic.mni.mcgill.ca> wrote:
> > Hi all,
> >
> >    I finally decided to jump onto the minc2 train, however I've run
> > into a slight build problem. Here are the details:
> >
> > 1. I build and install some prerequisites ...
> >    zlib-1.2.3, szip-2.1, hdf5-1.6.6, netcdf-3.6.2
> >
> >    .... all without a problem.
> >
> > 2.  I build minc2 with this ...
> >
> > ./configure
> >     --prefix=/data/raid01/quarantine/Nov2007/minc2
> >     --enable-minc2
> >     --enable-acr-nema
> >     --with-build-path=/data/raid01/quarantine/Nov2007/netcdf-3.6.2
> >                      :/data/raid01/quarantine/Nov2007/hdf5-1.6.6
> >                      :/data/raid01/quarantine/Nov2007/zlib-1.2.3
> >
> > The ./configure works OK, but the make fails (ultimately) with an
> > error building mincconvert...
> >
> > gcc -g -O2 -o mincconvert progs/mincconvert/mincconvert.o
> > -L/data/raid01/quarantine/Nov2007/netcdf-3.6.2/lib
> > -L/data/raid01/quarantine/Nov2007/hdf5-1.6.6/lib
> > -L/data/raid01/quarantine/Nov2007/zlib-1.2.3/lib
> > ./.libs/libvolume_io2.a -L/data/raid01/quarantine/Nov2007/szip-2.1/lib
> > ./.libs/libminc2.a
> > /data/raid01/quarantine/Nov2007/hdf5-1.6.6/lib/libhdf5.a
> > /data/raid01/quarantine/Nov2007/szip-2.1/lib/libsz.so -lz
> > /data/raid01/quarantine/Nov2007/netcdf-3.6.2/lib/libnetcdf.a -lm
> > -Wl,--rpath -Wl,/data/raid01/quarantine/Nov2007/szip-2.1/lib
> > -Wl,--rpath -Wl,/data/raid01/quarantine/Nov2007/szip-2.1/lib
> > /data/raid01/quarantine/Nov2007/zlib-1.2.3/lib/libz.a(compress.o): In
> > function `compress':
> > compress.c:(.text+0xe0): multiple definition of `compress'
> > progs/mincconvert/mincconvert.o:(.data+0x0): first defined here
> > /usr/bin/ld: Warning: size of symbol `compress' changed from 4 in
> > progs/mincconvert/mincconvert.o to 178 in
> > /data/raid01/quarantine/Nov2007/zlib-1.2.3/lib/libz.a(compress.o)
> > /usr/bin/ld: Warning: type of symbol `compress' changed from 1 to 2 in
> > /data/raid01/quarantine/Nov2007/zlib-1.2.3/lib/libz.a(compress.o)
> > collect2: ld returned 1 exit status
> > make[2]: *** [mincconvert] Error 1
> >
> > Has anyone seen this before? Could this be an inconsistency in the
> > latest version of zlib?
> >
> > PS: I'm building minc-2.0.14 on Ubuntu Edgy.
> >
> >
> > -Jim
> >
> >
> >
> > --
> > =================================
> > Jim Nikelski, Ph.D.
> > Postdoctoral Research Fellow
> > Bloomfield Centre for Research in Aging
> > Lady Davis Institute for Medical Research
> > Sir Mortimer B. Davis - Jewish General Hospital
> > McGill University
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
>
>
> --
> Andrew Janke   (a.janke at gmail.com || http://a.janke.googlepages.com/)
> Canberra->Australia    +61 (402) 700 883
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


-- 
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University
Tel: (514) 340-8222 x 2298
Fax: (514) 340-8295


More information about the MINC-users mailing list