Hi Eric and David, thank you for your replies.<br><br>I tried with the Eric&#39;s configuration but I still get the segmentation fault (by the way Eric, I&#39;m using the 2.8.1 version of the &quot;cmake&quot; command and the system OpenGL libraries get setted up correctly by default).<br>
So like David said I&#39;ll have to compile and to link everything with X11. Fink didn&#39;t success with this work so I&#39;ll have to do it all by hand ^^<br><br>Cheers,<br>Rafael.<br><br><div class="gmail_quote">2010/7/9 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Rafael,<br>
<br>
You are going to have a hard time getting this to work with the system<br>
Python and system Tcl on any version of OS X.<br>
<br>
On 10.5, system Tk is built with Carbon, and on 10.6, system Tk is<br>
built with Cocoa.  In both cases, the system Python uses a _tkinter.so<br>
that is linked to the system Tk.<br>
<br>
This means that you cannot use the system Python with an X11 version<br>
of ttk.  If you want to do any X11/Tk work, then you should either<br>
build your own python and tcl, taking care to configure them both to<br>
use X11, or you should look around for Fink or MacPorts packages for<br>
python/tcl/ttk that are built with X11.<br>
<font color="#888888"><br>
   David<br>
</font><div><div></div><div><br>
<br>
On Fri, Jul 9, 2010 at 11:27 AM, Eric E. Monson &lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt; wrote:<br>
&gt; Hey Rafael,<br>
&gt;<br>
&gt; Okay, I had never tried it before, but I think I was able to get the Python wrapping to work with X11 on OS X. (I also tried to get the Tcl wrapping to work, but that would crash with a Segmentation fault any time I tried to run something with interactors -- not sure why.) I&#39;ve never used ttk, but my guess would be that you don&#39;t need to build VTK with the Tcl wrappers, only Python...<br>


&gt;<br>
&gt; I ran ccmake from a fresh build directory and set the options through that (leaving all others as they come up by default):<br>
&gt;<br>
&gt; ccmake ..<br>
&gt; c<br>
&gt; BUILD_TESTING: OFF<br>
&gt; BUILD_SHARED_LIBS: ON<br>
&gt; CMAKE_BUILD_TYPE: Release<br>
&gt; CMAKE_OSX_ARCHITECTURES: x86_64<br>
&gt; VTK_USE_COCOA: OFF<br>
&gt; VTK_USE_X: ON<br>
&gt; VTK_WRAP_PYTHON: ON<br>
&gt; c<br>
&gt; (Then it comes up with an error about not being able to find &quot;/System/Library/Frameworks/OpenGL.framework/GL/glx.h&quot;, but CMake/vtkTestGLX.cmake says it&#39;s using OPENGL_INCLUDE_DIR, which was set by default to /System/Library/Frameworks/OpenGL.framework. So, I changed the OPENGL stuff to:)<br>


&gt; e<br>
&gt; OPENGL_INCLUDE_DIR: /usr/X11R6/include<br>
&gt; OPENGL_gl_LIBRARY: /usr/X11R6/lib/libGL.dylib<br>
&gt; OPENGL_glu_LIBRARY: /usr/X11R6/lib/libGLU.dylib<br>
&gt; c<br>
&gt; g<br>
&gt; make -k -j7 (adjust the -j# for your number of cores...)<br>
&gt;<br>
&gt; I get a bunch of<br>
&gt; /usr/X11R6/include/GL/gl.h:1402:1: warning: &quot;GL_GLEXT_LEGACY&quot; redefined<br>
&gt; during the build, but it finishes okay.<br>
&gt;<br>
&gt; sudo make install (may not need to do this)<br>
&gt; cd Wrapping/Python<br>
&gt; sudo python setup.py install<br>
&gt;<br>
&gt; I&#39;ll attach a screen shot of running [vtk_src]/Examples/Tutorial/Step6/Python/Cone6.py<br>
&gt;<br>
&gt; I just used the Tcl wrapping this morning with Cocoa, so I know that works fine, and I use the Python wrappers all the time with Cocoa, but there&#39;s something not right in my build with my Tcl/X11 combo... Also, background gradients (like are common with the Infovis stuff) are screwed up with my Python/X11, but they don&#39;t crash or anything.<br>


&gt;<br>
&gt; I&#39;m using OS X 10.6.4, system Python 2.6, system Tcl/Tk 8.5.7, VTK git head from June 30, CMake 2.9.20100113<br>
&gt;<br>
&gt; Hope this helps,<br>
&gt; -Eric<br>
&gt;<br>
&gt; ------------------------------------------------------<br>
&gt; Eric E Monson<br>
&gt; Duke Visualization Technology Group<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div>&gt; On Jul 8, 2010, at 7:23 PM, Frava wrote:<br>
&gt;<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; I need to make a Python code that uses VTK &quot;X11&quot; work on OS X 10.6 but I only get a segmentation fault when I try to launch it (there is no problem with this code on Linux).<br>
&gt;&gt;<br>
&gt;&gt; Configuration : OS X 10.6.4 with XCode 3.2.3<br>
&gt;&gt;<br>
&gt;&gt; cmake ../VTK \<br>
&gt;&gt; -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \<br>
&gt;&gt; -DCMAKE_INSTALL_PREFIX:PATH=/Applications/MyApp.app/Contents/MacOS \<br>
&gt;&gt; -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=&quot;10.6&quot; \<br>
&gt;&gt; -DCMAKE_OSX_ARCHITECTURES:STRING=&quot;x86_64&quot; \<br>
&gt;&gt; -DBUILD_SHARED_LIBS:BOOL=ON \<br>
&gt;&gt; -DVTK_WRAP_PYTHON:BOOL=ON \<br>
&gt;&gt; -DVTK_WRAP_TCL:BOOL=ON \<br>
&gt;&gt; -DVTK_USE_CARBON:BOOL=OFF \<br>
&gt;&gt; -DVTK_USE_COCOA:BOOL=OFF \<br>
&gt;&gt; -DVTK_USE_X:BOOL=ON \<br>
&gt;&gt; -DVTK_USE_GUISUPPORT:BOOL=ON \<br>
&gt;&gt; -DVTK_USE_HYBRID:BOOL=OFF \<br>
&gt;&gt; -DVTK_USE_RPATH:BOOL=OFF \<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure if I need to turn on the TCL wrapper but the code uses TTK (Tile) classes so it needs a python 2.5 (or 2.6) linked with TCL/TK 8.5.<br>
&gt;&gt;<br>
&gt;&gt; Does anyone have a working configuration (or some advise) to help to fix this ?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Rafael.<br>
&gt;&gt;<br>
</div></div><div><div></div><div>&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>