Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Following Mac @rpath, @loader_path conventions during deployment
Forum Updated to NodeBB v4.3 + New Features

Following Mac @rpath, @loader_path conventions during deployment

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mark_in_gr
    wrote on last edited by
    #1

    I have a library which was built on OS X using Xcode with @rpath as the "Installation Directory" and I want to mimic the general @rpath behavior by making use of @loaderpath/../Frameworks on the executable built with Qt Creator which uses this library, similar to how you would with the Xcode "Runpath Search Paths" settings.

    However, I haven't found a way to successfully do this. I've tried setting QMAKE_RPATHDIR in the .pro file in my project, using several different values, but that doesn't seem to work with qmake. I've read the link below, but it doesn't appear a solution was created:

    "Frameworks should use @rpath":https://bugreports.qt-project.org/browse/QTBUG-31814?focusedCommentId=206432&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-206432

    I have several other libraries/dylib files linked to my application and deploying successfully when using the "macdeployqt" function primarily because these are @executable_path based libraries.

    Is there a way to use @rpath for OS X deployed QT applications?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From the top of my head I would say that you'd have to use install_name_tool yourself to modify the paths the way you want them to be.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mark_in_gr
        wrote on last edited by
        #3

        Thank you for the reply. I came to the same conclusion. I ended up using the following in order to override the @rpath settings in the library I am linking to:

        *install_name_tool -id @executable_path/../Frameworks/libA.dylib "Application.app"/Contents/Frameworks/libA.dylib

        install_name_tool -change @rpath/libA.dylib @executable_path/../Frameworks/libA.dylib "Application.app/Contents/MacOS/Application"*

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Nothing like a bash script to automate the process :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved