Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-32379

macdeployqt tool does not change a links to relative once inside executable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: 5.1.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      qt 5.1
      Mac OS X 10.7.5

      Description

      I'm using qt 5.1 and having troubles with deployment of my QtQuick application on Mac OS X

      I use dynamical linking with QT. The root of problem is in links to QT libraries which are written into executable after build. They are right, but contains double slashes

      otool -L TestDeployment.app/Contents/MacOS/TestDeployment
      
      TestDeployment.app/Contents/MacOS/TestDeployment:
       /Users/username/Qt5.1.0//5.1.0/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.1.0, current version 5.1.0)
       /Users/username/Qt5.1.0//5.1.0/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.1.0, current version 5.1.0)
       /Users/username/Qt5.1.0//5.1.0/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.1.0, current version 5.1.0)
       /Users/username/Qt5.1.0//5.1.0/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.1.0, current version 5.1.0)
       /Users/username/Qt5.1.0//5.1.0/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.1.0, current version 5.1.0)
       /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
       /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
       /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
      
      

      As you can see - there is a double slash - /Users/username/Qt5.1.0//5.1.0/

      As a result when I run macdeployqt on my app bundle, it uses install_name_tool to change links. But it pass path to QT with one slash only. As a result install_name_tool is looking for a link with one slash inside executable, can't find that, and link stays unchanged.

      How to reproduce:

      1. Create QtQuick 2 Application
      2. Build it
      3. Run otool -L on executable to check what libraries you are linking to - the must be double slash in the path to your qt installation dir
      4. Run macdeployqt on a bundle
      5. Run otool -L again. All links will stay absolute, but must be relative

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            a.kulbei Aliaksei Kulbei
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes