[vtkusers] VTK doesn't work on OSX 10.6 Snow Leopard

David Gobbi david.gobbi at gmail.com
Mon Oct 19 10:03:58 EDT 2009


VTK-cvs is not working 100% on SnowLeopard yet, regardless of what
anyone says.  My problems have mainly been with the vtkTkRenderWidget.
 The issues are discussed below.

I use cmake 2.6.4, since I generally don't trust cmake-cvs.  So in
order to build i386 (for Carbon) I set the CFLAGS and CXXFLAGS
environment variables to "-arch i386".

You must force VTK to use tk 8.4 in order to get the vtkTkRenderWidget
to compile, since the default tk on 10.6 is a patched version of 8.5.7
that uses Cocoa (i.e. it is not the official tk 8.5.7)

Both version of python that come with 10.6 link against tk 8.5, and as
I mentioned above, the vtkTkRenderWidget only works with tk 8.4.  This
leaves us up the creek with no paddle, as far as using the
vtkTkRenderWidget with Python goes.  However: there is very messy fix
for this.  If you copy the _tkinter.so from OS X 10.5, and copy it
over top of the _tkinter.so in SnowLeopard's python2.5, then you can
force python2.5 to use tk8.4.  This is the solution that I have
adopted.

The optimal solution would be to get the vtkTkRenderWidget to work
with Cocoa and the patched tk8.5.7 that Apple shipped with 10.6.  I've
started working on this and hopefully will find some time to finish it
this week.

   David



More information about the vtkusers mailing list