[vtk-developers] Building VTK. DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON and python wrappers

David E DeMarle dave.demarle at kitware.com
Thu Jan 26 11:56:57 EST 2012


Thanks for packaging VTK!

And also for bringing the issue to our attention. We will try to take a
look at this during the next release cycle. For best results please try out
the release candidates and complain if it has not been fixed.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Tue, Jan 24, 2012 at 4:57 PM, Samuel John <mail at samueljohn.de> wrote:

> Warm greetings to the vtk devs!
> VTK is wonderful. ;-)
>
> I have updated the homebrew (http://mxcl.github.com/homebrew/)
> vtk.rb formula (
> https://github.com/samueljohn/homebrew/blob/master/Library/Formula/vtk.rb
> ),
> which is responsible to install vtk with optional `--python` bindings on
> the Mac. I works.
>
> However, recently I needed to resort to an ugly work-a-round, and at least
> I'd like to let you guys know. Or better, get a hint on how to improve.
>
> Homebrew builds all software packages in a <tempdir> and then moves it to,
> e.g. /usr/local/Cellar/vtk/<version>/... and /usr/local/lib/vtk is a
> symlink to that dir.
> We use DCMAKE_INSTALL_NAME_DIR and DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
> to get the final RPATH correctly written into the libs, even if we build in
> a <tempdir>.
> Then, just during the "make install", we add the <tempdir>/build/bin to
> DYLD_LIBRARY_PATH and that used to work well, since the freshly built libs
> can find each other.
> Unfortunately, now we get the error:
>
> > make install
> > [...]
> > Linking CXX executable ../../bin/vtkpython
> > [ 95%] Building CXX object
> Infovis/CMakeFiles/vtkInfovisPythonD.dir/vtkRISReaderPython.cxx.o
> > [ 95%] [ 95%] Building CXX object
> Infovis/CMakeFiles/vtkInfovisPythonD.dir/vtkRandomGraphSourcePython.cxx.o
> > Building CXX object
> Infovis/CMakeFiles/vtkInfovisPythonD.dir/vtkRandomLayoutStrategyPython.cxx.o
> > ld: file not found:
> /usr/local/Cellar/vtk/5.8.0/lib/vtk-5.8/libvtkDICOMParser.5.8.dylib for
> architecture x86_64
> > collect2: ld returned 1 exit status
> > [ 95%] make[2]: *** [bin/vtkpython] Error 1
> > make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2
> > make[1]: *** Waiting for unfinished jobs....
>
> Obviously, some make target associated with python wrapping already
> expected the a dylib at the target location (where it is not yet).
>
> Now to my before-mentioned, ugly work-a-round:
> Is there a better way than to introduce a temporary symlink:
>  /usr/local/Cellar/vtk/5.8.0/lib/vtk-5.8 --->  <tempdir>/build/bin ???
> I put this symlink, then "make" then remove that symlink, then "make
> install". Seems to work. Python can import vtk.
>
> bests,
>  Samuel
>
> _______________________________________________
> 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/20120126/22e53d7d/attachment.html>


More information about the vtk-developers mailing list