[vtkusers] OS X VTK: SetFrontProcess, vtkTkRenderWidget

Gordon Kindlmann gk at cs.utah.edu
Fri May 9 16:50:12 EDT 2003


hello, 

I seem to have just build VTK on OS X (10.2.5, gcc 3.1 20020420).  The
steps I took to build it are detailed below.  I have two problems.

1) When I run "vtk" from a darwin terminal, the wish window comes up, but
when I click on it to bring it to the foreground, I get the following
at the wish prompt:

  % SetFrontProcess failed,-606

I can run other VTK programs (which take command-line arguments via
the TCL variables argv,arc), and they seem to run okay.  My minimalist
isosurfacing program even allows me to move the TK slider to change
the isovalue, but I can't foreground the window containing that
slider, or the window containing the rendering (which prevents me from
rotating the camera).

2) vtkTkRenderWidget command failed in another script with a TCL error
"invalid command name".

Are both of these problems related to using Cocoa instead of Carbon?

Also, there was a problem building, as described below.

Thanks,
Gordon




Building things "out of the box" failed.  : "...libvtkpng.a(png.o) had
an illegal reference to _crc32 defined in indirectly referenced
dynamic library /usr/lib/libz.1.1.3.dylib".  I seem to have fixed this
by changing VTK_USE_SYSTEM_PNG to ON in ccmake, and setting the PNG
library and include paths to the /sw locations created by fink.  But
what would I do have I didn't have fink's png installation?

........... how I built VTK

1) got <http://www.cmake.org/files/cmake-1.6.6-darwin.tar.gz> and
following directions in README, putting binaries /usr/local, and made
sure that "which cmake" returned /usr/local/bin/cmake

2) got <ftp://public.kitware.com/pub/vtk/vtk4.2/VTK-4.2-LatestRelease.tar.gz>
and put it in ~/vtk.

3) cd ~/vtk
   mkdir build
   tar xzvf VTK-4.2-LatestRelease.tar.gz
   cd VTK-4.2.2
   ccmake

      changed CMAKE_INSTALL_PREFIX to /Users/gk/vtk/build
      changed VTK_USE_CARBON to OFF
      changed VTK_USE_COCOA to ON
      changed VTK_WRAP_TCL to ON
      typed "c"
      typed "c"
      typed "g"

   make

4) An hour later...

Building object file vtkCocoaRenderWindowInteractorTcl.o...
Building object file vtkCocoaRenderWindowTcl.o...
Building static library /Users/gk/vtk/VTK-4.2.2/bin/libvtkRenderingTCL.a...
/Users/gk/vtk/VTK-4.2.2/Rendering/tkInternals: building default_target
Building dependencies. cmake.depends...
cmake.depends is up-to-date
/Users/gk/vtk/VTK-4.2.2/Rendering/tkInternals/tk84: building default_target
Building dependencies. cmake.depends...
cmake.depends is up-to-date
/Users/gk/vtk/VTK-4.2.2/Rendering/tkInternals/tk84OSX: building default_target
Building dependencies. cmake.depends...
cmake.depends is up-to-date
/Users/gk/vtk/VTK-4.2.2/Wrapping/Tcl: building default_target
Building dependencies. cmake.depends...
Building object file vtkTkAppInit.o...
Building executable /Users/gk/vtk/VTK-4.2.2/bin/vtk...
ld: /Users/gk/vtk/VTK-4.2.2/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-4.2.2/bin/vtk] Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Wrapping_Tcl] Error 2
make: *** [default_target] Error 2

5) ccmake

      changed VTK_USE_SYSTEM_PNG to ON
      "c"
      it complained about PNG_blah_blah not found, "e"
      changed PNG_LIBRARY to /sw/lib/libpng.a
      changed PNG_PNG_INCLUDE_IDR /sw/include
      "c"
      "c"  (for good measure)
      "g"

   make
   make install
   cd ../build/bin
   setenv PATH ${PATH}:`pwd`
   cd
   which vtk

6) vtk




More information about the vtkusers mailing list