Hi Eric and David, thank you for your replies.<br><br>I tried with the Eric's configuration but I still get the segmentation fault (by the way Eric, I'm using the 2.8.1 version of the "cmake" command and the system OpenGL libraries get setted up correctly by default).<br>
So like David said I'll have to compile and to link everything with X11. Fink didn't success with this work so I'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"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></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 <<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>> wrote:<br>
> Hey Rafael,<br>
><br>
> 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've never used ttk, but my guess would be that you don't need to build VTK with the Tcl wrappers, only Python...<br>
><br>
> I ran ccmake from a fresh build directory and set the options through that (leaving all others as they come up by default):<br>
><br>
> ccmake ..<br>
> c<br>
> BUILD_TESTING: OFF<br>
> BUILD_SHARED_LIBS: ON<br>
> CMAKE_BUILD_TYPE: Release<br>
> CMAKE_OSX_ARCHITECTURES: x86_64<br>
> VTK_USE_COCOA: OFF<br>
> VTK_USE_X: ON<br>
> VTK_WRAP_PYTHON: ON<br>
> c<br>
> (Then it comes up with an error about not being able to find "/System/Library/Frameworks/OpenGL.framework/GL/glx.h", but CMake/vtkTestGLX.cmake says it's using OPENGL_INCLUDE_DIR, which was set by default to /System/Library/Frameworks/OpenGL.framework. So, I changed the OPENGL stuff to:)<br>
> e<br>
> OPENGL_INCLUDE_DIR: /usr/X11R6/include<br>
> OPENGL_gl_LIBRARY: /usr/X11R6/lib/libGL.dylib<br>
> OPENGL_glu_LIBRARY: /usr/X11R6/lib/libGLU.dylib<br>
> c<br>
> g<br>
> make -k -j7 (adjust the -j# for your number of cores...)<br>
><br>
> I get a bunch of<br>
> /usr/X11R6/include/GL/gl.h:1402:1: warning: "GL_GLEXT_LEGACY" redefined<br>
> during the build, but it finishes okay.<br>
><br>
> sudo make install (may not need to do this)<br>
> cd Wrapping/Python<br>
> sudo python setup.py install<br>
><br>
> I'll attach a screen shot of running [vtk_src]/Examples/Tutorial/Step6/Python/Cone6.py<br>
><br>
> 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'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't crash or anything.<br>
><br>
> I'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>
><br>
> Hope this helps,<br>
> -Eric<br>
><br>
> ------------------------------------------------------<br>
> Eric E Monson<br>
> Duke Visualization Technology Group<br>
><br>
><br>
><br>
</div></div><div><div></div><div>> On Jul 8, 2010, at 7:23 PM, Frava wrote:<br>
><br>
>> Hi all,<br>
>><br>
>> I need to make a Python code that uses VTK "X11" 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>
>><br>
>> Configuration : OS X 10.6.4 with XCode 3.2.3<br>
>><br>
>> cmake ../VTK \<br>
>> -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \<br>
>> -DCMAKE_INSTALL_PREFIX:PATH=/Applications/MyApp.app/Contents/MacOS \<br>
>> -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="10.6" \<br>
>> -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64" \<br>
>> -DBUILD_SHARED_LIBS:BOOL=ON \<br>
>> -DVTK_WRAP_PYTHON:BOOL=ON \<br>
>> -DVTK_WRAP_TCL:BOOL=ON \<br>
>> -DVTK_USE_CARBON:BOOL=OFF \<br>
>> -DVTK_USE_COCOA:BOOL=OFF \<br>
>> -DVTK_USE_X:BOOL=ON \<br>
>> -DVTK_USE_GUISUPPORT:BOOL=ON \<br>
>> -DVTK_USE_HYBRID:BOOL=OFF \<br>
>> -DVTK_USE_RPATH:BOOL=OFF \<br>
>><br>
>> I'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>
>><br>
>> Does anyone have a working configuration (or some advise) to help to fix this ?<br>
>><br>
>> Regards,<br>
>> Rafael.<br>
>><br>
</div></div><div><div></div><div>>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> 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>
>><br>
>> 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>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> 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>
><br>
> 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>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br>