[vtkusers] VTK install with incomplete RPATHs to Qt targets

BBerco bebe0705 at colorado.edu
Tue May 8 19:26:40 EDT 2018


I am using a  slightly modifed version
<https://github.com/bbercovici/homebrew-self/blob/master/Formula/vtk.rb>  
of the vtk Homebrew formula to distribute VTK with the proper QVTK flags
along with my application.

When the Homebrew install runs nominally (like on my Mac), the installed VTK
libraries point to the proper location of Qt's components. For instance,
otool returns the following targets for libvtkGUISupportQtSQL:

* 
otool -L /usr/local/lib/libvtkGUISupportQtSQL-8.1.1.dylib : 
...
/usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets
(compatibility version 5.10.0, current version 5.10.1)
...
*

However, on another Mac, the install process yields vtk libraries with
partially resolved Qt targets:

* 
otool -L /usr/local/lib/libvtkGUISupportQtSQL-8.1.1.dylib : 
...
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version
5.10.0, current version 5.10.1)
...
*

Note how "@rpath" is not expanded into "/usr/local/opt/qt/lib/". Running a
program depending in libvtkGUISupportQtSQL.dylib fails at runtime with the
linker error. 

*dyld: Library not loaded: @rpath/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /usr/local/lib/libvtkGUISupportQtSQL-8.0.1.dylib*

which makes complete sense. 

My questions: 

 1) at what point in the configure step of VTK's installation are the VTK
libraries' targets defined? 
 2) why would "@rpath" not be properly expanded in the first place?



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list