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

is not a valid Qt plugin error on startup #30

Closed
fedorov opened this issue May 5, 2016 · 37 comments
Closed

is not a valid Qt plugin error on startup #30

fedorov opened this issue May 5, 2016 · 37 comments

Comments

@fedorov
Copy link
Member

fedorov commented May 5, 2016

  Error(s):
    The file '/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25042/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib' is not a valid Qt plugin.
naucoin pushed a commit to naucoin/SlicerOpenCV that referenced this issue May 5, 2016
When SlicerOpenCV is packaged and installed, Slicer is showing various
errors related to the extension's Logic module. Most seem to be related to
VTK errors. Adding the VTK libraries to the list of target libraries explicitly,
following the example of the Chest Imaging Platform AirwayInspector extension
that was checked to work, this change results in a properly loaded
extension from the package file.

Issue Slicer#30
@naucoin
Copy link
Member

naucoin commented May 5, 2016

@fedorov This merged pull request should help:
#31

@jcfr
Copy link
Member

jcfr commented May 6, 2016

xref SBU-BMI/SlicerPathology#39

@naucoin Good catch

I wonder what was the output of otool -L libqSlicerOpenCVModule.dylib.

@jcfr
Copy link
Member

jcfr commented May 6, 2016

Also strange it is mentioned Qt plugin in the original error message

@fedorov
Copy link
Member Author

fedorov commented May 6, 2016

Hmm, with today's nightly, I get more errors, although they are different

  Error(s):
    Cannot load library /Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libPerformMetricTestLib.dylib: (dlopen(/Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libPerformMetricTestLib.dylib, 5): Library not loaded: /Users/kitware/Dashboards/Nightly/Slicer-0-build/ITKv4-build/lib/libITKIOBMP-4.10.1.dylib
  Referenced from: /Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libPerformMetricTestLib.dylib
  Reason: image not found)
  Error(s):
    Cannot load library /Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libVBRAINSDemonWarpLib.dylib: (dlopen(/Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libVBRAINSDemonWarpLib.dylib, 5): Library not loaded: /Users/kitware/Dashboards/Nightly/Slicer-0-build/ITKv4-build/lib/libITKIOBMP-4.10.1.dylib
  Referenced from: /Applications/Slicer-4.5.0-1/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/libVBRAINSDemonWarpLib.dylib
  Reason: image not found)
  Error(s):
    The plugin '/Users/fedorov/local/builds/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerQuickTCGAModule.dylib' uses incompatible Qt library. Expected build key "macosx macx-cocoa llvm no-pkg-config", got "macosx macx-cocoa g++-4 full-config"
  Error(s):
    The plugin '/Users/fedorov/local/builds/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerShortCutCoreModule.dylib' uses incompatible Qt library. Expected build key "macosx macx-cocoa llvm no-pkg-config", got "macosx macx-cocoa g++-4 full-config"
  Error(s):
    The plugin '/Users/fedorov/local/builds/SlicerOpenCV/inner-build/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib' uses incompatible Qt library. Expected build key "macosx macx-cocoa llvm no-pkg-config", got "macosx macx-cocoa g++-4 full-config"
  Error(s):
    Cannot load library /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerQuickTCGAModule.dylib: (dlopen(/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerQuickTCGAModule.dylib, 5): Library not loaded: @rpath/lib/Slicer-4.5/libqSlicerQuickTCGAModuleWidgets.dylib
  Referenced from: /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerQuickTCGAModule.dylib
  Reason: image not found)
  Error(s):
    Cannot load library /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerShortCutCoreModule.dylib: (dlopen(/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerShortCutCoreModule.dylib, 5): Library not loaded: @rpath/lib/Slicer-4.5/libqSlicerShortCutCoreModuleWidgets.dylib
  Referenced from: /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerShortCutCoreModule.dylib
  Reason: image not found)
  Error(s):
    Cannot load library /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib: (dlopen(/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib, 5): Library not loaded: @rpath/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib
  Referenced from: /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
  Reason: image not found)

@fedorov
Copy link
Member Author

fedorov commented May 6, 2016

Ah, nevermind - it picked path settings from my local build, will fix and update soon.

@fedorov
Copy link
Member Author

fedorov commented May 6, 2016

After removing paths to the locally built extension, I am getting the same errors as yesterday:

 Error(s):
    The file '/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerQuickTCGAModule.dylib' is not a valid Qt plugin.
  Error(s):
    The file '/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libqSlicerShortCutCoreModule.dylib' is not a valid Qt plugin.
  Error(s):
    The file '/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib' is not a valid Qt plugin.

@jcfr the output of otool -L /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib is the following:

$ otool -L /Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
/Applications/Slicer-4.5.0-1/Slicer.app/Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib:
    @rpath/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqSlicerBaseQTApp.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqSlicerModulesCore.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqSlicerBaseQTCLI.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqSlicerBaseQTGUI.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqMRMLWidgets.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/Frameworks/QtSvg.framework/Versions/4/QtSvg (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.9.0, current version 4.9.4)
    @rpath/lib/Slicer-4.5/libCTKQtTesting.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKVisualizationVTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libqSlicerBaseQTCore.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libSlicerBaseLogic.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libMRMLDisplayableManager.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libMRMLLogic.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libarchive.12.dylib (compatibility version 12.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libRemoteIO.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libssl.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libcrypto.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libCTKImageProcessingITKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKDICOMCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/Frameworks/QtScript.framework/Versions/4/QtScript (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtTest.framework/Versions/4/QtTest (compatibility version 4.8.0, current version 4.8.7)
    @rpath/lib/Slicer-4.5/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/lib/Slicer-4.5/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)
    @rpath/Frameworks/QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.7)
    @rpath/lib/Slicer-4.5/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libMRMLCLI.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libModuleDescriptionParser.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libMRMLCore.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libvtkAddon.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libvtkITK.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libITKLabelMap-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOGE-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKVTK-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOSpatialObjects-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOXML-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKFactoryRegistration.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libITKStatistics-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKSpatialObjects-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKPath-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkNetlibSlatec-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOGDCM-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkgdcmMSFF-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkgdcmDICT-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkgdcmIOD-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKEXPAT-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkgdcmDSED-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkgdcmCommon-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOJPEG-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOBMP-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOLSM-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOPNG-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOTIFF-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOVTK-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOStimulate-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOBioRad-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOMeta-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKMetaIO-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOMRC-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIONIFTI-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIONRRD-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOGIPL-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOTransformHDF5-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOTransformInsightLegacy-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOTransformMatlab-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOTransformBase-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKTransform-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkMGHIO-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIODCMTK-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libi2d.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmjpeg.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libijg8.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libijg12.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libijg16.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmjpls.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libcharls.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libcmr.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmwlm.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmpstat.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmtls.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmsr.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmimage.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmdsig.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmqrdb.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmnet.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmrt.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmimgle.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmseg.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmfg.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmiod.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libdcmdata.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/liboflog.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    @rpath/lib/Slicer-4.5/libofstd.8.dylib (compatibility version 8.0.0, current version 3.6.1)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
    @rpath/lib/Slicer-4.5/libvtkIOInfovis-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libFreeSurfer.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libvtkTeem.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libteem.1.dylib (compatibility version 1.0.0, current version 1.12.0)
    @rpath/lib/Slicer-4.5/libvtkFiltersFlowPaths-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkGUISupportQtOpenGL-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkGUISupportQtWebkit-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkViewsQt-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkViewsInfovis-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkChartsCore-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkInfovisLayout-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkInfovisCore-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkViews-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkGUISupportQtSQL-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkRenderingQt-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkGUISupportQt-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkInteraction-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkFiltersHybrid-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.7)
    @rpath/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.7)
    @rpath/lib/Slicer-4.5/libvtkOpenGL-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkImagingHybrid-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkIO-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkDICOMParser-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkmetaio-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtktiff-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkjpeg-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtksqlite-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkexpat-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkoggtheora-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkpng-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkTestingRendering-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkRendering-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkftgl-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkfreetype-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkFilters-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkalglib-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkverdict-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkImaging-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkWrappingPython27Core-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtkCommon-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libvtksys-6.3.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Python/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.6.3)
    /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.36.0)
    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    @rpath/lib/Slicer-4.5/libITKVideoIO-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKIOImageBase-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKVideoCore-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKCommon-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitksys-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libITKVNLInstantiation-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkvnl_algo-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkvnl-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkv3p_netlib-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitknetlib-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/lib/Slicer-4.5/libitkvcl-4.10.1.dylib (compatibility version 1.0.0, current version 1.0.0)

@naucoin
Copy link
Member

naucoin commented May 6, 2016

Looking at the results of otools on my machine (nightly build + extension manager install of SlicerOpenCV), and checking for those files, I get:

ls: /Users/nicole/Desktop/Slicer.app/Contents/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib: No such file or directory
ls: /Users/nicole/Desktop/Slicer.app/Contents/lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.1.dylib: No such file or directory

Looking for those files:

> cd  /Users/nicole/Desktop/Slicer.app
> find . -name libvtkSlicerOpenCVModuleLogic.dylib
./Contents/Extensions-25044/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogic.dylib
> find . -name libITKVideoBridgeOpenCV-4.10.1.dylib
[nothing]
> find . -name libITKVideoBridgeOpenCV\*
[nothing]

So the module logic is in the wrong place, and the ITK Video Bridge didn't get installed at all.

@naucoin
Copy link
Member

naucoin commented May 6, 2016

In my local build of SlicerOpenCV, the ITK library is there:
inner-build/_CPack_Packages/Darwin/TGZ/25043-macosx-amd64-SlicerOpenCV-git9eb38a9-2016-05-02/Slicer.app/Contents/lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.1.dylib
and confirmed that it's in the .tar.gz as well

@fedorov
Copy link
Member Author

fedorov commented May 6, 2016

Good catch!

@jcfr
Copy link
Member

jcfr commented May 6, 2016

@naucoin Great. Thanks for the report. Very helpful.

I will work on a fix to address this.

@naucoin
Copy link
Member

naucoin commented May 6, 2016

More oddness: in the .tar.gz that I produce locally I have two copies of the logic library:

> find . -name libvtkSlicerOpenCVModuleLogic.dylib

./25043-macosx-amd64-SlicerOpenCV-git9eb38a9-2016-05-02/Slicer.app/Contents/Extensions-25043/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogic.dylib

./25043-macosx-amd64-SlicerOpenCV-git9eb38a9-2016-05-02/Slicer.app/Contents/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib

@naucoin
Copy link
Member

naucoin commented May 6, 2016

@jcfr thanks!

@jcfr
Copy link
Member

jcfr commented May 6, 2016

two copies of the logic library

Most likely a side effect of the fixup.

Until now, the assumption was that all Slicer libraries were properly fixed when creating extension packages.

To avoid recursing through all dependencies of Slicer when fixing up an extension ... each time the result returned by otool matches a library living under the Slicer build tree .. we skip it.

This is why we have a custom fixup module for extension different from the one used to fixup Slicer: SlicerExtensionCPackBundleFixup.cmake.in vs SlicerCPackBundleFixup.cmake.in

@fedorov
Copy link
Member Author

fedorov commented May 10, 2016

@jcfr is there anything further @naucoin can do to help you with resolving this issue?

@jcfr
Copy link
Member

jcfr commented May 11, 2016

Locally building the package, we get:

Run CPack packaging tool...
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: SlicerOpenCV
CPack: - Install project: SlicerOpenCV
Log file: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/complete-bundles-log.txt
Calling fixup_extension with
app=/Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app
<EXTENSION_SUPERBUILD_DIR>=/Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release
libs=
  <EXTENSION_SUPERBUILD_DIR>/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
  <EXTENSION_SUPERBUILD_DIR>/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/vtkSlicerOpenCVModuleLogicPython.so
libs_path=
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5/qt-loadable-modules
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5/cli-modules
CPack: - Run preinstall target for: ITKVideoBridgeOpenCV
CPack: - Install project: ITKVideoBridgeOpenCV
CPack: Create package
CPack: - package: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05.tar.gz generated.

A first problem is that the installation of ITKVideoBridgeOpenCV is done (or seems to be done) after the fixup process. It should happen before.

@jcfr
Copy link
Member

jcfr commented May 11, 2016

It turns out that setting CPACK_INSTALL_CMAKE_PROJECTS as done below causes the current project to be installed first and next ITKVideoBridgeOpenCV project.

Since the fixup code is associated with the current project, it will be executed first.

set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ITKVideoBridgeOpenCV_DIR};ITKVideoBridgeOpenCV;RuntimeLibraries;/")

See here for the source.

@jcfr
Copy link
Member

jcfr commented May 11, 2016

An approach to explore would be to run the fixup code as the last "project".

That should be possible without too much work because the fixup is already moved into his own directory. See here

