Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2056

build-wrapper causes failure of Xcode 10 DataModelCompile on macOS Mojave

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 6.1
    • Component/s: build-wrapper
    • Labels:
      None

      Description

      To reproduce: new Xcode project -> Single View App -> New File -> Data Model

      With Xcode 10 on macOS Mojave

      $ sw_vers
      ProductName:	Mac OS X
      ProductVersion:	10.14.1
      BuildVersion:	18B75
      
      $ csrutil status
      System Integrity Protection status: enabled.
      
      $ xcodebuild -version
      Xcode 10.1
      Build version 10B61
      
      $ build-wrapper-macosx-x86 --out-dir bw xcodebuild clean build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
      ...
      DataModelCompile /tmp/example/build/Release-iphoneos/example.app/ /tmp/example/Model.xcdatamodeld (in target: example)
          cd /tmp/example
          /Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk --iphoneos-deployment-target 12.1 --module example /tmp/example/Model.xcdatamodeld /tmp/example/build/Release-iphoneos/example.app/
      dyld: could not load inserted library '/Users/evgeny.mandrikov/Downloads/build-wrapper-macosx-x86/libinterceptor.dylib' because no suitable image found.  Did find:
      	/Users/evgeny.mandrikov/Downloads/build-wrapper-macosx-x86/libinterceptor.dylib: mach-o, but not built for iOS simulator
      
      cdtool invalid hashes: 
      /tmp/example/Model.xcdatamodeld/Model.xcdatamodel:: error: cdtool cannot compile [0]
      ...
      ** BUILD FAILED **
      
      The following build commands failed:
      	DataModelCompile /tmp/example/build/Release-iphoneos/example.app/ /tmp/example/Model.xcdatamodeld
      (1 failure)
      

      same actions will succeed with XCode 9 on macOS Mojave

      and with XCode 10 will succeed on macOS High Sierra

      $ sw_vers
      ProductName:	Mac OS X
      ProductVersion:	10.13.6
      BuildVersion:	17G3025
      
      $ csrutil status
      System Integrity Protection status: enabled.
      
      $ xcodebuild -version
      Xcode 10.1
      Build version 10B61
      
      $ build-wrapper-macosx-x86 --out-dir bw xcodebuild clean build CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
      ...
      DataModelCompile /tmp/example/build/Release-iphoneos/example.app/ /tmp/example/Model.xcdatamodeld (in target: example)
          cd /tmp/example
          /Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk --iphoneos-deployment-target 12.1 --module example /tmp/example/Model.xcdatamodeld /tmp/example/build/Release-iphoneos/example.app/
      dyld: warning: could not load inserted library '/Users/evgeny.mandrikov/Downloads/build-wrapper-5.1-macosx-x86/libinterceptor.dylib' into hardened process because no suitable image found.  Did find:
      	/Users/evgeny.mandrikov/Downloads/build-wrapper-5.1-macosx-x86/libinterceptor.dylib: mach-o, but not built for iOS simulator
      ...
      ** BUILD SUCCEEDED **
      

      Note that disablement of System Integrity Protection doesn't help.

      Workaround

      use XCode 10 on macOS High Sierra
      or use XCode 9 on macOS Mojave

        Attachments

          Activity

            People

            • Assignee:
              massimo.paladin Massimo PALADIN
              Reporter:
              evgeny.mandrikov Evgeny Mandrikov
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: