I can import and use vtk in python with no issues. But when I attempt to build these examples,
I get the error.
[jaswant@arch-devine build]$ cmake ..
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTKWikiExamples: Building VTKWikiExamples stand-alone
-- VTKWikiExamples: Building VTKWikiExamples stand-alone - yes
-- VTKWikiExamples: Setting executables prefix
-- VTKWikiExamples: Setting executables prefix - no
-- VTKWikiExamples: VTK VERSION: 8.90.0(OpenGL2)
-- VTKWikiExamples: Example executables are stored in /home/jaswant/Downloads/VTKExamples/build/bin
-- VTKWikiExamples: Tests will not be built
-- VTKWikiExamples: GenericClip requires the setting BUILD_TESTING:BOOL=ON and will not be built
-- VTKWikiExamples: OpenVRCone requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVRCube requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVRCylinder requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVRFrustm requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVROrientedArrow requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVROrientedCylinder requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVRSphere requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: OpenVRTessellatedBoxSource requires VTK module RenderingOpenVR and will not be built
-- VTKWikiExamples: TreeMapView requires the setting BUILD_TESTING:BOOL=ON and will not be built
-- VTKWikiExamples: WordCloudDemo requires VTK class vtkWordCloud and will not be built
-- VTKWikiExamples: PKMeansClustering requires VTK_PARALLEL and will not be built
-- VTKWikiExamples: DEMReader requires git lfs to be installed and will not be built
-- VTKWikiExamples: GLTFImporter requires git lfs to be installed and will not be built
-- VTKWikiExamples: ReadSLC requires git lfs to be installed and will not be built
-- VTKWikiExamples: GenerateModelsFromLabels requires git lfs to be installed and will not be built
-- VTKWikiExamples: GenerateCubesFromLabels requires git lfs to be installed and will not be built
-- VTKWikiExamples: ExtractLargestIsosurface requires git lfs to be installed and will not be built
-- VTKWikiExamples: requires vtkPolyDataBooleanFilter and will not be built
-- optional:
-- VTKWikiExamples: PowercrustExtractSurface requires VTK module Powercrust and will not be built
-- VTKWikiExamples: PoissonExtractSurface requires VTK module PoissonReconstruction and will not be built
-- VTKWikiExamples: CompareExtractSurface requires VTK module Powercrust and will not be built
-- VTKWikiExamples: CompareExtractSurface requires VTK module PoissonReconstruction and will not be built
-- VTKWikiExamples: FrenetSerretFrame requires VTK module SplineDrivenImageSlicer and will not be built
-- VTKWikiExamples: FrenetSerretFrameDemo requires VTK module SplineDrivenImageSlicer and will not be built
-- VTKWikiExamples: GetDataRoot requires the setting BUILD_TESTING:BOOL=ON and will not be built
-- VTKWikiExamples: AVI requires the setting VTK_USE_VIDEO_FOR_WINDOWS:BOOL=ON and will not be built
-- VTKWikiExamples: MPEG2 requires the setting VTK_USE_MPEG2_ENCODER:BOOL=ON and will not be built
-- VTKWikiExamples: FFMPEG requires the setting VTK_USE_FFMPEG2_ENCODER:BOOL=ON and will not be built
-- VTKWikiExamples: OggTheora requires the setting VTK_USE_OGGTHEORA_ENCODER:BOOL=ON and will not be built
-- VTKWikiExamples: ExtrudePolyDataAlongLine requires VTK module SplineDrivenImageSlicer and will not be built
-- VTKWikiExamples: ShadowsOpenGL requires VTK module RenderingOpenGL and will not be built
-- VTKWikiExamples: Hawaii requires git lfs to be installed and will not be built
-- VTKWikiExamples: FlyingFrogSkinAndTissue requires git lfs to be installed and will not be built
-- VTKWikiExamples: FlyingFrogSkinAndTissueB requires git lfs to be installed and will not be built
-- VTKWikiExamples: FlyingFrogSkinAndTissueC requires git lfs to be installed and will not be built
-- VTKWikiExamples: FrogSlice requires git lfs to be installed and will not be built
-- VTKWikiExamples: ViewFrog requires git lfs to be installed and will not be built
-- VTKWikiExamples: ViewFrogA requires git lfs to be installed and will not be built
-- VTKWikiExamples: ViewFrogBoth requires git lfs to be installed and will not be built
-- VTKWikiExamples: ViewFrogSkinAndTissue requires git lfs to be installed and will not be built
-- VTKWikiExamples: PineRootConnectivity requires git lfs to be installed and will not be built
-- VTKWikiExamples: PineRootConnectivityA requires git lfs to be installed and will not be built
-- VTKWikiExamples: PineRootDecimation requires git lfs to be installed and will not be built
-- VTKWikiExamples: DecimateHawaii requires git lfs to be installed and will not be built
-- VTKWikiExamples: Building Qt examples
-- VTKWikiExamples: git lfs is not installed. Some tests will not be created.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jaswant/Downloads/VTKExamples/build
[jaswant@arch-devine build]$ make
make[1]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target AnimateActors
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Building CXX object src/Cxx/Animation/CMakeFiles/AnimateActors.dir/AnimateActors.cxx.o
[ 0%] Linking CXX executable ../../../bin/AnimateActors
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Built target AnimateActors
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target RotatingSphere
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Building CXX object src/Cxx/Animation/CMakeFiles/RotatingSphere.dir/RotatingSphere.cxx.o
[ 0%] Linking CXX executable ../../../bin/RotatingSphere
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Built target RotatingSphere
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target Generate2DAMRDataSetWithPulse
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Building CXX object src/Cxx/CompositeData/CMakeFiles/Generate2DAMRDataSetWithPulse.dir/Generate2DAMRDataSetWithPulse.cxx.o
[ 0%] Linking CXX executable ../../../bin/Generate2DAMRDataSetWithPulse
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 0%] Built target Generate2DAMRDataSetWithPulse
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target CompositePolyDataMapper
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Building CXX object src/Cxx/CompositeData/CMakeFiles/CompositePolyDataMapper.dir/CompositePolyDataMapper.cxx.o
[ 1%] Linking CXX executable ../../../bin/CompositePolyDataMapper
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Built target CompositePolyDataMapper
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target Generate3DAMRDataSetWithPulse
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Building CXX object src/Cxx/CompositeData/CMakeFiles/Generate3DAMRDataSetWithPulse.dir/Generate3DAMRDataSetWithPulse.cxx.o
[ 1%] Linking CXX executable ../../../bin/Generate3DAMRDataSetWithPulse
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Built target Generate3DAMRDataSetWithPulse
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target MultiBlockDataSet
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Building CXX object src/Cxx/CompositeData/CMakeFiles/MultiBlockDataSet.dir/MultiBlockDataSet.cxx.o
[ 1%] Linking CXX executable ../../../bin/MultiBlockDataSet
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Built target MultiBlockDataSet
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target OverlappingAMR
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Building CXX object src/Cxx/CompositeData/CMakeFiles/OverlappingAMR.dir/OverlappingAMR.cxx.o
[ 1%] Linking CXX executable ../../../bin/OverlappingAMR
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Built target OverlappingAMR
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
Scanning dependencies of target VisualizeKDTree
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[2]: Entering directory '/home/jaswant/Downloads/VTKExamples/build'
[ 1%] Building CXX object src/Cxx/DataStructures/CMakeFiles/VisualizeKDTree.dir/VisualizeKDTree.cxx.o
/home/jaswant/Downloads/VTKExamples/src/Cxx/DataStructures/VisualizeKDTree.cxx:1:10: fatal error: vtkActor.h: No such file or directory
1 | #include <vtkActor.h>
| ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/Cxx/DataStructures/CMakeFiles/VisualizeKDTree.dir/build.make:63: src/Cxx/DataStructures/CMakeFiles/VisualizeKDTree.dir/VisualizeKDTree.cxx.o] Error 1
make[2]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make[1]: *** [CMakeFiles/Makefile2:2995: src/Cxx/DataStructures/CMakeFiles/VisualizeKDTree.dir/all] Error 2
make[1]: Leaving directory '/home/jaswant/Downloads/VTKExamples/build'
make: *** [Makefile:84: all] Error 2
I built vtk from the master branch and installed in /opt/vtk. Distro is Arch Linux. I've set the paths to my vtk installation as
I created /etc/ld.so.conf.d/vtk.conf with the contents and used sudo ldconfig for dynamic linking.
I can import and use vtk in python with no issues. But when I attempt to build these examples, I get the error.