Skip to content

COMP: Fix VTK configuration errors. #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jhlegarreta
Copy link
Member

Fix VTK configuration errors.

Fixes:

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkRenderingVolume' component is 'RenderingVolume'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOGeometry' component is 'IOGeometry'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOLegacy' component is 'IOLegacy'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOImage' component is 'IOImage'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkInteractionWidgets' component is
  'InteractionWidgets'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkInteractionImage' component is 'InteractionImage'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Error at CMakeLists.txt:20 (include):
  include called with wrong number of arguments.  include() only takes one
  file.

raised when configuring the module against ITK and VTK master.

@jhlegarreta
Copy link
Member Author

This makes the module get configured locally.

The changes in this PR got inspired from PR 731 in ITK and PR 778 in ITK.

Not sure the changes are correct/the best fit for the module's needs, though:

  • VTK's configuration steps were supposed to simply the CMakeLists.txt file, but the mentioned approaches seem to complicate the ITK side. May be because ITK is halfway between.
  • Not sure whether this will make the module be incompatible with VTK pre-8.9.

A few VTK-related linking errors are raised when building. Not sure if when PR 778 in ITK gets merged these will be fixed.

Finally, in any case, if we get to configure the module correctly and get the VTK linking errors fixed in this PR, the module will not build due to the SpatialObject changes (addressed in #33).

@schmidje @phcerdan @thewtex can we cast some light about this ?

Thanks.

@jhlegarreta
Copy link
Member Author

As in PR #33, CDash CI build errors are again due to the ITKVtkGlue module flag not being set to ON in the CMake configuration:
https://open.cdash.org/viewConfigure.php?buildid=5880043

CMake Error at /ITK/CMake/ITKModuleAPI.cmake:78 (message):
  No such module: "ITKVtkGlue"

@hjmjohnson hjmjohnson force-pushed the FixVTKConfigErrors branch 2 times, most recently from eab588f to dda8b26 Compare May 27, 2025 18:48
Fix VTK configuration errors.

Fixes:
```
CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkRenderingVolume' component is 'RenderingVolume'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOGeometry' component is 'IOGeometry'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOLegacy' component is 'IOLegacy'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkIOImage' component is 'IOImage'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkInteractionWidgets' component is
  'InteractionWidgets'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Deprecation Warning at
C:/SDKs/VTK/vtk-head-Bin/lib/cmake/vtk-8.90/vtk-config.cmake:57 (message):
  The new name for the 'vtkInteractionImage' component is 'InteractionImage'
Call Stack (most recent call first):
  C:/SDKs/VTK/vtk-head-Bin/vtk-config.cmake:1 (include)
  CMakeLists.txt:15 (find_package)

CMake Error at CMakeLists.txt:20 (include):
  include called with wrong number of arguments.  include() only takes one
  file.
```

raised when configuring the module against ITK and VTK master.
@hjmjohnson hjmjohnson force-pushed the FixVTKConfigErrors branch from dda8b26 to 1c1d3bd Compare May 27, 2025 18:51
@hjmjohnson
Copy link
Member

@jhlegarreta, Do you think this PR is still accurate? I tested it locally, and it works on my Ubuntu 24.04 box. I'm willing to rebase and merge if you still believe it's the best way to correct the problem from six years ago.

@jhlegarreta
Copy link
Member Author

@hjmjohnson Thanks for the effort. I have not tried this since I contributed with the PR, and have not tried to configure/build any remotes using VTK recently. I do not know whether there is a simpler way to configure VTK now. For sure, we should no longer be trying to support a min VTK 6.x:
1c1d3bd#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL16

Hopefully @dzenanz has some insight on ways in which this can be done with less/simpler code.

@dzenanz
Copy link
Member

dzenanz commented May 27, 2025

I am afraid I have not used this remote module, so I have no particular insight.

@jhlegarreta
Copy link
Member Author

I am afraid I have not used this remote module, so I have no particular insight.

Then my vote is to merge this as is given that Hans succeeded building this locally and build from there.

@hjmjohnson hjmjohnson merged commit 648caff into InsightSoftwareConsortium:main May 28, 2025
4 of 23 checks passed
@jhlegarreta jhlegarreta deleted the FixVTKConfigErrors branch May 28, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants