Skip to content
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

Recompiling ITK after compiling ITKVtkGlue #14

Open
fbudin69500 opened this issue Jan 25, 2019 · 6 comments
Open

Recompiling ITK after compiling ITKVtkGlue #14

fbudin69500 opened this issue Jan 25, 2019 · 6 comments

Comments

@fbudin69500
Copy link

I am getting the following error message when trying to recompile ITK after having compiled ITKVtkGlue as a separate project:

/home/francois.budin/devel/itk/ITK/build/Wrapping/Modules/ITKVTK/itkVTKImageImportPython.cpp:4609:10: fatal error: vtkImageImport.h: No such file or directory
 #include "vtkImageImport.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/build.make:295: recipe for target 'Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/itkVTKImageImportPython.cpp.o' failed
make[2]: *** [Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/itkVTKImageImportPython.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/francois.budin/devel/itk/ITK/build/Wrapping/Modules/ITKVTK/itkVTKImageExportPython.cpp:4566:10: fatal error: vtkImageImport.h: No such file or directory
 #include "vtkImageImport.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.

This could be related to the fact that ITKVtkGlue is both inside and outside the ITK repository.

@thewtex
Copy link
Member

thewtex commented Jan 25, 2019

What is the state of Module_* related to VTK in the ITK build directory CMakeCache.txt file?

@fbudin69500
Copy link
Author

Everything was set to OFF originally inside the ITK build directory.

See the result of the following command:

more  CMakeCache.txt |grep -i vtk |grep -i module
ITKIOMeshVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/MeshVTK
ITKIOMeshVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/MeshVTK
ITKIOVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/VTK
ITKIOVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/VTK
ITKVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/Bridge/VTK
ITKVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/Bridge/VTK
Module_ITKVtkGlue:BOOL=OFF
//ADVANCED property for variable: Module_ITKIOMeshVTK
Module_ITKIOMeshVTK-ADVANCED:INTERNAL=1
Module_ITKIOMeshVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKIOVTK
Module_ITKIOVTK-ADVANCED:INTERNAL=1
Module_ITKIOVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVTK
Module_ITKVTK-ADVANCED:INTERNAL=1
Module_ITKVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVtkGlue
Module_ITKVtkGlue-ADVANCED:INTERNAL=1
WRAP_ITK_MODULES:INTERNAL=ITKCommon;ITKFiniteDifference;ITKImageFilterBase;ITKCurvatureFlow;ITKStatistics;ITKTransform;ITKImageFunction;ITKImageGrid;ITKAnisotropicSmoothing;ITKImageCompose;ITKMesh;ITKSpatialObjects;ITKImageStatistics;ITKPath;ITKImageIntensity;ITKImageLabel;ITKLabelMap;ITKThresholding;ITKConnectedComponents;ITKMathematicalMorphology;ITKBinaryMathematicalMorphology;ITKNarrowBand;ITKDistanceMap;ITKQuadEdgeMesh;ITKFastMarching;ITKIOImageBase;ITKImageCompare;ITKSmoothing;ITKImageGradient;ITKImageSources;ITKImageFeature;ITKOptimizers;ITKLevelSets;ITKAntiAlias;ITKBiasCorrection;ITKBridgeNumPy;ITKClassifiers;ITKColormap;ITKFFT;ITKConvolution;ITKDeconvolution;ITKDisplacementField;ITKEigen;ITKRegistrationCommon;ITKPDEDeformableRegistration;ITKIOBMP;ITKIOBioRad;ITKIOBruker;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;ITKIOJPEG;ITKIOJPEG2000;ITKIOTIFF;ITKIOLSM;ITKIOMINC;ITKIOMRC;ITKVoronoi;ITKIOMeshBase;ITKIOMeshBYU;ITKIOMeshFreeSurfer;ITKIOMeshGifti;ITKIOMeshOBJ;ITKIOMeshOFF;ITKIOMeshVTK;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIORAW;ITKIOSiemens;ITKIOSpatialObjects;ITKIOStimulate;ITKIOTransformBase;ITKIOVTK;ITKImageFrequency;ITKImageFusion;ITKImageNoise;ITKLabelVoting;ITKOptimizersv4;ITKMetricsv4;ITKQuadEdgeMeshFiltering;ITKRegionGrowing;ITKRegistrationMethodsv4;ITKSuperPixel;ITKTestKernel;ITKVTK;ITKWatersheds

@thewtex
Copy link
Member

thewtex commented Jan 25, 2019

I could not reproduce this :-(

@fbudin69500
Copy link
Author

Everything was set to OFF originally inside the ITK build directory.

See the result of the following command:

more CMakeCache.txt |grep -i vtk |grep -i module
ITKIOMeshVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/MeshVTK
ITKIOMeshVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/MeshVTK
ITKIOVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/VTK
ITKIOVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/VTK
ITKVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/Bridge/VTK
ITKVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/Bridge/VTK
Module_ITKVtkGlue:BOOL=OFF
//ADVANCED property for variable: Module_ITKIOMeshVTK
Module_ITKIOMeshVTK-ADVANCED:INTERNAL=1
Module_ITKIOMeshVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKIOVTK
Module_ITKIOVTK-ADVANCED:INTERNAL=1
Module_ITKIOVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVTK
Module_ITKVTK-ADVANCED:INTERNAL=1
Module_ITKVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVtkGlue
Module_ITKVtkGlue-ADVANCED:INTERNAL=1
WRAP_ITK_MODULES:INTERNAL=ITKCommon;ITKFiniteDifference;ITKImageFilterBase;ITKCurvatureFlow;ITKStatistics;ITKTransform;ITKImageFunction;ITKImageGrid;ITKAnisotropicSmoothing;ITKImageCompose;ITKMesh;ITKSpatialObjects;ITKImageStatistics;ITKPath;ITKImageIntensity;ITKImageLabel;ITKLabelMap;ITKThresholding;ITKConnectedComponents;ITKMathematicalMorphology;ITKBinaryMathematicalMorphology;ITKNarrowBand;ITKDistanceMap;ITKQuadEdgeMesh;ITKFastMarching;ITKIOImageBase;ITKImageCompare;ITKSmoothing;ITKImageGradient;ITKImageSources;ITKImageFeature;ITKOptimizers;ITKLevelSets;ITKAntiAlias;ITKBiasCorrection;ITKBridgeNumPy;ITKClassifiers;ITKColormap;ITKFFT;ITKConvolution;ITKDeconvolution;ITKDisplacementField;ITKEigen;ITKRegistrationCommon;ITKPDEDeformableRegistration;ITKIOBMP;ITKIOBioRad;ITKIOBruker;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;ITKIOJPEG;ITKIOJPEG2000;ITKIOTIFF;ITKIOLSM;ITKIOMINC;ITKIOMRC;ITKVoronoi;ITKIOMeshBase;ITKIOMeshBYU;ITKIOMeshFreeSurfer;ITKIOMeshGifti;ITKIOMeshOBJ;ITKIOMeshOFF;ITKIOMeshVTK;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIORAW;ITKIOSiemens;ITKIOSpatialObjects;ITKIOStimulate;ITKIOTransformBase;ITKIOVTK;ITKImageFrequency;ITKImageFusion;ITKImageNoise;ITKLabelVoting;ITKOptimizersv4;ITKMetricsv4;ITKQuadEdgeMeshFiltering;ITKRegionGrowing;ITKRegistrationMethodsv4;ITKSuperPixel;ITKTestKernel;ITKVTK;ITKWatersheds

@melrobin
Copy link

I am having the same problem now, but with a different source file:
[ 5%] Generating ../../itkImageToVTKImageFilter.xml
cd /home/melrobin/packages/ITK/build/Wrapping/Modules/ITKVtkGlue && /usr/bin/ccache /home/melrobin/packages/ITK/build/Wrapping/Generators/CastXML/castxml/bin/castxml -o /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.xml --castxml-gccxml --castxml-start wrapping --castxml-cc-gnu "(" /usr/lib64/ccache/c++ -mtune=native -march=corei7 -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel -msse2 -msse2 -std=c++11 ")" -w -c @/home/melrobin/packages/ITK/build/Wrapping/ITKVtkGlue.castxml.inc /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.cxx
In file included from /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.cxx:16:
/home/melrobin/packages/ITK/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h:22:10: fatal error:
'vtkImageImport.h' file not found
#include "vtkImageImport.h"
^~~~~~~~~~~~~~~~~~
1 error generated.

The include file does exist on my system, but the compiler flags do not have a path to this file.

@thewtex
Copy link
Member

thewtex commented Dec 23, 2019

@melrobin it is worth checking that we have the VTK targets listed that include vtkImageImport.h in your version of VTK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants