Page MenuHomePhabricator

Mac Installer does not start due to missing qt plugins
Closed, ResolvedPublic

Description

The Mac Installer does not work currently, as it is missing the cocoa libs.

We should automatically provide the
Contents/MacOS/platforms/libqccoa.dylib

The following Qt libs are referenced in the libqcocoa.dylib:
@rpath/QtGui.framework/Versions/5/QtGui
@rpath/QtCore.framework/Versions/5/QtCore
@rpath/QtDBus.framework/Versions/5/QtDBus
@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
@rpath/QtWidgets.framework/Versions/5/QtWidgets

As far as I can tell QtDBus has so far not been part of the installer.

I did try setting the paths manually using
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libqcocoa.dylib
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui libqcocoa.dylib
install_name_tool -change @rpath/QtDBus.framework/Versions/5/QtDBus @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus libqcocoa.dylib
install_name_tool -change @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport libqcocoa.dylib
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets libqcocoa.dylib

But so far the plugin is recognized, but can not be loaded.

Event Timeline

goch added a subscriber: goch.

The self path of a dylib can be set via
install_name_tool -id @executable_path/../MacOs/platforms/libqcocoa.dylib MitkWorkbench.app/Contents/MacOS/platforms/libqcocoa.dylib

Install DBus
cp -R ~/Qt/5.5/clang_64/lib/QtDBus.framework MitkWorkbench.app/Contents/Frameworks/

install_name_tool -id @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus MitkWorkbench.app/Contents/Frameworks/QtDBus.framework/Versions/5/QtDBus

install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ../Frameworks/QtDBus.framework/QtDBus

After we provided the libqcocoa plugin and QtDBus and its qsqllite dependency as follows:

provide the

Contents/MacOS/sqldrivers/libqsqlite.dylib

and apply the following commands:

install_name_tool -change @rpath/QtSql.framework/Versions/5/QtSql @executable_path/../Frameworks/QtSql.framework/Versions/5/QtSql libqsqlite.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libqsqlite.dylib

install_name_tool -id @executable_path/../MacOs/sqldrivers/libqsqlite.dylib MitkWorkbench.app/Contents/MacOS/sqldrivers/libqsqlite.dylib

MITK started!

[8fa4aa]: Merge branch 'bug-19679-missingCocoaPlugin'

Merged commits:

2016-04-15 12:13:32 Jonas Cordes [925c9f]
install required qt plugins and frameworks for mac
+ platforms/libqcocoa.dylib
+ sqldrivers/libqsqllite.dylib
+ QDbus.framework

User cordes has pushed new remote branch:

bug-19679-missingCocoaPlugin

[e612eb]: Merge branch 'bug-19679-SVGIconEngine'

Merged commits:

2016-04-20 13:54:35 Jonas Cordes [9b79a6]
add iconengines/libqsvgicon.dylib

User cordes has pushed new remote branch:

bug-19679-SVGIconEngine

missing icons in toolbar. For svg icon support we have to add the qt plugin :iconengines/libqsvgicon.dylib

add corresponding install commands to CMake/mitkInstallRules.cmake

User cordes has pushed new remote branch:

bug-19679-InstallDebugLib

Current master (3f608decdef1) following issue occures: Could not find QtWebEngineProcess

should be fixed in qt 5.6.1 (https://bugreports.qt.io/browse/QTBUG-50155)

can be temporarily fixed using the following commands:

cd .../Qt5.6.0/5.6/clang_64/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS

install_name_tool -rpath @loader_path/../../../../../../../../Frameworks @loader_path/../../../../../../../ ./QtWebEngineProcess

According to QTBUG-50155, this bug is resolved. We should check that and increase the minimum required Qt version to 5.6.1.

This problem still occurs when building a package both for Qt 5.6.1 and Qt 5.7.0.
The only way to make the Workbench start is to manually copy the the QtWebEngineCore.framework from <QtPath>/lib/ to the MitkWorkbench.app/Contents/Frameworks/

Finally all required dependencies were added. Major changes are located in CMake/mitkInstallRules.cmake .