Page MenuHomePhabricator

Installer on macOS doesn't work
Closed, ResolvedPublic


  • mitkInstallRules.cmake file is a mess and needs to be rewritten
    • Install Qt plugins (icon engines and so on)
    • Install platform-dependent Qt plugins
    • Figure out how to install WebEngineProcess on all plattforms (WebEngineCore.framework on macOS doesn't contain it anymore when installed, see also T19679: Mac Installer does not start due to missing qt plugins)
    • Install CTK Qt designer plugins
    • Figure out how to get rid of the custom install rules for Matchpoint services
  • Installed Workbench is not able to start because when loading libMitkDICOMRTIO.dylib it says that libMitkDICOMReaderServices.dylib is not loaded. Both files are in their expected location so I guess it is a dependency problem. Have to check how to express dependencies between services...

Event Timeline

kislinsk created this task.
This comment was removed by kislinsk.
kislinsk renamed this task from SVG icons not working in installed Workbench on macOS to Installer on macOS doesn't work.May 22 2018, 11:31 AM
kislinsk updated the task description. (Show Details)

I could fix the libMitkDICOMRTIO.dylib/libMitkDICOMReaderServices.dylib issue above by adding the DICOM reader services explicitly to the private dependencies of DICOM RT IO.

However, there are more issues:

  • The installed MitkWorkbench doesn't start because it cannot find the image of liborg_mitk_gui_qt_ext. My current workaround is to execute the MitkWorkbench as follows: DYLD_LIBRARY_PATH=/.../ MitkWorkbench --BlueBerry.clean
  • Also, the QtWebEngineProcess needs to be copied manually into the app: cp -r /.../Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Helpers /.../
  • The theme is not fully applied to the UI, some elements look different compared to the non-installed MitkWorkbench, like the labels in the status bar, or the toolbar seperators and expanding arrows.
  • Web content like the Welcome page still cannot be rendered in the installed MitkWorkbench: Attempting to run unsupported native service: /.../QtWebEngineCore.framework/Versions/5/content_renderer.service.

Wow, seems like most of the issues is resolved by manually copying the MitkWorkbench.provisioning.install file to the installer directory as MitkWorkbench.provisioning. We must check why this file isn't installed anymore (macOS-specific? CMake 3.11?).

Also, the Qt plugins directory "styles" contains a macOS plugin, which I added to the install rules.

The problem was that I didn't reset the _install_DESTINATION variable at the end of mitkInstallRules.cmake and hence following calls to the macro assumed the last set destination as default destination. In this case, the provisioning files was installed into Frameworks/QtWebEngineCore.framework instead of the Contents/MacOS directory.

Issues left:

  • Missing MatchPoint libraries that were manually copied in the old mitkInstallRules.cmake file
  • Web content still not visible

I did an export DYLD_PRINT_LIBRARIES=1 and started both the installed version and the built version of MITK and this is suspicious:

Installed Workbench
dyld: loaded: /Users/kislinsk/MITK-sb-release-Qt-5.10.1/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-2016.11.99_rb6a643-mac64/
dyld: loaded: /Users/kislinsk/MITK-sb-release-Qt-5.10.1/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-2016.11.99_rb6a643-mac64/
Built Workbench
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/QtWebEngineWidgets
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/../../../QtQuickWidgets.framework/Versions/5/QtQuickWidgets
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/
dyld: loaded: /Users/kislinsk/Qt/5.10.1/clang_64/lib/QtWebEngineCore.framework/Versions/5/Helpers/

Okay, I think I got a step further. I added the USE_SOURCE_PERMISSIONS parameter to the MITK_INSTALL() macro for the QtWebEngineCore.framework/Helpers directory. The QtWebEngineProcess application, located in a subdirectory, is now recognized as executable by fixup_bundle() and fixed up. Still, using the method above there is the following message although the QtWebEngineCore file is at the correct location:

dyld: loaded: /Users/kislinsk/MITK-sb-release-Qt-5.10.1/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-2016.11.99_rae4040-mac64/
dyld: Library not loaded: @executable_path/../Frameworks/QtWebEngineCore.framework/Versions/5/QtWebEngineCore
  Referenced from: /Users/kislinsk/MITK-sb-release-Qt-5.10.1/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-2016.11.99_rae4040-mac64/
  Reason: image not found

Uh, maybe the path @executable_path/../Frameworks/QtWebEngineCore.framework/Versions/5/QtWebEngineCore isn't correct because it should (?) be relative to QtWebEngineProcess instead of MitkWorkbench.

Yes, that's definitely an issue. However, even fixing QtWebEngineProcess wouldn't be enough as each and every Qt framework contains these paths relative to @executable_path. We should go for @rpath.

I have written a script that fixes the issue mentioned above and the installed MitkWorkbench does work now!! We have to decide how we handle this situation. Personally I'm pretty sick of all this macOS quirks for now and would vote for modifying the script so that it can be run from our install script at the right place.


# Compile list of Qt frameworks in bundle
for qt_framework_path in ${bundle_path}/Contents/Frameworks/Qt*.framework; do
  if [[ $qt_framework_path =~ ([^\/]+)\.framework ]]; then

# For each Qt framework, change the style of dependencies to other
# Qt frameworks from @executable_path to @rpath. The install name tool
# only changes existing dependencies.
for qt_framework in ${qt_frameworks[@]}; do
  for other_qt_framework in ${qt_frameworks[@]}; do
    install_name_tool -change $from $to $in

# Do the same for QtWebEngineProcess
for qt_framework in ${qt_frameworks[@]}; do
  install_name_tool -change $from $to $qtwebengineprocess_path

# Add corresponding rpath entries to MitkWorkbench and QtWebEngineProcess
# The install name tool returns an error if an entry is already present.
install_name_tool -add_rpath @executable_path/../Frameworks $mitkworkbench_path 2> /dev/null
install_name_tool -add_rpath @executable_path/../../../../.. $qtwebengineprocess_path 2> /dev/null