# Link to python error when compiling ParaView with -DPARAVIEW\_BUILD\_TESTING=ON

**URL:** https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524
**Category:** ParaView Support
**Created:** [December 16, 2023, 5:36pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524 "2023-12-16T17:36:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [December 16, 2023, 5:36pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/1 "2023-12-16T17:36:19Z")

</div>

Hi all,

I’m facing a link problem when i try to build `ParaView` when the option `PARAVIEW_BUILD_TESTING` is on.  
When it is OFF, `ParaView` build successfully.  
The errors arise when compiling some of the test modules of the `VTKExtensions` such as `IOCGNS`.

The error message is the following:

```auto
FAILED: bin/vtkPVVTKExtensionsIOCGNSWriterCxxTests 
: && /usr/bin/c++ -O2 -g -DNDEBUG -Wl,-lc -Wl,-lc VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/vtkPVVTKExtensionsIOCGNSWriterCxxTests.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestPartitionedDataSetCollection2.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestStructuredGrid.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestUnstructuredGrid.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestPartitionedDataSet.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestPartitionedDataSetCollection.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestPolydata.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestPolyhedral.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestCellAndPointData.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestMultiBlockDataSet.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestMappedUnstructuredGrid.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestTimeWriting.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestRectilinearGrid.cxx.o VTKExtensions/IOCGNS/Testing/Cxx/CMakeFiles/vtkPVVTKExtensionsIOCGNSWriterCxxTests.dir/TestImageData.cxx.o -o bin/vtkPVVTKExtensionsIOCGNSWriterCxxTests -Wl,-rpath,/opt/paraview_build/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial lib/libvtkTestingDataModel-pv5.12.so.5.12 lib/libvtkIOIOSS-pv5.12.so.5.12 lib/libvtkPVCoreKit-pv5.12.so.5.12 /usr/lib/x86_64-linux-gnu/libexpat.so lib/libvtkParallel-pv5.12.so.5.12 lib/libvtkIO-pv5.12.so.5.12 lib/libvtkFilters-pv5.12.so.5.12 lib/libvtkverdict-pv5.12.so.5.12 /usr/lib/x86_64-linux-gnu/libpugixml.so.1.13 lib/libvtkCommon-pv5.12.so.5.12 lib/libvtksys-pv5.12.so.5.12 lib/libvtktoken-pv5.12.so.5.12 lib/libvtkloguru-pv5.12.so.5.12 lib/libvtkkissfft-pv5.12.so.5.12 /usr/lib/x86_64-linux-gnu/libdouble-conversion.so /usr/lib/x86_64-linux-gnu/liblz4.so /usr/lib/x86_64-linux-gnu/liblzma.so /usr/lib/x86_64-linux-gnu/libz.so lib/libvtkcgns-pv5.12.so.5.12 lib/libvtkfmt-pv5.12.so.5.12 /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so -ldl -Wl,-rpath-link,/opt/paraview_build/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial && :
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyUnicode_InternFromString'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyDict_DelItemString'
/usr/bin/ld: /opt/paraview_build/lib/libvtkPythonInterpreter-pv5.12.so.1: undefined reference to `_Py_Dealloc'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyByteArray_AsString'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyLong_FromLong'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyExc_KeyError'
/usr/bin/ld: /opt/paraview_build/lib/libvtkPythonInterpreter-pv5.12.so.1: undefined reference to `PyStatus_Exception'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyExc_NotImplementedError'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyByteArray_Type'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyNumber_Absolute'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyDescr_NewClassMethod'
/usr/bin/ld: /opt/paraview_build/lib/libvtkPythonInterpreter-pv5.12.so.1: undefined reference to `PyType_IsSubtype'
/usr/bin/ld: /opt/paraview_build/lib/libvtkWrappingPythonCore3.11-pv5.12.so.1: undefined reference to `PyErr_Fetch'
/usr/bin/ld: /opt/paraview_build/lib/libvtkPythonInterpreter-pv5.12.so.1: undefined reference to `Py_PreInitialize'
...
collect2: error: ld returned 1 exit status

```

I have made a reproducer through the following Dockerfile  
[Dockerfile](https://discourse.paraview.org/uploads/short-url/pZMWO2tdW8aJqoegHdzl9oogZda) (2.8 KB)

When built, run the container and in the `/opt/paraview_build` just run `cmake --build .`.

I found a hack to workaround. It is to add a dependency to `ParaView::RemotingApplication` in the `TEST_DEPENDS` section of the `vtk.module` files involved.

Should i open an issue on gitlab?

Thanks in advance

---

<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: [December 18, 2023, 3:53pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/2 "2023-12-18T15:53:32Z")

</div>

I confirm that I reproduce the issue using the provided Dockerfile.

> Should i open an issue on gitlab?

Yes

---

<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: [December 19, 2023, 12:48pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/3 "2023-12-19T12:48:44Z")

</div>

Ah, this looks like a kit build…forward link logic may be lacking there.

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [December 19, 2023, 2:33pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/4 "2023-12-19T14:33:35Z")

</div>

@mwestphal i opened [https://gitlab.kitware.com/paraview/paraview/-/issues/22423](https://gitlab.kitware.com/paraview/paraview/-/issues/22423)

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [December 19, 2023, 2:34pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/5 "2023-12-19T14:34:54Z")

</div>

@ben.boeckel i’m sorry but i do not understand your answer.

Does it mean that i’am missing something in the `CMake` configuration?

---

<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: [December 19, 2023, 3:43pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/6 "2023-12-19T15:43:15Z")

</div>

No, it’s a VTK bug that this doesn’t work, but you can avoid it by turning kits off (`-DPARAVIEW_BUILD_WITH_KITS=OFF`).

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [December 20, 2023, 2:02pm UTC](https://discourse.paraview.org/t/link-to-python-error-when-compiling-paraview-with-dparaview-build-testing-on/13524/7 "2023-12-20T14:02:07Z")

</div>

@ben.boeckel with `-DPARAVIEW_BUILD_WITH_KITS=OFF` the compilation succeeds.  
Thanks!
