Superbuild extension builds failed when Python was installed - good solution?

Hi all,

I could not build first SlicerRT then SlicerOpenIGTLink today, and it seemed that the reason was a custom Python being installed on my Windows machine. See Plastimatch build fails · Issue #198 · SlicerRt/SlicerRT · GitHub

After chatting with @lassoan we decided that we define the missing (and then after uninstalling the custom Python undefined) Python variables, see COMP: Fix Plastimatch configuration if Python was installed · SlicerRt/SlicerRT@8b67847 · GitHub and COMP: Fix subproject configuration if Python was installed by cpinter · Pull Request #116 · openigtlink/SlicerOpenIGTLink · GitHub .

My question is, mainly to @jcfr if there is a better solution for this, other than manually adding these variables to the subproject CMake files that fail to configure in this case. Thanks!

Currently, passing the variables is a sensible approach.

To streamline this, few possible approaches:

  • (1) Update upstream VTK so that these variables are configured into vtk-config (or alike) and ensure project build against a VTK build tree would find the expected python. Now tracked in https://gitlab.kitware.com/vtk/vtk/-/issues/18328
  • (2) In case (1) doesn’t work out, update the Slicer/VTK fork to include relevant changes. Though … would prefer to minimize Slicer specific changes in our fork and try to only include backported changes.

One of the challenge is that there are two ways to find python libraries:

This is why we need to pass both set of variables ( PYTHON_* and Python3_*) and it may be challenging to have both sets configured into the VTK build tree …

1 Like