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

Qt with Xcode 11.4 no longer creates valid dylibs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.8, 5.15.0 Beta3
    • 5.12.7
    • Build tools: qmake
    • None
    • MacOS 10.15.4, Xcode 11.4
    • macOS
    • 6a60192ac03d0b4ab542191065122243cebcd1ca (qt/qtbase/5.12.8) 6387138a7991b4588639dc48847f175b5afaff84 (qt/qtbase/5.14)

    Description

      Xcode recently updated to 11.4, and now the dylibs that are produced from qmake are missing the LC_VERSION_MIN_MACOSX SDK version:

      matt@host build-TestLibrary-Desktop_Qt_5_12_7_clang_64bit-Release % otool -l libTestLibrary.dylib| grep LC_VERSION_MIN_MACOSX -A 3

      cmd LC_VERSION_MIN_MACOSX
      cmdsize 16
      version 10.12
      sdk n/a

       

      sdk should not be "n/a", but rather the version of the SDK the library was compiled against. If it's missing, hardened runtime library validation will fail and apps that depend on the library can't be run. A workaround is to add 

      QMAKE_LFLAGS += -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk 

      to the .pro file which then produces a correct binary:

      cmd LC_VERSION_MIN_MACOSX
      cmdsize 16
      version 10.12
      sdk 10.15.4

      and library validation then works as expected. 

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              mattb Matt Barringer
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes