Using Paraview superbuild to distribute paraview plugin for official paraview release?

Can the paraview superbuild be used to build a plugin that is usable with the official paraview release? If so would I still need to build the superbuild on each operating system I want to release on?

Yes, it can be used. I would recommend following the recipes present under the .gitlab/ directory to use the right compiler for each platform as well. Note that the superbuild is not well-isolated on macOS if you have HomeBrew installed, so you may need to change some settings to hide HomeBrew from the build to prevent accidental gathering of it.

We don’t ship SDKs for ParaView, so building your own is the way to go for now. I think @mwestphal might have some helper scripts though.

For linux, you can use:

For windows, building the superbuild with the right options is enough.

I was able to successfully build the superbuild on windows, however the external plugin I set did not seem to build. I made sure to create a .cmake file and set the appropriate cmake variables mentioned on the gitlab page, where should the plugin have built to? There is no shared library or any folders created relating to the plugin.

No need to use the external plugin mechanism of the paraview superbuild.
Just build your plugin against the install/cmake/paraview dir of the superbuild.

I do not have a cmake folder or any paraview related folders in the install directory. I searched for the files ‘ParaViewConfig.cmake’ and ‘paraview-config.cmake’ but they were not in any of the folders generated by the build. I tried to build against superbuild/paraview and other subdirectories inside but I receive the same cmake error.

Which version of ParaView are you building ?

Paraview 5.8.1, do I need to build the latest? Edit: paraview-config does exist in the superbuild/paraview/build/bin but it does not have the .cmake extension and is not detected by cmake when building against that directory

There have been fixes in 5.9, but 5.8 should have these files around. They should certainly be in the build tree and the install tree is going to lack them if the build tree doesn’t have them. Is something setting PARAVIEW_INSTALL_DEVELOPMENT_FILES=OFF somewhere?

Nothing seems to be setting that variable to off, just in case I tried building with it explicitly set to on and nothing changed in the build or install trees

PARAVIEW_INSTALL_DEVELOPMENT_FILES=OFF is a ParaView 5.8.0 bug. You either need to set it manually on your paraview build within the superbuild or update to ParaView 5.9.1.

After building the 5.9.1 superbuild, the files appeared and I was able to successfully compile the plugin against the directory. Anyways, when I loaded the official 5.9.1 release of paraview and tried to open the shared library I recieved this error message:

ERROR: In C:\glr\builds\paraview\paraviewci\build\superbuild\paraview\src\Remoting\Core\vtkPVPluginLoader.cxx, line 530
vtkPVPluginLoader (000001ACDD830CE0): The specified module could not be found.

EDIT: Accidentally built plugin in debug mode instead of release. Seems to be working great, thanks for the help.

1 Like

Debug/Release incompatibility is a classic error. We should have a better error in this case.