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. Error deploying Qt application on OS X
Forum Updated to NodeBB v4.3 + New Features

Error deploying Qt application on OS X

Scheduled Pinned Locked Moved Solved General and Desktop
20 Posts 3 Posters 6.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
    #11

    man insall_name_tool explains all options.

    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
    1
    • P Offline
      P Offline
      patrik08
      wrote on last edited by
      #12

      Here config target from qwt ...
      You can also chance the qmake from qwt and build a static lib..

      unix {
          QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION
          # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
      }
      /usr/local/qwt-6.1.3
      

      or adapt th script from https://raw.githubusercontent.com/pehohlva/xhtml_edit_qedit_base/master/mac_bundle/grep.sh

      1 Reply Last reply
      1
      • P Offline
        P Offline
        patrik08
        wrote on last edited by
        #13

        Also my best simply solution is:

        /// on qwt macdeployqt say:
        macdeployqt radio.app
        ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
        

        Also i tested:

        console:
        sudo mkdir -p /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/
        
        after you make a symply bridge as virtual link.
        
        ln -s /usr/local/qwt-6.1.3/lib/qwt.framework/Versions/Current/qwt \
                           /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt
        

        at end :
        macdeployqt radio.app
        make a super job and link & copy all in the bundle :-)
        by by ...

        K 1 Reply Last reply
        1
        • P patrik08

          Also my best simply solution is:

          /// on qwt macdeployqt say:
          macdeployqt radio.app
          ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
          

          Also i tested:

          console:
          sudo mkdir -p /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/
          
          after you make a symply bridge as virtual link.
          
          ln -s /usr/local/qwt-6.1.3/lib/qwt.framework/Versions/Current/qwt \
                             /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt
          

          at end :
          macdeployqt radio.app
          make a super job and link & copy all in the bundle :-)
          by by ...

          K Offline
          K Offline
          KelvinSP
          wrote on last edited by KelvinSP
          #14

          @patrik08 I have tried it and it worked (at least the message it's gone). As I understand it doesn't fix the problem directly but it's a great workaround.

          The only problem is that now I'm getting the following errors when trying to run macdeployqt MyApplication.app -dmg:

          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtSvg.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtGui.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtPrintSupport.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtSql.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtOpenGL.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist"): device not open
          ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtConcurrent.framework/Contents/Info.plist"
          ERROR:  to "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist"
          QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist"): device not open
          QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist"): device not open
          
          1 Reply Last reply
          0
          • P Offline
            P Offline
            patrik08
            wrote on last edited by
            #15

            The app run without -dmg?
            can you open app & work it?
            I like to look this app like this...
            https://www.youtube.com/watch?v=hJDvKud8RWs
            search Mac Screen Recorder ...

            K 1 Reply Last reply
            0
            • P patrik08

              The app run without -dmg?
              can you open app & work it?
              I like to look this app like this...
              https://www.youtube.com/watch?v=hJDvKud8RWs
              search Mac Screen Recorder ...

              K Offline
              K Offline
              KelvinSP
              wrote on last edited by KelvinSP
              #16

              @patrik08 the application runs directly from the Qt and when I double click on it, but only before running the macdeployqt command.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                patrik08
                wrote on last edited by patrik08
                #17

                @KelvinSP said in Error deploying Qt application on OS X:

                macdeployqt

                The job from macdeployqt is only take all file and relink lib or framework .. if file an all exist its not give problem..
                to build a dir/bundle & at end hdiutil create a bzip2 compressed dmg image like a iso file...

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

                  Did you re-run macdeployqt several times on the same app bundle ? If so, you'll get a message telling you that it already has run.

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

                  K 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Did you re-run macdeployqt several times on the same app bundle ? If so, you'll get a message telling you that it already has run.

                    K Offline
                    K Offline
                    KelvinSP
                    wrote on last edited by KelvinSP
                    #19

                    @SGaist Yes, I did. I received the following message:

                    WARNING: Could not find any external Qt frameworks to deploy in "MyApplication.app"
                    WARNING: Perhaps macdeployqt was already used on "MyApplication.app" ?
                    WARNING: If so, you will need to rebuild "MyApplication.app" before trying again.
                    

                    The DMG file was created but the application still not working (when double clicking).

                    Note: every time I test a new macdelpoyqt command, I rebuild the project first.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      KelvinSP
                      wrote on last edited by KelvinSP
                      #20

                      I have uninstalled other qt versions using brew list, brew remove qt and brew remove qt5. I also noted that I had pyqt installed (and I was not using it), so I also remove it using brew remove pyqt.

                      Then, I have reinstalled Qt 5.3.2 and had other issues:

                      Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.

                      Which was solved changing the isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))) command from the Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf file to isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))), as explained here: https://stackoverflow.com/questions/33728905/qt-creator-project-error-xcode-not-set-up-properly-you-may-need-to-confirm-t

                      and

                      Could not resolve SDK path for 'macosx10.8'

                      That was solved by changing the QtPath/5.3/clang_64/mkspecs/qdevice.pri from !host_build:QMAKE_MAC_SDK = macosx10.8 to !host_build:QMAKE_MAC_SDK = macosx10.12, as explained here: https://stackoverflow.com/questions/26320677/error-could-not-resolve-sdk-path-for-macosx10-8

                      So, I run the command from my Qt directory:

                      /Users/kuser/Qt5.3.2/5.3/clang_64/bin/macdeployqt MyApplication.app -dmg
                      

                      and it worked.

                      I found these solutions in comments from the following question:

                      https://stackoverflow.com/questions/19988129/qt5-cannot-find-platform-plugins-mac-os-x

                      Thanks a lot @SGaist and @patrik08 for all the help.

                      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