# SlicerExtension-VMTK build failing on MacOS 10.12, VTKv9, Qt 5.10

**URL:** <https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650>\
**Category:** Development\
**Tags:** extensions-manager, vmtk\
**Created:** [April 20, 2018, 6:30pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650 "2018-04-20T18:30:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [April 20, 2018, 6:30pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/1 "2018-04-20T18:30:43Z")

</div>

I’m attempting to build SlicerExtension-VMTK in my Slicer-SuperBuild directory, configuring using CMake 3.11 and using makefiles, and I encounter an error with the VMTK build step:

```
[1%] Built target vtkvmtkITK
make[5]: *** No rule to make target `/short/Slicer-SuperBuild/SlicerExtension-VMTK-build/VMTK/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKHierarchy', needed by `vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReaderPython.cxx'. Stop.
make[4]: *** [vtkVmtk/Utilities/vtkvmtkITK/CMakeFiles/vtkvmtkITKPythonD.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [VMTK-prefix/src/VMTK-stamp/VMTK-build] Error 2
make[1]: *** [CMakeFiles/VMTK.dir/all] Error 2
make: *** [all] Error 2

```

I don’t see any file or directory named vtkvmtkITKHierarchy, so is this an old reference?  
Also, I noticed that the script is cloning the VMTK files from [gitHub.com/rlizzo/vmtk.git](http://gitHub.com/rlizzo/vmtk.git), rather than [github.com/vmtk/vmtk.git](http://github.com/vmtk/vmtk.git). Is there a reason for this?  
Any help or advice would be appreciated.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [April 20, 2018, 6:59pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/2 "2018-04-20T18:59:17Z")

</div>

I just noticed the open issue on the repository. Is there any workaround I can use?

> <https://github.com/vmtk/SlicerExtension-VMTK/issues/11>
>
> See https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/7

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 21, 2018, 7:14pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/3 "2018-04-21T19:14:37Z")

</div>

Maybe @jcfr can help.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 3:01pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/4 "2018-06-13T15:01:00Z")

</div>

It looks like this specific problem I was having related to compiling the VMTK package itself. I cloned the vmtk/vmtk.git master branch, turned off USE\_SYSTEM\_ITK and USE\_SYSTEM\_VTK, let it install its own ITK 4.13.0 and VTK 8.1.0, and it was able to complete the compilation. I’m not sure if that’s because of referencing problems, or inability to compile VMTK with VTK 9. I haven’t tried compiling SlicerExtension-VMTK again yet.

Also, @jcfr, I noticed in the Slicer ExtensionsIndex, [https://github.com/Slicer/ExtensionsIndex/blob/master/SlicerVMTK.s4ext](https://github.com/Slicer/ExtensionsIndex/blob/master/SlicerVMTK.s4ext), you’ve set the repository reference to be your own fork: [https://github.com/jcfr/SlicerExtension-VMTK](https://github.com/jcfr/SlicerExtension-VMTK), revision 5013f532b398f7c9a983bdf65a175ec41ce3292a, but you didn’t do a pull request back to vmtk/SlicerExtension-VMTK. Is there a reason for that?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 3:18pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/5 "2018-06-13T15:18:46Z")

</div>

> repository reference to be your own fork … Is there a reason for that?

The exact reference is this on [https://github.com/jcfr/SlicerExtension-VMTK/commits/fix-macos-packaging](https://github.com/jcfr/SlicerExtension-VMTK/commits/fix-macos-packaging)

I don’t recall the specific. It should probably be integrated back into master.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 3:19pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/6 "2018-06-13T15:19:54Z")

</div>

> turned off USE\_SYSTEM\_ITK and USE\_SYSTEM\_VTK

VMTK should definitively build against the VTK and ITK provided by Slicer.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 3:21pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/7 "2018-06-13T15:21:09Z")

</div>

> VMTK should definitively build against the VTK and ITK provided by Slicer.

Agreed. I couldn’t get it to do that, so I tried building it on its own separately to figure out what the problem was.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 3:23pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/8 "2018-06-13T15:23:32Z")

</div>

Also, there are some changes in my fork of VMTK that should be integrated upstream too:

> <https://github.com/jcfr/SlicerExtension-VMTK/blob/5013f532b398f7c9a983bdf65a175ec41ce3292a/SuperBuild/External_VMTK.cmake#L26-L30>

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 3:30pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/9 "2018-06-13T15:30:43Z")

</div>

Good news is that all my changes made it to vmtk master

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 3:40pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/10 "2018-06-13T15:40:45Z")

</div>

> Good news is that all my changes made it to vmtk master

Ok, thanks. Yes, I see them when I look for your commits to vmtk.  
Thanks for committing the SlicerExtension-VMTK changes. It looks like External\_VMTK.cmake is still referencing your vmtk fork, though. That may be part of the merge conflict git is complaining about.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 3:51pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/11 "2018-06-13T15:51:35Z")

</div>

Fantastic, thanks. Should I try compiling this with VTK9, or will I need to re-compile slicer with VTK8?

Ok, I tried it with VTK9, and the VMTK build is still failing in the same place.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 4:05pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/12 "2018-06-13T16:05:49Z")

</div>

> [@mschumaker](#):
>
> Should I try compiling this with VTK9, or will I need to re-compile slicer with VTK8?

By configuring the extension using a Slicer build tree built using Qt5, VTKv9 will also be used:

```auto
$ echo $Slicer_Qt5_DIR 
/home/jcfr/Projects/Slicer-Qt5-VTK9-Release/Slicer-build

$ cd /tmp
$ git clone git://github.com/vmtk/SlicerExtension-VMTK.git

$ mkdir SlicerExtension-VMTK-build && cd $_
$ cmake -DSlicer_DIR:PATH=${Slicer_Qt5_DIR} ../SlicerExtension-VMTK

```

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 4:06pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/13 "2018-06-13T16:06:25Z")

</div>

> [@mschumaker](#):
>
> I tried it with VTK9, and the VMTK build is still failing in the same place.

Do you get an error like this one:

```auto
[2%] Built target tet
make[5]: *** No rule to make target '/tmp/SlicerExtension-VMTK-build/VMTK/vtkVmtk/Common/vtkvmtkCommonHierarchy', needed by 'vtkVmtk/Common/vtkvmtkMathPython.cxx'. Stop.
make[5]: *** Waiting for unfinished jobs....
[3%] Python Wrapping - generating vtkvmtkCommonPythonInit.cxx
CMakeFiles/Makefile2:528: recipe for target 'vtkVmtk/Common/CMakeFiles/vtkvmtkCommonPythonD.dir/all' failed
make[4]: *** [vtkVmtk/Common/CMakeFiles/vtkvmtkCommonPythonD.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....

```

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 4:07pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/14 "2018-06-13T16:07:57Z")

</div>

Yes, that’s the same place mine is failing:

```
make[5]: *** No rule to make target `/short/testing/SlicerExtension-VMTK-Build/VMTK/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKHierarchy', needed by `vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReaderPython.cxx'. Stop.
make[4]: *** [vtkVmtk/Utilities/vtkvmtkITK/CMakeFiles/vtkvmtkITKPythonD.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [VMTK-prefix/src/VMTK-stamp/VMTK-build] Error 2
make[1]: *** [CMakeFiles/VMTK.dir/all] Error 2
make: *** [all] Error 2

```

Or close enough, anyway.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 4:14pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/15 "2018-06-13T16:14:23Z")

</div>

> By configuring the extension using a Slicer build tree built using Qt5, VTKv9 will also be used

I built with Qt5, and VTK9. I think I rebuilt Slicer last week.

Thanks for your help, I appreciate it.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 13, 2018, 6:44pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/16 "2018-06-13T18:44:21Z")

</div>

The problem seems to be specific to VMTK itself.

I suspect that (1) building VTMTK against VTK9 will also fail and (2) backporting [Slicer/CMake/vtkMacroKitPythonWrap.cmake](https://github.com/Slicer/Slicer/blob/master/CMake/vtkMacroKitPythonWrap.cmake) module to VMTK should help address the problem.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 13, 2018, 7:13pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/17 "2018-06-13T19:13:51Z")

</div>

> The problem seems to be specific to VMTK itself.
> 
> I suspect that (1) building VTMTK against VTK9 will also fail and (2) backporting Slicer/CMake/vtkMacroKitPythonWrap.cmake module to VMTK should help address the problem.

Thanks for investigating. I’m not sure how to backport Slicer/CMake/vtkMacroKitPythonWrap.cmake, but I can add an issue to the VMTK page requesting VTK9 compatibility.

---

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [June 22, 2018, 3:45pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/18 "2018-06-22T15:45:31Z")

</div>

I can’t find VMTK in the Extensions Manager:

```auto
No extensions found for win:64-bit, revision: '27261'. Please try a different combination

```

Is the error related to this thread?

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [June 22, 2018, 5:14pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/19 "2018-06-22T17:14:44Z")

</div>

It is. We figured out that the base VMTK package used by the Slicer extension is not able to build with VTK9, which is part of the Slicer build with Qt5. I looked through the nightly build record, and the Slicer VMTK extension has never compiled with the Qt5 SlicerPreview.  
[http://slicer.cdash.org/index.php?project=SlicerPreview&date=2018-06-12&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=VMTK](http://slicer.cdash.org/index.php?project=SlicerPreview&date=2018-06-12&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=VMTK)  
I submitted a feature request on the VMTK repository about VTK9 compatibility, but I think the person that could respond to that is on vacation. Or, for some reason, he hasn’t looked at the repository for two weeks.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 22, 2018, 6:10pm UTC](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650/20 "2018-06-22T18:10:35Z")

</div>

You could add comment to the VMTK pull request at least once a week, to show that it is still a problem that requires attention.

[Next page](https://discourse.slicer.org/t/slicerextension-vmtk-build-failing-on-macos-10-12-vtkv9-qt-5-10/2650.md?page=2)
