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

Error when using macdeployqt: install_name_tool -delete_rpath "~/Qt/6.3.1/macos/lib" specified more than once



    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.3.0
    • None
    • macOS


      Since Qt 6.3, I've noticed an issue when I use `macdeployqt` to deploy a Universal app on a M1 Mac (iirc, it worked with Qt 6.2 on this M1 Mac).

      The deployment always fail with an error from `install_name_tool`, with message like this:

      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: \"-delete_rpath /Users/{USER_NAME}/Qt/6.3.1/macos/lib\" specified more than once\nUsage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input\n"
      ERROR: ""

      After the error, `macdeployqt` will keep running, but the deployed app bundle will contain unusual data (didn't figure out exactly what extra data was included, but the size of the bundle was definitely larger than normal).

      Eventually, the codesign will fail with error:

      ERROR: Codesign signing error:
      ERROR: "MyApp.app: replacing existing signature\nMyApp.app/Contents/MacOS/MyApp: code object is not signed at all\nIn subcomponent: MyApp.app/Contents/Frameworks/QtQuickControls2.framework\n"
      ERROR: codesign verification error:
      ERROR: "MyApp.app: code object is not signed at all\n"

      I suspect this is caused by somewhere inside `macdeployqt` where it was calling `install_name_tool`, and perhaps the arguments passed to the tool were with an incorrect format.


      • macOS 12.4
      • Xcode 13.4.1
      • Qt 6.3.1

      Oddly, I also have an Intel Mac with very similar environment, but `macdeployqt` works on this Intel Mac:

      • macOS 12.3
      • Xcode 13.4.1
      • Qt 6.3.1


        Issue Links

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



              vestbo Tor Arne Vestbø
              eyeplum Yan Li
              1 Vote for this issue
              3 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes