Bug 1196315

Summary: InsightToolkit-devel should requires InsightToolkit-vtk
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: InsightToolkitAssignee: Mario Ceresa <mrceresa>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: lemenkov, mrceresa, sebp
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-28 13:40:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1199310    
Bug Blocks: 1197202    

Description Orion Poplawski 2015-02-25 16:55:37 UTC
Description of problem:

While testing builds against VTK 6.2.0.rc1:

https://copr-be.cloud.fedoraproject.org/results/orion/VTK/fedora-rawhide-x86_64/nifti2dicom-0.4.9-3.fc23/build.log

CMake Error at /usr/lib64/cmake/InsightToolkit/ITKTargets.cmake:253 (message):
  The imported target "ITKVtkGlue" references the file
     "/usr/lib64/libITKVtkGlue-4.7.so.1"
  but this file does not exist.  Possible reasons include:

needs:

Requires:       %{name}-vtk%{?_isa} = %{version}-%{release}

Comment 1 Sebastian Pölsterl 2015-02-26 08:29:26 UTC
Rawhide now contains a InsightToolkit-vtk-devel package which contains headers and symbolic link to so file.

Comment 2 Orion Poplawski 2015-02-26 15:31:37 UTC
The problem is, *any* package that loads the ITKTargets.cmake file will get this error, regardless on whether or not it uses the vtk components.  So either ITKTargets.cmake needs to get patched to make that optional, or InsightToolkit-devel needs to require InsightToolkit-vtk-devel.

Comment 3 Orion Poplawski 2015-03-05 15:29:28 UTC
This now prevents nifti2dicom from building in rawhide.  See https://kojipkgs.fedoraproject.org//work/tasks/2486/9092486/build.log

CMake Error at /usr/lib/cmake/InsightToolkit/ITKTargets.cmake:253 (message):
  The imported target "ITKVtkGlue" references the file
     "/usr/lib/libITKVtkGlue-4.7.so.1"
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     "/usr/lib/cmake/InsightToolkit/ITKTargets.cmake"
  but not all the files it references.
Call Stack (most recent call first):
  /usr/lib/cmake/InsightToolkit/ITKConfig.cmake:50 (include)
  CMakeLists.txt:41 (find_package)

Comment 4 Sebastian Pölsterl 2015-03-05 21:55:36 UTC
ITK generates the list of modules (ITKTargets.cmake) depending on what was available during compile time. ITKConfig.cmake contains a hard coded list of modules as well. Even if ITKVtkGlue would be removed from ITKTargets.cmake ITKConfig.cmake for the InsightToolkit-devel package, InsightToolkit-vtk-devel would need to overwrite these files.

I would have liked to avoid the vtk dependency for the non-vtk parts, but that doesn't seem to be possible as is. I'm going to add InsightToolkit-vtk-devel to requires to InsightToolkit-devel.