[vtkusers] vtk python lib's dependency on libvtkCommonPython not set by cmake

michael edens mike at frosty.ce.montana.edu
Sun Jun 8 13:40:57 EDT 2003


>>>>>

Prabu,

Thanks for the reply. I re-ran cmake many times after setting the wrap 
python option to ON.
After more searching, it appears that the reason none of the 
vtk*Python.so libraies are
included in the dependecy lists of the main cmake file is due to the 
way CMakeLists for various  modules handle APPLE. When APPLE is defined 
they don't include the libraries.
I tried commenting the appropriate lines out and re-running cmake. The 
library dependencies
were changed to include the vtkCommonPython.so etc. This didn't help 
since now the compiler
complains with

Building shared module 
/Users/mike/Development/vtk/VTK-4.2.2/bin/libvtkFilteringPython.so...
ld: can't locate file for: -lvtkCommonPython
make[3]: *** 
[/Users/mike/Development/vtk/VTK-4.2.2/bin/libvtkFilteringPython.so] 
Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Imaging] Error 2
make: *** [default_target] Error 2

I'm stummped. Looking through the mailing list it appears that a number 
of Mac OSX users have
vtk and python working together. As a check I tried the normal build 
for Mac OSX and Cocoa same errors as previous post. By  the way I'm 
using python2.3. I'll keep digging.

Again, thanks.

Michael Edens

>>>>> "ME" == michael edens <mike at frosty.ce.montana.edu> writes:

     ME> When trying to run a python script (using either vtkpython or
     ME> python) the following error is reported

     ME> "/Users/mike/Development/vtk/VTK-4.2.2/Wrapping/Python/vtk/
     ME> filtering.py", line 7, in ?
     ME>      from libvtkFilteringPython import *
     ME> ImportError: Failure linking new module: : dyld: python
     ME> Undefined symbols: _PyArg_VTKParseTuple _PyVTKClass_Check
     ME> _PyVTKClass_New _PyVTKClass_vtkCollectionNew
[snip]

     ME> For some reason none of the python libs have
     ME> libvtkCommonPython.so (or any other libvtk""Python.so library)
     ME> set as a dependency by cmake (1.6.7). Trying to correct this
     ME> in the CMakeCache file does not work.

Thats wierd.  All of the Python libs need to link to atleast
libvtkCommonPython.so.  I've regularly building and using VTK for a
long while and this has never come up.

     ME> Any suggestions.

     ME> I have built VTK-4.2.2 under OSX 10.2.6 for X11.

     ME> Here is the pertinent section of my CMakeCache file.

Your Cache file looks wrong.  Perhaps you did not
re-configure/re-generate the build using cmake after you turned on
Python wrapping?  Just retry cmake/ccmake and reconfigure everything
and re-generate the files and see if the cache file looks any better.

cheers,
prabhu





More information about the vtkusers mailing list