# VTK-vtk-module-find-packages.cmake fails to find Boost

**URL:** https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947
**Category:** In Situ Support
**Created:** [May 28, 2019, 5:31pm UTC](https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947 "2019-05-28T17:31:35Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [May 31, 2019, 9:34pm UTC](https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947/21 "2019-05-31T21:34:10Z")

</div>

`>> ParaView_INCLUDE_DIR` isn’t necessary  
anymore. Instead, just link to `ParaView::Catalyst`

`I am missing something. I need````ParaView\_INCLUDE\_DIR at compile time.`I` have files which e.g. “#include  
\<vtkNonOverlappingAMR.h\>”. How can I compile my code  
without```ParaView_INCLUDE_DIR?``

`` On another topic, at link time I hit issues I do not  
have when link to a Catalyst build. I get ’ undefined  
reference to `\_PyUnicodeUCS2…’. I wonder if it relates  
to the system python, or I am missing a PYTHONPATH ?  
Paraview-config.cmake doesn’t  
set PARAVIEW\_PYTHONPATH,

– PARAVIEW\_ENABLE\_PYTHON= ON

```````
      -- PARAVIEW_PYTHONPATH =
  ``````

```````

and paraview CMakeCache.txt is correct:

```
      Python2_EXECUTABLE              

```

/ascldap/users/tesari/local/python-2.7.16/bin/python2.7

```
      Python2_INCLUDE_DIR             

```

/ascldap/users/tesari/local/python-2.7.16/include/python2.7

```
      Python2_LIBRARY_RELEASE     

```

/ascldap/users/tesari/local/python-2.7.16/lib/libpython2.7.so

Could you advise, please?

```
    .../build/lib64/libvtkWrappingPythonCore-pv5.6.so.1:

```

undefined reference to `\_PyUnicodeUCS2\_AsDefaultEncodedString’

```
    .../build/lib64/libvtkPVCinemaReader-pv5.6.so.1: undefined

```

reference to `PyUnicodeUCS2\_AsLatin1String’

---

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [June 2, 2019, 6:13pm UTC](https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947/22 "2019-06-02T18:13:31Z")

</div>

I figured out why I got “undefined reference to  
`\_PyUnicodeUCS2\_AsDefaultEncodedString’”. The reason was  
that RPATH in the shared objects listed  
both, the build path and the install path. Linker  
issued warnings of ‘circular dependencies’, and that not all  
shared objects may be resolved correctly (don’t have the exact  
screenshot). In order to brake the circular dependencies I set CMAKE\_SKIP\_RPATH=ON ,  
but the build path was still listed in  
RPATH. I had to set both, CMAKE\_SKIP\_INSTALL\_RPATH=OFF  
and CMAKE\_SKIP\_RPATH=OFF  
, and to set LD\_LIBRARY\_PATH  
,to make it work. Is this the right way to install a  
paraview build?

---

<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: [June 3, 2019, 1:56pm UTC](https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947/23 "2019-06-03T13:56:19Z")

</div>

> I am missing something. I need ParaView\_INCLUDE\_DIR

You’re missing `target_link_libraries(yourtgt PRIVATE VTK::CommonDataModel)` (could also be `PUBLIC` depending on how you’re using it) for that header.

> UCS2 problems

It seems to me that ParaView was built against a UCS2 Python build, but is finding a UCS4 Python build when you’re linking to ParaView.

[Previous page](https://discourse.paraview.org/t/vtk-vtk-module-find-packages-cmake-fails-to-find-boost/1947.md?page=1)
