[vtk-developers] vtkCommonCorePython static build failure

Pat Marion pat.marion at kitware.com
Thu Jun 28 10:58:42 EDT 2012


Hi,

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.

Pat



On Thu, Jun 28, 2012 at 10:34 AM, David Lonie <david.lonie at kitware.com>wrote:

> On Thu, Jun 28, 2012 at 10:26 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> > On Thu, Jun 28, 2012 at 8:23 AM, David Lonie <david.lonie at kitware.com>
> wrote:
> >> On Thu, Jun 28, 2012 at 10:01 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >>> On Thu, Jun 28, 2012 at 7:57 AM, David Lonie <david.lonie at kitware.com>
> wrote:
> >>>> Ah, ok -- nevermind then :-)
> >>>
> >>> It never hurts to try, though... you can add "-fPIC" to your CXXFLAGS
> and
> >>> rebuild VTK, and then if the modules are loaded into python in the
> right order
> >>> it just might work... I think that vtk-python still loads its modules
> with
> >>> RTLD_GLOBAL so it might be able to resolve symbols directly between the
> >>> python modules instead of requiring shared libraries.
> >>
> >> Success! Adding -fPIC to CFLAGS and CXXFLAGS is all that was needed
> >> for it to build.
> >
> > Yes, it will build, but I'm curious about whether you can "import vtk"
> > from python without it complaining about missing symbols.  Can you
> > try, just to satisfy my curiosity?
>
> It tries, but segfaults quickly.
>
> Dave
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120628/7f2e92d1/attachment.html>


More information about the vtk-developers mailing list