On Linux Mint I checked out VTK-Releas branch via GIT and I imported the sub module for VTKm and build it via CMake, ensuring that vtkm and AcceleratorsVTKm are enabled. This is completed successfully. Anyhow, after running “make” and “make install” it does not seem to build the rendering libraries properly.
When I set up a minimal CMake Project and set the VTK_DIR to “/usr/local/lib/cmake/vtk-9.0” and the VTKm_DIR to “/usr/local/lib/cmake/vtk-9.0/vtkm” it doesn’t build with an error message:
/home/david/Documents/minimal/main.cpp:7:10: fatal error: vtkm/rendering/Actor.h: No such file or directory
#include <vtkm/rendering/Actor.h>
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/minimal.dir/build.make:82: recipe for target 'CMakeFiles/minimal.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/minimal.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/minimal.dir/all' failed
make[1]: *** [CMakeFiles/minimal.dir/all] Error 2
Makefile:103: recipe for target 'all' failed
make: *** [all] Error 2
Since these are all the includes it seems strange that only the Actor.h fails:
In the src folder pulled via GIT the Actor.h is present, are there any options I’m unaware of for this to be included? Do I have to build VTKm separately and not as a sub module? Building it independently seems to throw other issues at me which I ran into a dead end with, also discussed on here.
Any further information I can provide I’m happy to.
When I try to set the directory to /usr/local/lib/cmake/vtk-9.0 and I configure/generate it automatically resets it to /usr/local/lib/cmake/vtk-9.0/vtkm.
It won’t compile because the preprocessor is expecting this path: /usr/local/lib/cmake/vtk-9.0/vtkm/vtkm/rendering/Actor.h (notice the double vtkm). Maybe you can try creating a symbolic link in /usr/local/lib/cmake/vtk-9.0/vtkm called vtkm that points to /usr/local/lib/cmake/vtk-9.0/vtkm/. Ugly, but it’ll likely work around your issue.
Perhaps you can change CMakeLists.txt of your project to use VTK_DIR instead of VTKm_DIR to find the VTKm headers…
Yes I understood that, thank you for your help up until now. The problem is, when I set up a minimal project which requires both VTK and VTKm the includes work but my program crashes.
That’s why I tried installing VTKm via VTK by enabling the CMake options to include VTKm. I thought it might help preventing a SEGV, but when I do that, and then therefore build with /usr/local/lib/cmake/vtk-9.0/vtkm instead of /usr/local/lib/cmake/vtkm-1.5 the compiler fails to include actor.h. What I can’t get my head around is why only this functions when I use vtkm::filter::Contour but comment out the actor.
May it be woth Converting the DataSet back to VTK? How hard could it be to convert the result of contour.Execute(inData) to a VTK DataSet instead of VTKm?