Hi,<br><br>If you want python modules, you must build VTK with shared libraries.  But, you can make a fully static build where even the modules are static libs, and everything is then statically linked into the vtkpython interpreter binary.  To compile the python modules as static libs, turn OFF all the PYTHON_MODULE_vtk*Python_BUILD_SHARED options.<br>

<br>Pat<br><br><br><br><div class="gmail_quote">On Thu, Jun 28, 2012 at 10:34 AM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Jun 28, 2012 at 10:26 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> On Thu, Jun 28, 2012 at 8:23 AM, David Lonie <<a href="mailto:david.lonie@kitware.com">david.lonie@kitware.com</a>> wrote:<br>
>> On Thu, Jun 28, 2012 at 10:01 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>> On Thu, Jun 28, 2012 at 7:57 AM, David Lonie <<a href="mailto:david.lonie@kitware.com">david.lonie@kitware.com</a>> wrote:<br>
>>>> Ah, ok -- nevermind then :-)<br>
>>><br>
>>> It never hurts to try, though... you can add "-fPIC" to your CXXFLAGS and<br>
>>> rebuild VTK, and then if the modules are loaded into python in the right order<br>
>>> it just might work... I think that vtk-python still loads its modules with<br>
>>> RTLD_GLOBAL so it might be able to resolve symbols directly between the<br>
>>> python modules instead of requiring shared libraries.<br>
>><br>
>> Success! Adding -fPIC to CFLAGS and CXXFLAGS is all that was needed<br>
>> for it to build.<br>
><br>
> Yes, it will build, but I'm curious about whether you can "import vtk"<br>
> from python without it complaining about missing symbols.  Can you<br>
> try, just to satisfy my curiosity?<br>
<br>
</div>It tries, but segfaults quickly.<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>