facebook / infer

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

Build failed with a Cocoapod containing Objective-C++ code #69

Closed allanrvj closed 9 years ago

allanrvj commented 9 years ago

Hi guys.

I was trying to make Infer work but I'm running into problems. You see, this command gives me BUILD SUCCEEDED:

xcodebuild -workspace Zymo.xcworkspace -scheme Zymo -configuration Debug -sdk iphonesimulator -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64"

but this one:

infer -- xcodebuild -workspace Zymo.xcworkspace -scheme Zymo -configuration Debug -sdk iphonesimulator -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64"

gives me BUILD FAILED with the message:

The following build commands failed:

CompileC /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-Realm.build/Objects-normal/i386/RLMAccessor.o Realm/Realm/RLMAccessor.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

CompileC /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-Realm.build/Objects-normal/i386/RLMArray.o Realm/Realm/RLMArray.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

CompileC /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-Realm.build/Objects-normal/i386/RLMArrayLinkView.o Realm/Realm/RLMArrayLinkView.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

(3 failures)

Do you guys have an idea on what I should change?

martinoluca commented 9 years ago

Hi @allanrvj, The message containing the error should be a bit above the one you've just provided. Could you please paste it so it can help troubleshooting? Thanks!

allanrvj commented 9 years ago

Ah. Here:

In file included from /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMArrayLinkView.mm:19: /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMArray_Private.hpp:22:9: fatal error: 'memory' file not found

import <memory>

    ^

1 error generated.

In file included from /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMArray.mm:19: /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMArray_Private.hpp:22:9: fatal error: 'memory' file not found

import <memory>

    ^

1 error generated.

In file included from /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMAccessor.mm:21: /Users/arj/Documents/Developer/3.1.3/ZymoIOS/src/Pods/Realm/Realm/RLMArray_Private.hpp:22:9: fatal error: 'memory' file not found

import <memory>

    ^

1 error generated.

I also posted this on the Realm google group but I'm not getting replies yet.

strivingboy commented 9 years ago

Same issues for me

below is the failed:

\ BUILD FAILED ** The following build commands failed: CompileC /Users/tusu/Library/Developer/Xcode/DerivedData/Uni-dafpegmafetpcvesyigopetiozsm/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-SSKeychain.build/Objects-normal/i386/SSKeychain.o SSKeychain/SSKeychain/SSKeychain.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/tusu/Library/Developer/Xcode/DerivedData/Uni-dafpegmafetpcvesyigopetiozsm/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-SSKeychain.build/Objects-normal/i386/SSKeychainQuery.o SSKeychain/SSKeychain/SSKeychainQuery.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (2 failures)

martinoluca commented 9 years ago

@allanrvj, if you run the build command you provided without infer -- does it work fine? Furthermore, which version of Xcode/clang do you have? Please run

xcodebuild -version && `xcrun --find clang` --version

@strivingboy the error you posted is incomplete, and may be different from the one posted by @allanrvj. The message containing the error should be a bit above the one you've just provided. Could you please paste it so it can help troubleshooting? Thanks!

allanrvj commented 9 years ago

@martinoluca here it is:

Xcode 6.3.2 Build version 6D2105 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix

The build works fine without infer --. Someone from Realm told me that Infer doesn't support C++ and Obj-C++ yet, so that might be the case, since Infer recompiles the workspace again and couldn't recompile Realm code? If so, is there an option to not compile the Pods project? I don't know if that's feasible.

vhbit commented 9 years ago

@martinoluca here is one of the errors I get:

capnproto/c++/src/kj/common.h:54:8: warning: "Your compiler supports C++11 but your C++
      standard library does not. If your "               "system has libc++ installed (as should be the case on e.g. Mac OSX), try adding
      "               "-stdlib=libc++ to your CXXFLAGS." [-W#warnings]
      #warning "Your compiler supports C++11 but your C++ standard library does not.  If your "\
       ^
capnproto/c++/src/kj/common.h:78:10: fatal error: 'initializer_list' file not found
#include <initializer_list>
         ^
1 warning and 1 error generated.

The same build command without infer -- works fine

martinoluca commented 9 years ago

@allanrvj lack of support for some parts of the language is meant in terms of the analysis, the compilation process should normally work. Do you have a way I can try to reproduce this issue?

@vhbit what is your command to run infer? Do you think that https://github.com/numenta/nupic/issues/2096 may be related?

allanrvj commented 9 years ago

@martinoluca here's a test workspace where you could reproduce the issue:

https://www.dropbox.com/s/dxmbi1k3ykc4ejr/Testing%202.zip?dl=0

