# Building Plugin for 5.9 - boost dependecies

**URL:** https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408
**Category:** Development
**Created:** [February 6, 2021, 7:45pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408 "2021-02-06T19:45:45Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 6, 2021, 7:45pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/1 "2021-02-06T19:45:45Z")

</div>

Hi,

I’m trying to build my plugin for paraview 5.9 using the excellent [paraview-plugin-builder](https://gitlab.kitware.com/paraview/paraview-plugin-builder).

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

```auto
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!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 8, 2021, 9:38am UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/2 "2021-02-08T09:38:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 8, 2021, 10:23am UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/3 "2021-02-08T10:23:47Z")

</div>

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

```auto
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

```auto
/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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 8, 2021, 10:25am UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/4 "2021-02-08T10:25:26Z")

</div>

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

```

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

---

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 8, 2021, 10:36am UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/5 "2021-02-08T10:36:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [February 8, 2021, 5:06pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/6 "2021-02-08T17:06:47Z")

</div>

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`:

```auto
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.

---

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 8, 2021, 6:43pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/7 "2021-02-08T18:43:24Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [February 8, 2021, 6:44pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/8 "2021-02-08T18:44:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 8, 2021, 7:00pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/9 "2021-02-08T19:00:45Z")

</div>

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](https://www.paraview.org/Wiki)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [February 8, 2021, 7:02pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/10 "2021-02-08T19:02:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ftoth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@ftoth](https://discourse.paraview.org/u/ftoth)
#### Post date: [February 8, 2021, 7:04pm UTC](https://discourse.paraview.org/t/building-plugin-for-5-9-boost-dependecies/6408/11 "2021-02-08T19:04:56Z")

</div>

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