# VTK 9 build

**URL:** https://discourse.vtk.org/t/vtk-9-build/5635
**Category:** Support
**Created:** [April 24, 2021, 9:34pm UTC](https://discourse.vtk.org/t/vtk-9-build/5635 "2021-04-24T21:34:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![melrobin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/melrobin/32/3297_2.png) [@melrobin](https://discourse.vtk.org/u/melrobin)
#### Post date: [April 24, 2021, 9:34pm UTC](https://discourse.vtk.org/t/vtk-9-build/5635/1 "2021-04-24T21:34:50Z")

</div>

Building VTK from development sources is broken. I have tried to narrow this down and get the following error:  
make -f CMakeFiles/vtkIOParallelXMLPython.dir/build.make CMakeFiles/vtkIOParallelXMLPython.dir/depend  
make: \*\*\* No rule to make target ‘…/IO/XML/vtkXMLPartitionedDataSetWriter.h’, needed by ‘CMakeFiles/vtkIOParallelXMLPython/vtkXMLPPartitionedDataSetWriterPython.cxx’. Stop.

Does anyone know how I can make progress on fixing this?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [April 25, 2021, 1:09am UTC](https://discourse.vtk.org/t/vtk-9-build/5635/2 "2021-04-25T01:09:28Z")

</div>

These “No rule to make target” errors are almost always caused by stale “make” rule dependencies in the build tree. If you delete your build tree and start over, the error should disappear.

This stale dependency problem is specific to the way VTK uses CMake’s “Makefile” generator, so you can avoid it in the future by doing builds with ninja instead (cmake -G Ninja …).

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [April 25, 2021, 9:16pm UTC](https://discourse.vtk.org/t/vtk-9-build/5635/3 "2021-04-25T21:16:29Z")

</div>

Those files recently moved, so you’ll probably just want to nuke the modules’ build directory and reconfigure. That _should_ be enough to get things to work, but there may be other places which contain the Python bits (toplevel/CMakeFiles?) which may need manually cleaned up.

But as @dgobbi said, Ninja does it better (though CMake 3.20 provides Makefiles with better support, it needs to be explicitly enabled there).

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/melrobin/32/3297_2.png) [@melrobin](https://discourse.vtk.org/u/melrobin)
#### Post date: [April 25, 2021, 11:38pm UTC](https://discourse.vtk.org/t/vtk-9-build/5635/4 "2021-04-25T23:38:08Z")

</div>

Thank you to both of you. Blowing away the build directory worked. Thanks for the tip to use Ninja.
