Errors building CastXML and Python wrapping on Windows

I’m trying to build ITK 5.3.0 and RTK on Windows using CMake and Visual Studio, but am running into a number of errors like this:

|Error|MSB8066|Custom build for ‘C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkDistanceMetric.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkEuclideanDistanceMetric.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogram.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToEntropyImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToIntensityImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToLogProbabilityImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToProbabilityImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToRunLengthFeaturesFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkHistogramToTextureFeaturesFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageToHistogramFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkKdTree.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkKdTreeBasedKmeansEstimator.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkKdTreeGenerator.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkListSample.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkMaskedImageToHistogramFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkMembershipFunctionBase.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkNormalVariateGenerator.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkSample.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkScalarImageToCooccurrenceMatrixFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkScalarImageToHistogramGenerator.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkScalarImageToRunLengthFeaturesFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkScalarImageToRunLengthMatrixFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkScalarImageToTextureFeaturesFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkWeightedCentroidKdTreeGenerator.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\cedf57da815de99153ee1421f6cd0746\ITKStatisticsCastXML.rule’ exited with code -1073741515.|ITKStatisticsCastXML|C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets|241||

I think this may be related to the castXML and python wrapping flags, but I don’t know enough about it to say for sure.

Maybe doing an incremental build will succeed? If not, maybe @simon.rit has some suggestions.

Do you have more info on the error? I don’t think there is enough information for solving the issue. Normally, building ITK with the default options, Module_RTK=ON and ITK_WRAP_PYTHON=ON should work…

1 Like

I have been trying to figure out how to get more information on this, but the build output isn’t showing me a whole lot. The C++ side of things seems to build ok (like I can build and run the RTK applications), but when it starts doing the castxml wrappers then it has this error.

It looks like it is something to do with generating the xml files, for example if I try to build just the RTKCastXML project I get this:

