facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.97k stars 2.02k forks source link

when t try build an iOS project with infer,i got these errors。please HELP me。 #355

Closed sunchongyang closed 8 years ago

sunchongyang commented 8 years ago

hile building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9: In file included from :2: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:32:10: fatal error: could not build module 'Darwin'

include

1 error generated.
7 errors generated.
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'CoreGraphics' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:8:
In file included from <module-includes>:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:8:10: fatal error: 
      could not build module 'Darwin'
#include <stdbool.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:11:
In file included from <module-includes>:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:10:10: fatal error: 
      could not build module 'Darwin'
#include <TargetConditionals.h>
 ~~~~~~~~^
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:11:
While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:
In file included from <module-includes>:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10: fatal error: 
      could not build module 'Darwin'
#include <TargetConditionals.h>
 ~~~~~~~~^
1 error generated.
2 errors generated.
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'CoreText' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSText.h:10:
In file included from <module-includes>:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h:12:10: fatal error: 
      could not build module 'Darwin'
#include <Availability.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: fatal error: 
      could not build module 'Darwin'
#include <stdbool.h>
 ~~~~~~~~^
While building module 'UIKit' imported from /Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.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.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
In file included from <module-includes>:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: 
      could not build module 'Foundation'
#include <Foundation/Foundation.h>
 ~~~~~~~~^
1 error generated.
2 errors generated.
16 errors generated.
In file included from <built-in>:364:
In file included from <command line>:5:
/Users/sunchongyang/iOSDev/mobile_ios/JuMei/Src/Tag/1.0.0/Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch:2:9: fatal error: 
      could not build module 'UIKit'
#import <UIKit/UIKit.h>
 ~~~~~~~^
17 errors generated.
Command /usr/local/Cellar/infer/0.7.0/libexec/infer/lib/python/inferlib/../../../lib/xcode_wrappers/clang++ failed with exit code 1
akotulski commented 8 years ago

This problem was fixed in infer 0.8.1. brew formula was updated yesterday and the problem should go away after upgrading. Running brew update && brew upgrade infer should do it.

If it doesn't fix your problem, feel free to reopen the issue