jcfr added a commit to jcfr/SlicerOpenCV that referenced this issue May 11, 2016
This commit copy the common Slicer script from
"Slicer/CMake/SlicerExtensionCPack.cmake"
to "SlicerOpenCV/CMake/SlicerOpenCVExtensionCPack.cmake".

Modification specific to SlicerOpenCV are indicated by comment "# SlicerOpenCV"

Ultimately, the updates should be contributed back to Slicer core.
@jcfr
Copy link
Member

jcfr commented May 11, 2016

Now that the fixup happen last, here is the output:

CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: SlicerOpenCV
CPack: - Install project: SlicerOpenCV
CPack: - Run preinstall target for: ITKVideoBridgeOpenCV
CPack: - Install project: ITKVideoBridgeOpenCV
/usr/bin/install_name_tool: no LC_RPATH load command with path: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/OpenCV-install/share/OpenCV/3rdparty/lib found in: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents/lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.1.dylib (for architecture x86_64), required for specified option "-delete_rpath /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/OpenCV-install/share/OpenCV/3rdparty/lib"
CPack: - Run preinstall target for: SlicerOpenCV-Fixup
CPack: - Install project: SlicerOpenCV-Fixup
Log file: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/complete-bundles-log.txt
Calling fixup_extension with
app=/Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app
<EXTENSION_SUPERBUILD_DIR>=/Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release
libs=
  <EXTENSION_SUPERBUILD_DIR>/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
  <EXTENSION_SUPERBUILD_DIR>/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/vtkSlicerOpenCVModuleLogicPython.so
libs_path=
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5/qt-loadable-modules
  <EXTENSION_SUPERBUILD_DIR>/inner-build/lib/Slicer-4.5/cli-modules
CPack: Create package
CPack: - package: /Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05.tar.gz generated.

We can see the following issues:

  1. error installing the ITKVideoBridgeOpenCV project: /usr/bin/install_name_tool: no LC_RPATH load command with path:. I suspect this is related to CMP0042.
  2. wrong install directory for the ITK libraries:
factory@kitware:/Users/kitware/Dashboards/Experimental/SlicerOpenCV-Release/inner-build/_CPack_Packages/Darwin/TGZ/25060-macosx-amd64-SlicerOpenCV-git35fb521-2016-05-05/Slicer.app/Contents> find .
.
./Extensions-25060
./Extensions-25060/SlicerOpenCV
./Extensions-25060/SlicerOpenCV/lib
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogic.dylib
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogicPythonD.dylib
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python/vtkSlicerOpenCVModuleLogic.py
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python/vtkSlicerOpenCVModuleLogic.pyc
./Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/vtkSlicerOpenCVModuleLogicPython.so
./lib
./lib/Slicer-4.5
./lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.1.dylib
./lib/Slicer-4.5/libITKVideoBridgeOpenCV-4.10.dylib
./lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib
./lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogicPythonD.dylib

@jcfr
Copy link
Member

jcfr commented May 11, 2016

error /usr/bin/install_name_tool: no LC_RPATH load command with path: is avoided by apply the following patch to ITK:

diff --git a/Modules/Video/BridgeOpenCV/CMakeLists.txt b/Modules/Video/BridgeOpenCV/CMakeLists.txt
index c7a4b17..c260b4b 100644
--- a/Modules/Video/BridgeOpenCV/CMakeLists.txt
+++ b/Modules/Video/BridgeOpenCV/CMakeLists.txt
@@ -1,4 +1,9 @@
 cmake_minimum_required(VERSION 2.8.9)
+
+if(POLICY CMP0042)
+  cmake_policy(SET CMP0042 OLD)
+endif()
+
 if(NOT ITK_SOURCE_DIR)
   include(itk-module-init.cmake)
 endif()

jcfr added a commit to jcfr/SlicerOpenCV that referenced this issue May 11, 2016
@jcfr
Copy link
Member

jcfr commented May 11, 2016

Now the ITKVideoBridgeOpenCV library is installed along side the loadables libraries:

./Slicer.app
./Slicer.app/Contents
./Slicer.app/Contents/Extensions-25060
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libITKVideoBridgeOpenCV-4.10.1.dylib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libITKVideoBridgeOpenCV-4.10.dylib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libqSlicerOpenCVModule.dylib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogic.dylib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerOpenCVModuleLogicPythonD.dylib
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python/vtkSlicerOpenCVModuleLogic.py
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/Python/vtkSlicerOpenCVModuleLogic.pyc
./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5/qt-loadable-modules/vtkSlicerOpenCVModuleLogicPython.so
./Slicer.app/Contents/lib
./Slicer.app/Contents/lib/Slicer-4.5
./Slicer.app/Contents/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogic.dylib
./Slicer.app/Contents/lib/Slicer-4.5/libvtkSlicerOpenCVModuleLogicPythonD.dylib

@jcfr
Copy link
Member

jcfr commented May 11, 2016

There is still remaining libraries in ./Slicer.app/Contents/lib/Slicer-4.5/ .. this will need to be investigated.

Ensuring that ITKVideoBridgeOpenCV is fixed up will help. The idea is the following:

  • Agree on a location for third party libraries installed in extension. For example, ./Slicer.app/Contents/Extensions-25060/SlicerOpenCV/lib/Slicer-4.5. Similarly to what is done for loadable module here, the following could be added:
set(Slicer_THIRDPARTY_BIN_DIR ${Slicer_BIN_DIR})
set(Slicer_THIRDPARTY_LIB_DIR ${Slicer_LIB_DIR})
set(Slicer_THIRDPARTY_SHARE_DIR  ${Slicer_SHARE_DIR})

set(Slicer_INSTALL_THIRDPARTY_BIN_DIR "${Slicer_INSTALL_ROOT}${Slicer_BUNDLE_EXTENSIONS_LOCATION}${Slicer_THIRDPARTY_BIN_DIR}")
set(Slicer_INSTALL_THIRDPARTY_LIB_DIR "${Slicer_INSTALL_ROOT}${Slicer_BUNDLE_EXTENSIONS_LOCATION}${Slicer_THIRDPARTY_LIB_DIR}")
set(Slicer_INSTALL_THIRDPARTY_SHARE_DIR "${Slicer_INSTALL_ROOT}${Slicer_BUNDLE_EXTENSIONS_LOCATION}${Slicer_THIRDPARTY_SHARE_DIR}")

Note: For now the THIRDPARTY variables would be used only for Superbuild extensions.

@jcfr
Copy link
Member

jcfr commented May 11, 2016

@fedorov @naucoin I will resume work when I return from travelling on Monday 16th.

@fedorov
Copy link
Member Author

fedorov commented May 19, 2016

@jcfr did you want @naucoin to investigate the ideas you covered in the earlier comments?

Just want to make sure we are in sync on the next steps.

@fedorov
Copy link
Member Author

fedorov commented Jun 2, 2016

@jcfr we are reviewing the status of the project with @naucoin during our weekly meeting, and there has been no progress on this topic. Do you have a new estimate when you think you could get to it? Thank you.

@jcfr
Copy link
Member

jcfr commented Jun 10, 2016

I plan on addressing this before the end of the week.

@jcfr
Copy link
Member

jcfr commented Jun 10, 2016

Look like I have all the pieced together to fix packaging on MacOSX 😄

Will update Slicer and submit a PR after lunch.

@fedorov
Copy link
Member Author

fedorov commented Jun 10, 2016

sounds promising! 👍

jcfr added a commit to Slicer/SlicerGitSVNArchive that referenced this issue Jun 10, 2016
Having the ids of library set as full path is mandatory to ensure
fixup bundle script works properly.

Setting CMAKE_MACOSX_RPATH to 0 ensures that @rpath will not be automatically
be applied to extension module libraries where the CMake minimum required
version >= 3.0.

CMake 3.0 is the version where CMP0042 is set to NEW by default.

CMP0042 set to NEW means that CMAKE_MACOSX_RPATH is ON by default.

Notes: Existing workarounds within Slicer core (e.g use of patched version
of ITK forcing CMP0042 to OLD) will be removed and a similar change will
also be applied to SlicerCPack.cmake.

See Slicer/SlicerOpenCV#30

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25180 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr added a commit to Slicer/SlicerGitSVNArchive that referenced this issue Jun 10, 2016
…ens last

For extension of type "SuperBuild", the external projects to install are
specified by appending build directories to the variable
"CPACK_INSTALL_CMAKE_PROJECTS", then this variable is processed at
packaging time by "CPack".

This means that simply ensuring the fixup script is executed last during
the install of the current project was not sufficient.

Instead, this commit creates a minimal CMake project named
"<ExtensionName>-Fixup" that is including the fixup script. Then, this
project is appending last to the variable "CPACK_INSTALL_CMAKE_PROJECTS".

