[vtkusers] compiling VTK on Mac OSX with Python

Charles Moad cmoad at indiana.edu
Wed Dec 1 21:27:32 EST 2004


You should look at fink.  It has vtk and the python extensions.

- Charlie

On Dec 1, 2004, at 5:40 PM, Dave Reed wrote:

> Hi,
>
> I'm trying to get VTK with Python support compiled on Mac OS X 10.3. 
> I'm a long time Linux and Solaris user but just getting started with 
> OS X so I'm not up on all the changes that need made.
>
> I found this and tried following the same instructions:
>
> http://www.vtk.org/pipermail/vtkusers/2004-October/076684.html
>
> I installed python 2.4 (I thought I read there were some improvements
> with shared libraries for OS X in python 2.4) using:
>
> ./configure --prefix=/Users/dreed/py24 --enable-shared 
> BASECFLAGS=-fno-common
> make
> make install
>
> then downloaded VTK. I've tried both 4.2 and 4.4. I seem to get 
> farther with 4.4. I made certain the CMakeCache.txt file points out my 
> new python. VTK seems to want Tk which doesn't appear to be on my Mac. 
> Is there a specific Tk I should download and install?
>
> Compiling 4.4 finally dies when trying to:
>
> Building object file vtkTkRenderWidgetPython.o...
>
> It complains about some conflicting declarations of various X 
> functions (included some below) but the real problem seems to be I 
> don't have a tkMacOSX.h file. I didn't seem to have Tk on my Mac but 
> do have some Tcl files in:
> /System/Library/Frameworks/Tcl.framework
>
> VTK seems to need Tk so I installed Tk using darwinports.org but that 
> doesn't seem to have that file. Can anyone help me get vtk installed 
> with Python (darwinports.org doesn't include Python support in its VTK 
> port).
>
> Thanks,
> Dave
>
>
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkIntXlibDecls.h:935: 
> error: declaration
>    of C function `void XQueryColor(Display*, long unsigned int, 
> XColor*)'
>    conflicts with
> /usr/include/X11/Xlib.h:3484: error: previous declaration `int
>    XQueryColor(Display*, long unsigned int, XColor*)' here
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkIntXlibDecls.h:939: 
> error: declaration
>    of C function `void XQueryColors(Display*, long unsigned int, 
> XColor*, int)'
>    conflicts with
> /usr/include/X11/Xlib.h:3493: error: previous declaration `int
>    XQueryColors(Display*, long unsigned int, XColor*, int)' here
> In file included from 
> /Users/dreed/VTK/Rendering/vtkTkRenderWidget.cxx:38,
>                  from 
> /Users/dreed/VTK/Rendering/vtkTkRenderWidgetPython.cxx:17:
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:20:22: 
> tkMacOSX.h: No such file or directory
> In file included from 
> /Users/dreed/VTK/Rendering/vtkTkRenderWidget.cxx:38,
>                  from 
> /Users/dreed/VTK/Rendering/vtkTkRenderWidgetPython.cxx:17:
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:76: 
> error: syntax
>    error before `*' token
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:77: 
> error: syntax
>    error before `*' token
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:78: 
> error: syntax
>    error before `*' token
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:79: 
> error: syntax
>    error before `*' token
> /Users/dreed/VTK/Rendering/tkInternals/tk84OSX/tkMacOSXInt.h:80: 
> error: syntax
>    error before `*' token
> make[3]: *** [vtkTkRenderWidgetPython.o] Error 1
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Rendering] Error 2
> make: *** [default_target] Error 2
>
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>




More information about the vtkusers mailing list