This is the command I executed to recreate the failing build:

infer -- xcodebuild -workspace Testing.xcworkspace -scheme Testing -configuration Debug -sdk iphonesimulator -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" SYMROOT=$(PWD)/build

jimmyleaf commented 9 years ago

I have same error when add "infer --" fatal error: 'iostream' file not found

include

The following build commands failed: CompileC StepDetector.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler

martinoluca commented 9 years ago

@allanrvj @vhbit I reproduced the issue, thanks for reporting it! We are working on it.

strivingboy commented 9 years ago

@martinoluca when I use infer --incremental -- xcodebuild -workspace Uni.xcworkspace -scheme 'Uni' -configuration Debug -sdk iphonesimulator I get the error last comment, but when I run xcodebuild -workspace Uni.xcworkspace -scheme 'Uni' -configuration Debug -sdk iphonesimulator build success

martinoluca commented 9 years ago

@strivingboy I reproduced the issue, now the cause of the problem is known and we are working on it. Thanks for your report.

allanrvj commented 9 years ago

@martinoluca saw that you committed a fix. Can we get the latest version now and test it? I'm just excited to see how Infer works. Hehe :)

vhbit commented 9 years ago

@allanrvj here is the guide, I can confirm that my issue is fixed. But so far infer found errors only in pods I use :smile:

martinoluca commented 9 years ago

@allanrvj this issue has been addressed, please consider using the latest release available in: https://github.com/facebook/infer/releases/latest

Reopen this task if the problem still persists.

wanyukang commented 9 years ago

@martinoluca I have the latest version of infer (Infer version git-37a4709a0f2be7b23a29950a2d6345040b67b8eb), and still occurred the same issue. Should I install the older version like release-0.2.0 instead git-37a4709?

My Xcode and clang version is [Xcode 6.1, Build version 6A1052d, Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), Target: x86_64-apple-darwin13.3.0, Thread model: posix]. and log : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/usr/include/dispatch/queue.h:368:1: error: import of C++ module 'Darwin.sys.qos' appears within extern "C" language linkage specification

include <sys/qos.h>

^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/usr/include/dispatch/queue.h:69:1: note: extern "C" language linkage specification begins here __BEGIN_DECLS ^ In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/usr/include/dispatch/dispatch.h:25: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/usr/include/sys/cdefs.h:71:23: note: expanded from macro '__BEGIN_DECLS'

define __BEGIN_DECLS extern "C" {

                    ^

1 error generated. While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14: While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In file included from :1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15:10: fatal error: could not build module 'Dispatch'

include <dispatch/dispatch.h>

2 errors generated.
While building 2 errors generated.module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
While building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:25:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:38:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CFData.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
While building module 'CFNetwork' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:10:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
1 error generated.
5 errors generated.
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:9: fatal error:
      could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'CoreGraphics' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:11:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:9:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CFDictionary.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:10:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8:9: fatal error:
      could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:10:
While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVReturn.h:21:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h:51:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
 ~~~~~~~~^
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:10:
While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:8:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVOpenGLESTexture.h:23:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.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.
3 errors generated.
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'CoreText' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSText.h:9:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h:21:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h:13:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CFNumber.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:16:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
1 error generated.
12 errors generated.
In file included from <built-in>:355:
In file included from <command line>:3:
/Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Supporting Files/iWeidao-Prefix.pch:14:13: fatal error: could not build module 'UIKit'
    #import <UIKit/UIKit.h>
     ~~~~~~~^
While building module 'CoreLocation' imported from /Users/wanyukang/git/iostest/ios-yidao-user/iWeidao/Category/CLLocation+YCLocation.h:33:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h:18:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h:10:9: fatal error:
      could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
1 error generated.
While building module 'MapKit' imported from /Users/wanyukang/git/iostest/ios-yidao-user/Pods/Headers/Public/ReactiveCocoa/MKAnnotationView+RACSignalSupport.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKFoundation.h:8:9: fatal error:
      could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
1 error generated.
While building module 'SystemConfiguration' imported from /Users/wanyukang/git/iostest/ios-yidao-user/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h:23:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h:29:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
1 error generated.
While building module 'MobileCoreServices' imported from /Users/wanyukang/git/iostest/ios-yidao-user/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h:27:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/MobileCoreServices.framework/Headers/MobileCoreServices.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/MobileCoreServices.framework/Headers/UTCoreTypes.h:19:10: fatal error:
      could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
1 error generated.
17 errors generated.
Command /Users/wanyukang/git/infer/infer/bin/../lib/capture/clang++ failed with exit code 1
maulik15 commented 8 years ago

i get above same error how to solve this.