# VMTK extension build error

**URL:** <https://discourse.slicer.org/t/vmtk-extension-build-error/42765>\
**Category:** Support\
**Created:** [May 1, 2025, 8:24pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765 "2025-05-01T20:24:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 1, 2025, 8:24pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/1 "2025-05-01T20:24:45Z")

</div>

Looks like VTMK is not building for the latest preview.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 1, 2025, 8:29pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/2 "2025-05-01T20:29:21Z")

</div>

See the following thread where @chir.set needs to finalize compatibility with VTK 9.4.

> [@SlicerVMTK not building for SlicerPreview on cdash](https://discourse.slicer.org/t/slicervmtk-not-building-for-slicerpreview-on-cdash/42605):
>
> SlicerVMTK is not building on cdash for SlicerPreview while it does build for SlicerStable. The error messages relate to the VMTK library itself. FYI, hoping for an investigation.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 1, 2025, 8:29pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/3 "2025-05-01T20:29:32Z")

</div>

In windows stable (5.8.1) extension is present but fails to launch after the install with this error:

```auto
Error(s):
    CLI executable: C:/Users/maria/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/SlicerVMTK/lib/Slicer-5.8/qt-loadable-modules/vtkvmtk.py
    The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program.
Fail to instantiate module "vtkvmtk"
The following modules failed to be instantiated:

```

On Mac 5.8.1 it installs and works fine.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 1, 2025, 8:30pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/4 "2025-05-01T20:30:26Z")

</div>

This error message can be safely ignored. See the following:

> <https://github.com/vmtk/SlicerExtension-VMTK/issues/22>
>
> This error is reported at Slicer startup if SlicerVMTK extension is installed:
> …
> \`\`\`
> CLI executable: C:/Users/E/AppData/Roaming/NA-MIC/Extensions-29387/SlicerVMTK/lib/Slicer-4.11/qt-loadable-modules/vtkvmtk.py
> The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program.
> Fail to instantiate module “vtkvmtk”
> The following modules failed to be instantiated:
> vtkvmtk
> \`\`\`

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 1, 2025, 8:32pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/5 "2025-05-01T20:32:27Z")

</div>

> [@muratmaga](#):
>
> Looks like VTMK is not building for the latest preview.

Not even for SlicerStable on cdash since a commit I made 2 weeks ago.

I am merging a patch and will see tomorrow.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 1, 2025, 8:41pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/6 "2025-05-01T20:41:10Z")

</div>

> [@jamesobutler](#):
>
> needs to finalize compatibility with VTK 9.4

Please see [this comment](https://discourse.slicer.org/t/slicervmtk-not-building-for-slicerpreview-on-cdash/42605/7).

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 2, 2025, 3:44pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/7 "2025-05-02T15:44:10Z")

</div>

SlicerVMTK built for Mac but not for Windows on cdash with the [last patch](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/5) I pushed.

I am reverting the offending commit and will monitor cdash to check how it builds on the 3 platforms.

---

<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:** [May 3, 2025, 2:29pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/8 "2025-05-03T14:29:41Z")

</div>

VTK-9.2/9.4 compatibility: I would recommend to keep the same source code for the stable and preview releases for now. To get VMTK compatibility with both VTK versions, update to the latest VMTK.

CMake updates: I would not try to make any CMake file changes in VMTK extension now (and revert any changes that cause trouble), but wait for Slicer and all its dependencies to support CMake4 first.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 3, 2025, 6:22pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/9 "2025-05-03T18:22:17Z")

</div>

SlicerVMTK now builds for Mac and Windows, for SlicerStable. The Linux build does not seem to be triggered, for another extension also.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 3, 2025, 6:26pm UTC](https://discourse.slicer.org/t/vmtk-extension-build-error/42765/10 "2025-05-03T18:26:00Z")

</div>

> [@lassoan](#):
>
> update to the latest VMTK

For a successful build of VMTK itself at the [latest commit](https://github.com/vmtk/vmtk/commit/6c189dd6ee644a466498bd382b0c19229f20daa5), this patch must be applied, for VTK 9.4.

```auto

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d46a7c..4043110 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12...3.29.1)
+cmake_minimum_required(VERSION 3.3)
 
 project(VMTK)
 
@@ -27,7 +27,7 @@ if(VMTK_WITH_LIBRARY_VERSION)
      )
 endif()
 
-find_package( Python3 COMPONENTS Interpreter )
+find_package( PythonInterp )
 if (NOT VMTK_PYTHON_VERSION)
   set(VMTK_PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" CACHE STRING "" FORCE)
 endif ()
@@ -309,17 +309,11 @@ if(VMTK_SCRIPTS_ENABLED)
     ${VMTK_BINARY_DIR}/VMTKConfig.cmake
   @ONLY IMMEDIATE
   )
- install(FILES ${VMTK_BINARY_DIR}/VMTKConfig.cmake
- TYPE LIB
- )
 
   configure_file(
     ${VMTK_SOURCE_DIR}/CMake/VMTKUse.cmake.in
     ${VMTK_BINARY_DIR}/VMTKUse.cmake
   @ONLY IMMEDIATE
   )
- install(FILES ${VMTK_BINARY_DIR}/VMTKUse.cmake
- TYPE LIB
- )
 
 endif()

```

It’s just a reverse of that commit for the` CMakeLists.txt` only.
