[vtkusers] graphic test error when compiling 4.2.5 with mac 10.3

Brad King brad.king at kitware.com
Thu Feb 12 11:19:39 EST 2004


Xu Zhong Hao wrote:
> Hi Vtk users
> 
> Please help me on this, when i compile vtk 4.2.5 with mac 10.3 and 
> carbon core, i got this error
> 
> /vtk4.2.5build/Graphics/Testing/Cxx: building default_target
> Building dependencies. cmake.depends...
> Building object file GraphicsCxxTests.o...
> Building object file Mace.o...
> Building object file expCos.o...
> Building object file CellLocator.o...
> Building object file PointLocator.o...
> Building object file FrustumClip.o...
> Building object file RGrid.o...
> Building object file volProt.o...
> Building executable /vtk4.2.5build/bin/GraphicsCxxTests...
> ld: multiple definitions of symbol _zError
> /usr/lib/libz.1.dylib(zutil.o) definition of _zError
> /vtk4.2.5build/bin/libvtkzlib.a(zutil.o) definition of _zError in 
> section (__TEXT,__text)
> ld: multiple definitions of symbol _zlibVersion
> /usr/lib/libz.1.dylib(zutil.o) definition of _zlibVersion
> /vtk4.2.5build/bin/libvtkzlib.a(zutil.o) definition of _zlibVersion in 
> section (__TEXT,__text)
> make[5]: *** [/vtk4.2.5build/bin/GraphicsCxxTests] Error 1
> make[4]: *** [default_target] Error 2
> make[3]: *** [default_target_Cxx] Error 2
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Graphics_Testing] Error 2
> make: *** [default_target] Error 2
> xyzhao:/vtk4.2.5build xyzhao$
> 
> anyone please advice

VTK links to several system libraries.  On the Mac, some of these link 
to the zlib library, which provides some of the same symbols that are 
included in vtkzlib.  Set VTK_USE_SYSTEM_ZLIB to ON in the cmake 
configuration to avoid this problem.  If this works for you, we can make 
this fix get applied automatically in a later VTK version.

-Brad




More information about the vtkusers mailing list