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

macdeployqt always fails when run on universal apps (both arm64 + x86_64 slices).

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.2
    • None
    • macOS

    Description

      macdeployqt always fails when run on universal apps (both arm64 + x86_64 slices).

       

      macdeployqt always fails when run on universal apps. This reproduces for all apps (even hello world apps). I have included below details on why this happens. I ran macdeployqt with --verbose=3 for my analysis.

      1.)  macdeployqt run install_name_tool to delete rpaths and add new rpaths. 'install_name_tool' gives error if the same path is passed twice to -delete_rpath.

      So if you run install_name_tool like this, it would give an error, which is what macdeployqt does.

      I have included below the log from macdeployqt. As you can see th path '/Users/mb12/Qt/6.4.2/macos/lib' is replicated twice.

      Log:  using QList("-delete_rpath", "/Users/mb12/Documents/macos_version/universal_app_porting/build/qt-macos-arm64/Release", "-delete_rpath", "/Users/mb12/Qt/6.4.2/macos/lib", "-delete_rpath", "/Users/mb12/Documents/macos_version/universal_app_porting/build/qt-macos-arm64/Release", "-delete_rpath", "/Users/mb12/Qt/6.4.2/macos/lib", "-add_rpath", "@executable_path/../Frameworks")

      2.) The path dupliccation happens because macdeployqt uses " otool -L " to determaine which paths to delete. On universal binaries, otool will show the same dependency twice, once for arm64 slice and once for x86_64 slice.

      The duplicate dependency rpath needs to be handled by macdeployqt.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            mb12 M B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes