Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32008

Failure with Xcode 7.2 with iphonesimulator Target SDK and Debug Build Configuration

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • clang-scanbuild-plugin
    • None
    • OS X El Capitan 10.11.2
      Xcode 7.2
      iOS SDK 9.2
      checker 277 (October 28, 2015)

      Since Xcode 7.2 upgrade including iOS SDK 9.2, Clang Scan-Build plugin can't perform task using the following parameters:

      • Target SDK: iphonesimulator
      • Build Configuration: Debug

      The iphonesimulator target SDK causes import errors like these:

      While building module 'UIKit' imported from /Users/jenkins/Home/jobs/eVA Mobile iOS Application/workspace/iOS-Application/Submodules/eVA Core iOS Library/Submodules/CGI Extensions iOS Library/Frameworks/CGIExtensions/CGIExtensions/Classes/CGIHelper.h:11:
      While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
      While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
      In file included from <module-includes>:1:
      /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
      #include <Foundation/Foundation.h>
       ~~~~~~~~^
      35 errors generated.
      Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
      

      The Debug build configuration causes CodeSign errors like these:

      Check dependencies
      [BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 9.2'
      

      The only work around found is to force these parameters instead:

      • Target SDK: iphoneos
      • Build Configuration: Release

      But using this, we loose assertions and have false positives warnings.

          [JENKINS-32008] Failure with Xcode 7.2 with iphonesimulator Target SDK and Debug Build Configuration

          Dima Vartanian added a comment - - edited

          Having this issue as well. Xcode 7.2. Using a Debug config and iphonesimulator SDK getting piles of these

          While building module 'Darwin' {{imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:
          In file included from <module-includes>:1:
          /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
          #error Unsupported architecture}}
          

          This is the project that runs my unit tests and is pretty important for that reason. Is there any ETA on a fix making it work with Xcode 7.1/iOS 9.2?

          Possibly related: https://forums.developer.apple.com/thread/27975

          Dima Vartanian added a comment - - edited Having this issue as well. Xcode 7.2. Using a Debug config and iphonesimulator SDK getting piles of these While building module 'Darwin' {{imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/ System /Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8: In file included from <module-includes>:1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture #error Unsupported architecture}} This is the project that runs my unit tests and is pretty important for that reason. Is there any ETA on a fix making it work with Xcode 7.1/iOS 9.2? Possibly related: https://forums.developer.apple.com/thread/27975

          Neil Davis added a comment - - edited

          Also having this issue. It seems for Xcode 7.2 we need to also supply the -destination argument for simulator builds on the command line using xcodebuild

          I can workaround this issue by adding the following to the 'Additional xcode build arguments' field under 'Advanced' options:

           -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest'
          

          Neil Davis added a comment - - edited Also having this issue. It seems for Xcode 7.2 we need to also supply the -destination argument for simulator builds on the command line using xcodebuild I can workaround this issue by adding the following to the 'Additional xcode build arguments' field under 'Advanced' options: -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest'

          Yes: adding the -destination Xcode parameter fix the problem.

          Would it be possible to manage this automatically in the plugin?

          Francis Labrie added a comment - Yes: adding the -destination Xcode parameter fix the problem. Would it be possible to manage this automatically in the plugin?

          Dima Vartanian added a comment - - edited

          Unfortunately this doesn't work for me if I am also running tests

          So test

          -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest'

          works but

          test -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest'

          does not

          Anyone find a way to work around this?

          Dima Vartanian added a comment - - edited Unfortunately this doesn't work for me if I am also running tests So test -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' works but test -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' does not Anyone find a way to work around this?

          Daniel Beck added a comment -

          Is this issue related to JENKINS-27854?

          Daniel Beck added a comment - Is this issue related to JENKINS-27854 ?

            jkennedy1980 Josh Kennedy
            flabrie Francis Labrie
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: