Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Error trying to deploy a Qt application

    3rd Party Software
    3
    9
    1865
    Loading More Posts
    • 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.
    • K
      KelvinSP last edited by

      Hello, I'm trying to deploy a Qt application using the command:

      macdeployqt MyApp.app -dmg
      

      but I'm getting the following error message:

      ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt"
      

      I copied manually the folder from /usr/local/qwt-6.1.0/lib/qwt.framework to the Libary/Frameworks folder, based on this answer.

      I'm new on OS X and Qt, and I am very confused about what is happening.

      Thanks

      1 Reply Last reply Reply Quote 0
      • hskoglund
        hskoglund last edited by

        Hi, try the verbose switch, maybe that will give more information:
        macdeployqt MyApp.app -dmg -verbose=3

        1 Reply Last reply Reply Quote 0
        • K
          KelvinSP last edited by

          Thanks for the help.

          Ok, I tried the verbose switch and this generated a huge log that can be seen here: https://www.dropbox.com/s/yipy3v7pidf575k/log.txt?dl=0

          I don't quite understand this log, but I saw that the error message is still displayed (line126).

          I think the macdeployqt command is not finding the Qwt framework, and because of this the application breaks to start, but I'm not sure if this is the problem.

          1 Reply Last reply Reply Quote 0
          • hskoglund
            hskoglund last edited by

            Looking at the log, all the Install name ".. file names are identical to to the filenames in Source file Path 2 lines below, except for that qwt library.

            To fix so that it looks the same as the others, and make macdeployqt happy, you need to run install_name_tool on it, try:
            install_name_tool -change qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt

            The idea is to fixup qwt's reference to itself, hope this helps :-)

            1 Reply Last reply Reply Quote 0
            • K
              KelvinSP last edited by KelvinSP

              I ran the command: install_name_tool -change qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt

              and receive the following error message:error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Library/Frameworks/qwt.framework/Versions/6/qwt (No such file or directory)

              I'm trying to figure out what is happening.

              Thanks

              1 Reply Last reply Reply Quote 0
              • hskoglund
                hskoglund last edited by

                Ok nice try :-) At least that error message agrees with what macdeployqt complains about.
                It's tricky with OSX's habit of specifying not just the names of the DLLs but also the paths to them.

                Suggestion: start with using the otool -L command on your app's .EXE file, there you'll see the .DLLs/dylibs/frameworks it wants.

                Then use that otool -L command again on each of those DLLs/dylib/frameworks your app's .EXE wants and check that the 1st line of the output for each one shows the same path as the file itself. (That was the problem with the Qwt library in your log.)

                K 1 Reply Last reply Reply Quote 1
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Hi and welcome to devnet,

                  Where is your Qwt framework exactly located ?

                  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 Reply Quote 0
                  • K
                    KelvinSP @hskoglund last edited by KelvinSP

                    Thank you @hskoglund, I will try to use the otool -L command (I never used it before).

                    As I said, I'm new on OS X. I started to use the OS X two weeks ago and I don't know the tricks yet (I was a Windows user :-( ).

                    Thanks for the welcome @SGaist.

                    I have the Qwt located at: /usr/local/qwt-6.1.0/
                    And I copied manually the entire qwt.framework folder from /usr/local/qwt-6.1.0/lib/ to Library/Frameworks/

                    1 Reply Last reply Reply Quote 0
                    • K
                      KelvinSP last edited by

                      I finally found the solution. I had copied the qwt.framework folder to the wrong directory.

                      I had copied the qwt.framework folder to the /Users/kelvinsp/Library/Frameworks/ directory and I should have copied to the /System/Library/Frameworks/.

                      I just copied the qwt.framework folder to the correct directory ( /System/Library/Frameworks/) and everything ran like a charm.

                      Thanks a lot for your help and sorry for waste your time.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post