[Paraview-developers] Resolve (paraview) dependencies of plugin

Ben Boeckel ben.boeckel at kitware.com
Wed Feb 28 10:33:30 EST 2018


On Wed, Feb 28, 2018 at 11:11:59 +0100, hermann.detz at gmail.com wrote:
> libvtkPVClientServerCoreCore-pv5.4.so.1 => not found
> libvtkCommonExecutionModel-pv5.4.so.1 => not found
> libvtkCommonDataModel-pv5.4.so.1 => not found
> libvtkClientServer-pv5.4.so.1 => not found
> libvtkCommonCore-pv5.4.so.1 => not found
> 
> Obviously, the plugin depends on paraview libaries (makes sense so
> far), which it can't find. Now I should admit, that paraview was no
> really installed on the linux system, but just downloaded as binary
> distribution. I'm aware of the common library search paths in Linux. My
> problem is now, this plugin was developed to be used by a group of
> users, I don't have direct relations with. They will download paraview
> somehow and get it to run. I can't rely on them putting the binary into
> the correct path to find the libraries.
> 
> Is there a way, how to statically link these libraries with the plugin
> (although this is completely against the idea of having shared libs)?
> Any Cmake defines, I'm missing?

Using static libraries wouldn't work since you'd then have two copies of
important statics.

Instead, since these libraries are intended to be provided by the
loading executable, you can use `install_name_tool` to rename the
references to have `@executable_path/../Libraries/` as a prefix. This
will tell the application to look relative to the binary's location for
these libraries. Something like this:

    install_name_tool -change libvtkPVClientServerCoreCore-pv5.4.so.1 @executable_path/../Libraries/libvtkPVClientServerCoreCore-pv5.4.so.1

for each ParaView-provided library. Any libraries the plugin is supposed
to come with can use `@loader_path/` and move with the plugin.

--Ben


More information about the Paraview-developers mailing list