Linking issues compiling example plugin with paraview-plugin-builder

Hello,

I am trying to build and load the ElevationFilter from the Examples directory. Build completes successfully but loading the plugin from the GUI returns the following error:

ERROR: In /home/buildslave/dashboards/buildbot/paraview-pvbinsdash-linux-shared-release_superbuild/build/superbuild/paraview/src/Remoting/Core/vtkPVPluginLoader.cxx, line 519

vtkPVPluginLoader (0x62fb1e0): libElevationFilters.so: cannot open shared object file: No such file or directory

Steps followed:

  1. Use paraview-plugin-builder to build a docker image for paraview 5.8.0
  2. copy Examples/Plugins/ElevationFilter directory from master branch
  3. run ./run_build_plugin.sh -d ElevationFilter v5.8.0
  4. the above command completes and generates ElevationFilter.so libElevationFilters.so
  5. Open Paraview 5.8.0 (downloaded from https://www.paraview.org/download/ )
  6. Attempt to load the plugin (ElevationFilter.so) through the GUI.

Note:
ldd ElevationFilter.so returns:

$ ldd ElevationFilter.so 
...
       libElevationFilters.so (0x00007f6e818de000)
... 

System:
Ubuntu 16.04.06, 4.4.0-176-generic

Thank you.

this example produce two .so files that you have to recover and place together in a folder.

ElevationFilter.so libElevationFilters.so

It may be nice to improve paraview-plugin-builder to make that clearer.

You can modify this example quite easily to makes it link statically with the second lib so this is not needed.

Thank you for the quick reply.
When I tried to load ElevationFilter.so both of the .so files were in the same directory. I tried also to put them in ./bin/plugins and ./lib/plugins/ but had no luck.

It looks however that adding

set(CMAKE_INSTALL_RPATH $ORIGIN)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

in the top level CMakeLists.txt solves the issue (at least on my platform).

Looks a platform specific issue then. Thanks for sharing.

Tbh I tend to build my internal module lib statically to avoid needing to move around multiple files.

Done with :

vtk_module_add_module(module
  FORCE_STATIC
  ...