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. Deployment of Qt App on Mac - dmg file does not run on a different machine
QtWS25 Last Chance

Deployment of Qt App on Mac - dmg file does not run on a different machine

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 4 Posters 2.9k Views
  • 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.
  • C Offline
    C Offline
    Clovea
    wrote on last edited by
    #1

    Hi All,

    I am very new to Qt/QML. I have installed Qt 5.3.1 on my mac and wanted to package my application. Following the instructions given "here":http://qt-project.org/doc/qt-4.8/deployment-mac.html#the-mac-deployment-tool, I successfully created a disk image file (.dmg) with my application. I can open/install and run it on my machine and everything works fine. When we try to run the same file on a different machine and we are getting the following error.


    Process: freefalltower [1430]
    Path: /Volumes/VOLUME/freefalltower.app/Contents/MacOS/freefalltower
    Identifier: com.yourcompany.freefalltower
    Version: ???
    Code Type: X86-64 (Native)
    Parent Process: ??? [1]
    Responsible: freefalltower [1430]
    User ID: 502

    Date/Time: 2014-10-21 15:09:45.181 +0530
    OS Version: Mac OS X 10.10 (14A389)
    Report Version: 11
    Anonymous UUID: 31D92D41-30AE-30B2-3D04-18AA68F17C98

    Time Awake Since Boot: 650 seconds

    Crashed Thread: 0

    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000

    Application Specific Information:
    dyld: launch, loading dependent libraries

    Dyld Error Message:
    Library not loaded: /Users/clmkimpo/Qt5.3.1/5.3/clang_64/lib/QtQuick.framework/Versions/5/QtQuick
    Referenced from: /Volumes/VOLUME/freefalltower.app/Contents/MacOS/freefalltower
    Reason: image not found

    Binary Images:
    0x7fff6c8e3000 - 0x7fff6c919837 dyld (353.2.1) <4696A982-1500-34EC-9777-1EF7A03E2659> /usr/lib/dyld

    Model: MacBookAir6,2, BootROM MBA61.0099.B16, 2 processors, Intel Core i7, 1.7 GHz, 8 GB, SMC 2.13f15
    Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In
    Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, -
    Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, -
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.15.124.12.8)
    Bluetooth: Version 4.3.0f10 14890, 3 services, 19 devices, 1 incoming serial ports
    Network Service: Wi-Fi, AirPort, en0
    Serial ATA Device: APPLE SSD SM0256F, 251 GB
    USB Device: Internal Memory Card Reader
    USB Device: BRCM20702 Hub
    USB Device: Bluetooth USB Host Controller
    Thunderbolt Bus: MacBook Air, Apple Inc., 23.6


    I have used "macdeployqt" and "otool -L" commands but it still does not solve my problem.

    Can someone help me sort out this problem?

    Thank you,

    Clovea.

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, when you run "macdeployqt" did you specify the -qmldir switch? "Example here":http://stackoverflow.com/a/20903329/233402

      Also, could you post a "otool -L" on your freefalltower.app/Contents/MacOS/freefalltower app?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Clovea
        wrote on last edited by
        #3

        Hi,

        I have tried to add the qmldir flag in my "macdeployqt" command, it still does not work. Here is the output of my otool -L


        @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.0, current version 5.3.1)
        @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.0, current version 5.3.1)
        @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.0, current version 5.3.1)
        @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
        @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.0, current version 5.3.1)
        @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.0, current version 5.3.1)
        /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)


        Thank you,

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Hmm the otool -L looks good, could you also open your .dmg file and do a "otool -L" on your app inside it, i.e. do a "cd /Volumes/VOLUME/..." etc.?

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Clovea
            wrote on last edited by
            #5

            The output of the otool -L command is this:


            @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.0, current version 5.3.1)
            @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.0, current version 5.3.1)
            @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.0, current version 5.3.1)
            @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
            @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.0, current version 5.3.1)
            @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.0, current version 5.3.1)
            /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)


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

              Hi,

              Are you using any custom library ?

              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
              • hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by
                #7

                Yes, also you could try with making an empty Widgets app, do macdeployqt and make a .dmg of the Widgets app, and see if that .dmg unpacks and runs ok on your other machine.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  shaan7
                  wrote on last edited by
                  #8

                  The following works for me for a simple Qt app-

                  go to build dir of your APPNAME, which is called build-APPNAME-Desktop_Qt_5_3_clang_64bit-Debug

                  ~/Qt/5.3/clang_64/bin/macdeployqt APPNAME.app -dmg -qmldir=/Users/USERNAME/Qt/5.3/clang_64/qml -verbose=3

                  this generated a APPNAME.dmg file which I was able to use on another MacBook.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    Clovea
                    wrote on last edited by
                    #9

                    Thank you Shantanu, your solution does work for me as well.

                    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