See Slicer/SlicerOpenCV#30

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25181 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr added a commit to Slicer/SlicerGitSVNArchive that referenced this issue Jun 10, 2016
…libs

Introduces "Slicer_THIRDPARTY_(BIN|LIB|SHARE)_DIR" and
"Slicer_INSTALL_THIRDPARTY_(BIN|LIB|SHARE)_DIR" variables providing a
well defined interface for configuring the build and install directories
of external projects.

This commit also updates the extension fixup script to consider
libraries associated with thirdparty libraries.

See Slicer/SlicerOpenCV#30

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25182 3bd1e089-480b-0410-8dfb-8563597acbee
@jcfr
Copy link
Member

jcfr commented Jun 11, 2016

Using the latest Slicer, this PR should address the macosx packaging problems.

See #34

If that works for you I will squash the commit.

jcfr added a commit to jcfr/SlicerOpenCV that referenced this issue Jun 11, 2016
* Required Slicer >= r25182, this will ensure fixup of
MacOSX libraries happen last.

* To ensure fixup script works as expected, build
ITKVideoBridgeOpenCV libraries outside of ITK build tree
and install them in the extension package.
@fedorov
Copy link
Member Author

fedorov commented Jun 13, 2016

@naucoin please test and let @jcfr know if ok to merge. Thank you @jcfr !

@naucoin
Copy link
Member

naucoin commented Jun 13, 2016

@jcfr @fedorov Success! LGTM for merging.

For the record: I just did a rebuild, not from scratch, after updating Slicer. Then I did a clean build of the opencv extension module, then make package, then install from file in the Slicer Extension Manager (it's not seeing any extensions at all right now). Restarted, no errors, but it does have the debugging print out that I had removed, so JC's branch is behind the trunk.
I also recompiled the OpenCVExample extension and packaged and installed it and that loaded okay as well (though it's CLI failed on reading the input image from the shared memory pointer, but did work when I set Slicer to prefer executable CLIs).
The SlicerPathology extension also built, packaged, installed and ran okay.

@jcfr
Copy link
Member

jcfr commented Jun 13, 2016

JC's branch is behind the trunk

Indeed. Let me rebase and re-organized commits.

CLI failed on reading the input image from the shared memory pointer, but did work when I set Slicer to prefer executable CLIs

Let's create a dedicated issue to track this.

@jcfr
Copy link
Member

jcfr commented Jun 13, 2016

@naucoin Thanks for testing, topic has been rebased on top of current master. See #34

It should be good to integrate now. 🎆

@naucoin
Copy link
Member

naucoin commented Jun 13, 2016

@jcfr Thanks! Looks good, integrating now.
And extra thanks for speeding up Slicer's start up time, it made all the restarts I had to do this morning go much more quickly!

@jcfr
Copy link
Member

jcfr commented Jun 13, 2016

for speeding up Slicer's start up time

Good to now.

Do you have an order of magnitude to quantify the improvement ?

As a side note, you could do this to measure:

~/Projects/Slicer/Applications/SlicerApp/Testing/Python/MeasureStartupTimes.py --normal  --repeat 5 ./Slicer

@naucoin
Copy link
Member

naucoin commented Jun 13, 2016

Nothing concrete, but I started allowing Slicer to load CLIs and it's still much faster than it used to be without them. Running the measurement script:
Slicer --no-splash --exit-after-startup
1/5: 10.33s
Slicer --no-splash --exit-after-startup
2/5: 6.69s
Slicer --no-splash --exit-after-startup
3/5: 6.52s
Slicer --no-splash --exit-after-startup
4/5: 6.59s
Slicer --no-splash --exit-after-startup
5/5: 6.86s
Average: 7.40s

@jcfr
Copy link
Member

jcfr commented Jun 13, 2016

On Mon, Jun 13, 2016 at 2:18 PM, Nicole Aucoin notifications@github.com
wrote:

I started allowing Slicer to load CLIs and it's still much faster

Indeed, thanks to lazy loading, number of CLIs should have no impact (or
very very minimal) on startup time.

+1 919 869 8849

@fedorov
Copy link
Member Author

fedorov commented Jun 28, 2016

Verified that SlicerOpenCV works fine on Mac now! Thanks for resolving this!

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

No branches or pull requests

3 participants