Discussion:
D13771: Okular/Mac : store the correct install location in the okularpart "install_name"
René J.V. Bertin
2018-06-27 22:03:57 UTC
Permalink
rjvbb created this revision.
rjvbb added a reviewer: Okular.
Restricted Application added a project: Okular.
Restricted Application added a subscriber: okular-devel.
rjvbb requested review of this revision.

REVISION SUMMARY
On Mac, shared libraries typically need to have their install location as part of their "install_name" (or "id"). The link editor uses this information to hardcode the location where shared library dependencies are expected, and the dynamic loader will this fail if this information is not correct.

Okular recently (?) made the okularplugin library dependent on the okularpart (fortunately built as a shared library). This dependency is installed in the KDE plugin directory but the install_name is set to the default location for shared libraries (`$prefix/lib/okularpart.dylib`). As a result, the okularplugin fails to load.

This patch sets the required additional target property on both the okularpart and okularplugin shared libraries so they reflect the actual install location.

TEST PLAN
Without, loading libokularplugin.dylib fails:

can't open /opt/local/share/qt5/qml/org/kde/okular/libokularplugin.dylib (dlopen(/opt/local/share/qt5/qml/org/kde/okular/libokularplugin.dylib, 6): Library not loaded: /opt/local/lib/okularpart.dylib
Referenced from: /opt/local/share/qt5/qml/org/kde/okular/libokularplugin.dylib
Reason: image not found)
Exit 1

The patch solves this.

REPOSITORY
R223 Okular

REVISION DETAIL
https://phabricator.kde.org/D13771

AFFECTED FILES
CMakeLists.txt
mobile/components/CMakeLists.txt

To: rjvbb, #okular
Cc: okular-devel, kde-mac, ngraham, aacid

Loading...