D13771: Okular/Mac : store the correct install location in the okularpart "install_name"

René J.V. Bertin noreply at phabricator.kde.org
Wed Jun 27 22:03:57 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20180627/3623cc05/attachment.html>


More information about the kde-mac mailing list