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

MACOS_BUNDLE_POST_BUILD generates a symlink to a non-existent dylib for static QML plugin, fails AppStore validation

    XMLWordPrintable

Details

    • macOS
    • 519a47e87 (dev)

    Description

      The attached project contains a top level executable ("appMyApp") and statically-linked QML module in a subdirectory ("MyLib"):

      qt_add_qml_module(MyLib STATIC ...)
      

       

      It also contains a deployment script:

      qt_generate_deploy_qml_app_script(
          TARGET appMyApp
          OUTPUT_SCRIPT deploy_script
          MACOS_BUNDLE_POST_BUILD
          NO_UNSUPPORTED_PLATFORM_ERROR
          DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
      )
      

       

      Outcomes
      Building the project produces a static library "libMyLibplugin.a" (expected) and a symlink to a shared library "libMyLibplugin.dylib" (not expected):

      [27/43 28.5/sec] Linking CXX static library MyLib/libMyLibplugin.a
      ...
      [42/43 21.7/sec] Linking CXX executable appMyApp.app/Contents/MacOS/appMyApp
      -- Running macOS bundle QML support POST_BUILD routine.
      ...
      -- Symlinking: /Users/USER/Projects/MyApp/build/Qt_6_7_0_for_macOS-Release/appMyApp.app/Contents/Resources/qml/MyLib/libMyLibplugin.dylib
      

      A customer reports that this rogue symlink now causes the AppStore validator to reject the app (it didn't use to be as strict before)

       

      Workaround
      Don't use qt_generate_deploy_qml_app_script(); run macdeployqt manually instead.

      Attachments

        For Gerrit Dashboard: QTBUG-124771
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are 2 open Gerrit changes