Building Plugin for 5.9 - boost dependecies

Hi,

I’m trying to build my plugin for paraview 5.9 using the excellent paraview-plugin-builder.

The plugin depends on boost libraries.
In 5.8.1 my paraview.plugin contained

REQUIRES_MODULES
  ParaView::Core
  VTK::CommonCore
  VTK::CommonExecutionModel
  VTK::vtksys
  VTK::hdf5

which somehow must have included the boost libraries.

In 5.9 ParaView::Core is not found any more. I removed it, can build the plugin, which can be loaded. But when using it to read a result file, it segfaults missing stuff from boost_filesystem.

Any tipps on how I can include the boost_system and boost_filesystem libraries?
I guess the came in with the removed ParaView::Core, how can I find the new name?

Any help will be appreciated!

Out of the paraview-plugin-builder context, are you able to build your plugin ?

Yes, I can build the plugin. Just get a suspicious warning

Skipping example CFSReader: Missing required module: ParaView::Core

The plugin then arrives in output/*.so (and it loads with “manage plugins …”) but when trying to read a result file with it, paraview segfaults with

/opt/programs/paraview/ParaView-5.9.0-MPI-Linux-Python3.8-64bit/bin/paraview-real: symbol lookup error: /home/ftoth/openCFS/paraview-plugin-builder/output/CFSReader.so: undefined symbol: _ZN5boost10filesystem6detail15system_completeERKNS0_4pathEPNS_6system10error_codeE

The linux-download of 5.9 does not contain any libboost*.so, probably that’s the issue. Is this intended? They exist in the superbuild from the plugin-builder.

Skipping example CFSReader: Missing required module: ParaView::Core

Not only very specicious, it means your reader is not built at all.

not sure, I get a new CFSReader.so in output. Can get rid of the message by removing ParaView::Core. In both cases it does build and then crashes when loading a result file.

There is no ParaView::Core module anymore, so that makes sense with 5.9.

Does your plugin use Boost directly? If so, add this code to the plugin’s CMakeLists.txt:

find_package(Boost REQUIRED COMPONENTS filesystem)

target_link_libraries(CFSReader PRIVATE Boost::filesystem)

Note that the Skipping example means that the plugin is indeed not built. I don’t know where the “new” one comes from, but it is an indication that your plugin is not passed to paraview_plugin_build at all.

Yes, that works, thank you! However, I need to distribute “libboost_filesystem.so” together with the plugin, because it is not included in the ParaView download any more. Is this intended?

ParaView ships what it uses, so yes, if you plan on distributing the plugin, you’ll need to distribute any libraries ParaView doesn’t ship itself.

OK, we did this in the past. Was just asking because ParaView shipped boost in 5.8.x.

My favorite way of distribution would be to contribute the plugin upstream to ParaView directly, since finally went open source. Are there any guidelines on that? I could just find rather old stuff on https://www.paraview.org/Wiki

Open an MR with the plugin in a new directory under Plugins. Does it require any other external packages?

1 Like

only boost and hdf5 which are available via the superbuild, so I guess it should be fine.