Build started…
1>------ Build started: Project: castxml (ITK\Wrapping\Generators\CastXML\castxml), Configuration: Debug x64 ------
2>------ Build started: Project: RTKCastXML, Configuration: Debug x64 ------
2>Generating …/…/castxml_inputs/itkContinuousIndexRTK.xml
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for ‘C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkContinuousIndexRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCovariantVectorRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCudaDataManager.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCudaImage.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCudaImageDataManager.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCudaImageToImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkCudaInPlaceImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkFixedArrayRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageBaseRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageDuplicatorRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageFileReaderRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageFileWriterRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageRegionRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageSourceRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkImageToImageFilterRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkInPlaceImageFilterRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkMatrixRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkPointRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkPyBufferRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkVariableLengthVectorRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkVectorImageRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkVectorRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\itkWarpImageFilterRTK.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkADMMTotalVariationConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkADMMWaveletsConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkAmsterdamShroudImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkBioscanGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkBoellaardScatterCorrectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkBoxShape.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkConditionalMedianImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkConjugateGradientConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkConstantImageSource.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkConvexShape.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaConstantVolumeSource.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaDisplacedDetectorImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaFDKConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaForwardProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCudaSplatImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkCyclicDeformationImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDCMImagXImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDaubechiesWaveletsDenoiseSequenceImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDeconstructSoftThresholdReconstructImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDenoisingBPDQImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDigisensGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDisplacedDetectorForOffsetFieldOfViewImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDisplacedDetectorImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDrawConvexImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDrawEllipsoidImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDrawGeometricPhantomImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDrawQuadricImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkDrawSheppLoganFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkEdfImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkEdfRawToAttenuationImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkElektaSynergyGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkElektaSynergyRawLookupTableImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkElektaXVI5GeometryXMLFileReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkExtractPhaseImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFDKBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFDKConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFDKWarpBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFDKWeightProjectionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFFTProjectionsConvolutionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFFTRampImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFieldOfViewImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkForwardProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkForwardWarpImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFourDConjugateGradientConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFourDSARTConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkFourDToProjectionStackImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkGeometricPhantom.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkGeometricPhantomFileReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkGlobalResourceProbe.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkHisImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkHncImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkHndImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkI0EstimationProjectionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkImagXImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkImageToVectorImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkIntersectionOfConvexShapes.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkIterativeConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkIterativeFDKConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkJosephBackAttenuatedProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkJosephBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkJosephForwardAttenuatedProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkJosephForwardProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkLUTbasedVariableI0RawToAttenuationImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkLagCorrectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkLastDimensionL0GradientDenoisingImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkLookupTableImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkMechlemOneStepSpectralReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkMotionCompensatedFourDConjugateGradientConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkOSEMConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkOraGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkOraImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkParkerShortScanImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkPhaseGatingImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkPolynomialGainCorrectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkProjectGeometricPhantomImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkProjectionGeometry.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkProjectionStackToFourDImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkProjectionsReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkQuadricShape.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkRayBoxIntersectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkRayConvexIntersectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkRayEllipsoidIntersectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkRayQuadricIntersectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkRegularizedConjugateGradientConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkReorderProjectionsImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSARTConeBeamReconstructionFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkScatterGlareCorrectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSelectOneProjectionPerCycleImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSheppLoganPhantomFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSimplexSpectralProjectionsDecompositionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSoftThresholdImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSpectralForwardModelImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSplatWithKnownWeightsImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSubSelectFromListImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkSubSelectImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkThreeDCircularProjectionGeometry.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkThreeDCircularProjectionGeometryXMLFileReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkThreeDCircularProjectionGeometryXMLFileWriter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkTotalVariationDenoisingBPDQImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkTotalVariationImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkVarianObiGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkVarianObiRawImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkVarianProBeamGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkVectorImageToImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkWaterPrecorrectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkXRadGeometryReader.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkXRadImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkXRadRawToAttenuationImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkXimImageIO.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkZengBackProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\9b223592eed3e3a23c9765941b347a36\rtkZengForwardProjectionImageFilter.xml.rule;C:\dev\build\InsightToolkit-5.3.0\CMakeFiles\6652e87b44fe9e8cbe7b82b97dba6b3c\RTKCastXML.rule’ exited with code -1073741515.
2>Done building project “RTKCastXML.vcxproj” – FAILED.
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

I’m not sure how to get it to tell me more, I will keep looking though.

It does not tells you a lot indeed. Have you tried to build it without RTK?

Ok, turned on the full build output for Visual Studio, extracted the actual castxml.exe command that was being used, and then ran it on it’s own in a developer command prompt and got this:

image

So it appears that castxml.exe depends on zlib1__.dll which was absent on my machine. I don’t know enough about the ITK build process to know if this is an issue for anyone else or just for my setup, but manually putting a copy of the zlib1 DLL at the same location as castxml.exe seems to have resolved this issue for me.

1 Like

If you configured ITK to use DLLs, this might have somehow happened. Due to need to add ITK’s bin folder to the path, I avoid using DLLs.

Are you talking about the BUILD_SHARED_LIBS CMake flag for ITK to have ITK build DLLs itself? I have been setting that to false, since I don’t need ITK DLLs for this particular project.

The error I got seems like a tooling issue with the internal copy of castxml that ITK downloaded missing components, or with Windows just being weird in general with things like DLLs and components like zlib.

Which version of Windows do you have? I think that @matt.mccormick last updated CastXML.

This is Windows 10 Version 21H2 Build 19044.2604

I have a nightly Python build on Win10, 22H2. Current Build is 19045.2604. These are castxml.exe’s dependencies:
castxml-dependencies

There is no dependency on zlib DLL.

Interesting. Mine has all of those but also zlib.

image

Mine probably comes from this commit, which was added a few days after 5.3.0 was released. That commit is also in the release branch, meaning it will make it into 5.3.1. Can you try using the release branch instead of 5.3.0 tag?