[vtkusers] Building VTK 4.4 on Mac OS X 10.2.6 (illegal reference to symbol: _crc32)

Martin Dunschen zabaione at uk2.net
Tue Jan 13 16:50:34 EST 2004


In my quest I had the same problem. Maybe it makes a difference if you  
run 'cmake' several times? Eventually I was able to build the libs.
I also recommend to run 'sudo make install' at some point to copy the  
libraries and header files into appropriate locations (copies things to  
/usr/local/lib/vtk and /usr/local/include/vtk)

Another thing I learned was: You need to compile and link any  
applications with gcc version 3. For a reason I dont understand  
'Project Builder' is configured to run 'g++2' and you end up with  
'undefined symbols' when you link your app. I am not sure if it works  
to build the libs using g++2 (can be done by setting the value fo the  
C++compiler in the file CMakeCache.txt)

I would like to write how I eventually got the installation working,  
but the thing is I cant remember all steps, sorry.

I still have problems with calling vtk from python...

Martin
On Tuesday, Jan 13, 2004, at 19:07 Europe/London, Gordon Kindlmann  
wrote:

> hello,
>
>> From: Mathieu Malaterre <mathieu.malaterre at kitware.com>
>> Organization: Kitware Inc.
>> To: Martin Dunschen <zabaione at uk2.net>, <vtkusers at vtk.org>
>> Subject: Re: [vtkusers] make fails with compilation error on Mac OS X
>> Date: Sat, 10 Jan 2004 17:53:21 -0500
>>
>> Martin,
>>
>>   You have threes options:
>> - you switch to VTK 4.4
>> - you switch to VTK CVS
>> - or you apply theses changes only:
>> http://vtk.org/cgi-bin/cvsweb.cgi/VTK/Rendering/ 
>> vtkCarbonRenderWindowInteractor.cxx.diff?r1=1.6&r2=1.7
>>
>> Their is currently no VTK 4.4 tarball, meanwhile you can go to:
>> http://www.vtk.org/cgi-bin/viewcvs.cgi/ 
>> ?cvsroot=VTK&only_with_tag=release-4-4
>> Scroll down the page and click 'Download tarball'
>
> I used this link to download a tarball, and then I got the most recent  
> cmake:
> <http://www.cmake.org/files/v1.8/cmake-1.8.3-osx.dmg>
>
> And I did the following:
>
>   tar xzvf cvs_root.tar.gz
>   cd VTK
>   ccmake .
>
> And I set up things like this:
>
>  BUILD_EXAMPLES                   ON
>  BUILD_SHARED_LIBS                OFF
>  CMAKE_BACKWARDS_COMPATIBILITY    1.8
>  CMAKE_BUILD_TYPE
>  CMAKE_INSTALL_PREFIX             /usr/local
>  PNG_PNG_INCLUDE_DIR              PNG_PNG_INCLUDE_DIR-NOTFOUND
>  TCL_INCLUDE_PATH                  
> /Library/Frameworks/Tcl.framework/Versions/8.4/Headers
>  TCL_LIBRARY                      -framework Tcl
>  TK_INCLUDE_PATH                   
> /Library/Frameworks/Tk.framework/Versions/8.4/Headers
>  TK_INTERNAL_PATH                  
> /Users/gk/vtk/VTK/Rendering/tkInternals/tk84OSX
>  TK_LIBRARY                       -framework Tk
>  VTK_DATA_ROOT                    VTK_DATA_ROOT-NOTFOUND
>  VTK_USE_CARBON                   OFF
>  VTK_USE_COCOA                    ON
>  VTK_USE_HYBRID                   OFF
>  VTK_USE_PARALLEL                 OFF
>  VTK_USE_PATENTED                 OFF
>  VTK_USE_RENDERING                ON
>  VTK_USE_X                        OFF
>  VTK_WRAP_JAVA                    OFF
>  VTK_WRAP_PYTHON                  OFF
>  VTK_WRAP_TCL                     ON
>
> and typed "c" twice, then "g", then:
>
>   make
>
> and after awhile, I get
>
> Building object file vtkOpenGLPropertyTcl.o...
> Building object file vtkOpenGLRayCastImageDisplayHelperTcl.o...
> Building object file vtkOpenGLRenderWindowTcl.o...
> Building object file vtkOpenGLRendererTcl.o...
> Building object file vtkOpenGLTextureTcl.o...
> Building object file vtkOpenGLVolumeRayCastMapperTcl.o...
> Building object file vtkOpenGLVolumeTextureMapper2DTcl.o...
> Building object file vtkOpenGLFreeTypeTextMapperTcl.o...
> Building object file vtkCocoaRenderWindowInteractorTcl.o...
> Building object file vtkCocoaRenderWindowTcl.o...
> Building static library /Users/gk/vtk/VTK/bin/libvtkRenderingTCL.a...
> /Users/gk/vtk/VTK/Rendering/tkInternals: building default_target
> Building dependencies. cmake.depends...
> cmake.depends is up-to-date
> /Users/gk/vtk/VTK/Rendering/tkInternals/tk84: building default_target
> Building dependencies. cmake.depends...
> cmake.depends is up-to-date
> /Users/gk/vtk/VTK/Rendering/tkInternals/tk84OSX: building  
> default_target
> Building dependencies. cmake.depends...
> cmake.depends is up-to-date
> /Users/gk/vtk/VTK/Wrapping/Tcl: building default_target
> Building dependencies. cmake.depends...
> Building object file vtkTkAppInit.o...
> Building executable /Users/gk/vtk/VTK/bin/vtk...
> ld: /Users/gk/vtk/VTK/bin/libvtkpng.a(png.o) illegal reference to  
> symbol: _crc32 defined in indirectly referenced dynamic library  
> /usr/lib/libz.1.1.3.dylib
> make[3]: *** [/Users/gk/vtk/VTK/bin/vtk] Error 1
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Wrapping_Tcl] Error 2
> make: *** [default_target] Error 2
>
> Please advice on where to go from here.
>
> Thanks very much,
> Gordon
>
> _______________________________________________
> This is the private VTK discussion list.Please keep messages on-topic.  
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list