Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [solved] Dyld Error Message: in deployment on MAC
Forum Updated to NodeBB v4.3 + New Features

[solved] Dyld Error Message: in deployment on MAC

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 2 Posters 4.3k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    Check your application once deployed and verify that you have the QtSvg framework inside. Once that's done, verify the executable and svg plugin using otool -L. You'll see if one of the libraries is still pointing to your local Qt

    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
      MarkBrooks
      wrote on last edited by
      #3

      Hi,

      Thanks for this. So I went and run the otool -L.
      Indeed there seem to be some that are point to local version on my machine.

      Is this the problem?
      How can I get them to be included propperly?

      Thanks
      Mark

      marks-air:build-mark1-Desktop_Qt_Qt_Version_clang_64bit-Release markbrooks$ otool -L SenonicsMacApplication_1.0.18.app/Contents/MacOS/MacApplication

      SenonicsMacApplication_1.0.18.app/Contents/MacOS/MacApplication:

      /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)

      /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)

      /Users/markbrooks/Qt/5.4/clang_64/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.4.0, current version 5.4.0)

      /Users/markbrooks/Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.0)

      /Users/markbrooks/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.0)

      /Users/markbrooks/Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.0)

      /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.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 60.0.0)

      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

      marks-air:build-mark1-Desktop_Qt_Qt_Version_clang_64bit-Release markbrooks$

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

        Yes it's the problem.

        After a run of macdeployqt they should all points inside the app bundle. Did you run otool after macdeployqt or on a new build ?

        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
          MarkBrooks
          wrote on last edited by
          #5

          Hi @SGaist,

          Thanks again for your ideas…. I will try to give some more details of my sequence….

          (a) I am running Qt 5.3.2 (Clang 5.1 (Apple), 64 bit)
          I run Qt5.3 Clang 64 bit release mode.

          (b) If I try tool -L on the generated app then it shows this…. (notice the hard links)

          marks-air:before_deployment markbrooks$ otool -L MacApplication.app/Contents/MacOS/MacApplication

          MacApplication.app/Contents/MacOS/MacApplication:
          /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
          /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
          /Users/markbrooks/Qt/5.4/clang_64/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.4.0, current version 5.4.0)
          /Users/markbrooks/Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.0)
          /Users/markbrooks/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.0)
          /Users/markbrooks/Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.0)
          /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.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 60.0.0)
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

          (c) I then make the deployment using….
          ~/Qt/5.3/clang_64/bin/macdeployqt MacApplication.app -dmg -qmldir=/Users/markbrooks/Qt/5.3/clang_64/qml -verbose=3

          For this deployment then I extract and use tool -L again…. (notice the @executable_path)
          marks-air:after_deployment markbrooks$ otool -L MacApplication.app/Contents/MacOS/MacApplication

          MacApplication.app/Contents/MacOS/MacApplication:
          /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
          /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
          @executable_path/../Frameworks/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.4.0, current version 5.4.0)
          @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.0)
          @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.0)
          @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.0)
          /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.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 60.0.0)
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

          So it seems to have at least changed to include an @executable_path.

          (d) How come then when someone else tries to run this they get an error and it says….

          Dyld Error Message:
          Library not loaded: /Users/markbrooks/Qt/5.4/clang_64/lib/QtSvg.framwork/Versions/5/QtSvg
          Referenced from: /Volumes/VOLUME/SenonicsMacApplication_1.0.18.app/Contents/MacOS/MacApplication Reason: image not found

          Any ideas?
          What is @execution_path and how does it get defined for another PC.

          Regards
          Mark

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

            So the application is ok, next step is to check the Qt frameworks bundled and I'd say that they are all okay except QtSvg

            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
              MarkBrooks
              wrote on last edited by
              #7

              Hi @SGaist,

              Well at least all the frameworks seem to exist... I checked the frameworks direstory in the application...

              marks-air:after_deployment markbrooks$ ls MacApplication.app/Contents/Frameworks/

              QtCore.framework
              QtMultimedia
              Quick_p.framework
              QtQml.framework
              QtSvg.framework
              QtGui.framework
              QtNetwork.framework
              QtQuick.framework
              QtTest.framework
              QtMultimedia.framework
              QtPrintSupport.framework
              QtQuickTest.framework
              QtWidgets.framework

              I think I also tried it on an application that did not use SVGs and it also had the same problem... So I am suspicious of something more fundamental.

              /Mark

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MarkBrooks
                wrote on last edited by
                #8

                Just a minute @SGaist, it could be I have some .dmgs made with the link and others with hard paths. I need to double check some things.....

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

                  Just to be sure, check the frameworks with otool also

                  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
                    MarkBrooks
                    wrote on last edited by
                    #10

                    Hi @SGaist,

                    The reason for being a little silent was that I was rechecking versions that had been tested on other Macs to get my assumptions checked again.

                    The version which was failing had hard links and the deployment was not right I think because I ran "macdeploy" from somewhere other than the build directory - I guess rather silly because now I remember in the instructions I found from someone they said to be in the build directory when doing it.....

                    Anyway, after I re-built it again standing in the build directory then all frameworks are relative links and also the frameworks themselves are also relative links and even better the the application works on the other machines.

                    So I think we are closed on this thread and at least I have learnt more. Thanks for your great pointers on trying to figure this out.....

                    /Mark

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

                      No problem, as long as you can solve your problem ;)

                      You're welcome !

                      Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                      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