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

Unsupported linker script to make objective-c classnames unique is broken since Xcode14

    XMLWordPrintable

Details

    • macOS
    • 640471418 (dev), 5165a8bac (6.9), 66985b333 (6.8)

    Description

      https://github.com/qt/qtbase/blob/6.8/mkspecs/features/data/mac/objc_namespace.sh

      With increasing Xcode versions the functionality incrementally broke:

      1. Xcode 14: Relinking considered as tampering with code signing (currently need to redundantly code sign)
      2. Xcode 15+: Patched class names are not found anymore (no solution found so far)

      To have this script working is a substantial requirement to get shared libraries which have been statically linked with Qt to work under macOS, otherwise symbols will conflict and cause hard to analyze corruptions and crashes.

      EDIT: The script is still required to fix the huge load of warning which occur if the same Qt static library is used in several products at the same time, within the same process.

       

      Re.2 - this is a small quote from parts of the build logs:

      (while injecting, still fine at this point)

      [2024-12-16T10:33:30.983Z] 🤖 Processing architecture 'x86_64' at offset 4096... 
      [2024-12-16T10:33:30.983Z] ℹī¸ Class names have not been namespaced, adding suffix 'C3F3C31A_1A12_5883_A4C4_28FE1B1E774A'... 
      [2024-12-16T10:33:30.983Z] 💉 Injecting __objc_classname entry 'QIndeterminateProgressIndicator_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' for 'QIndeterminateProgressIndicator_NI_6_7_1_R1' 
      [2024-12-16T10:33:30.983Z] 💉 Injecting __objc_classname entry 'QVerticalSplitView_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' for 'QVerticalSplitView_NI_6_7_1_R1' 
      [2024-12-16T10:33:30.983Z] 💉 Injecting __objc_classname entry 'QDarkNSBox_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' for 'QDarkNSBox_NI_6_7_1_R1' 
      [2024-12-16T10:33:30.983Z] 💉 Injecting __objc_classname entry 'QIndeterminateProgressIndicator_QQC2_NAMESPACE_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' for 'QIndeterminateProgressIndicator_QQC2_NAMESPACE_NI_6_7_1_R1'

       

      (after injecting)

      [2024-12-16T10:33:30.986Z] 🤖 Processing architecture 'x86_64' at offset 4096... 
      [2024-12-16T10:33:30.986Z] ℹī¸ Found namespaced class names, updating class entries... 
      [2024-12-16T10:33:30.986Z] đŸ’Ĩ Failed to resolve class name address for class 'QIndeterminateProgressIndicator_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' 
      [2024-12-16T10:33:30.986Z] đŸ’Ĩ Failed to resolve class name address for class 'QIndeterminateProgressIndicator_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' 
      [2024-12-16T10:33:30.986Z] đŸ’Ĩ Failed to resolve class name address for class 'QVerticalSplitView_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A' 
      [2024-12-16T10:33:30.986Z] đŸ’Ĩ Failed to resolve class name address for class 'QVerticalSplitView_NI_6_7_1_R1_C3F3C31A_1A12_5883_A4C4_28FE1B1E774A'

       

      Attachments

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

        Activity

          People

            alexandru.croitor Alexandru Croitor
            stefan.wastl Stefan Wastl
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes