infer icon indicating copy to clipboard operation
infer copied to clipboard

build failed with ios app

Open zhangying19871987 opened this issue 10 years ago • 3 comments

I use the command infer --incremental -- xcodebuild -workspace QQNews.xcworkspace -scheme QQNews -configuration Debug -sdk iphonesimulator CLANG_ENABLE_MODULES=NO build failed: /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:15:1: error: use of '@import' when modules are disabled @import UIKit; ^ /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:64:55: error: use of undeclared identifier 'UIApplicationWillTerminateNotification' name:UIApplicationWillTerminateNotification ^ /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:73:68: error: use of undeclared identifier 'UIApplicationWillTerminateNotification' [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillTerminateNotification object:nil]; ^ 3 errors generated.

I use infer --version got the version of infer is 0.8.0

zhangying19871987 avatar Mar 28 '16 03:03 zhangying19871987

if I use the command infer --incremental -- xcodebuild -workspace QQNews.xcworkspace -scheme QQNews -configuration Debug -sdk iphonesimulator CLANG_ENABLE_MODULES=YES build failed message like that: While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer /SDKs/iPhoneSimulator9.1.sdk/usr/include/CommonCrypto/CommonCryptoError.h:35: While building module 'std' imported from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c ++/v1/math.h:309: In file included from :1: In file included from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c++/v1/algorithm:624: In file included from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c++/v1/initializer_li st:47: In file included from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c++/v1/cstddef:43: /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c++/v1/stddef.h:46:15: fatal error: cyclic dependency in module 'Darwin': Darwin -> std -> Darwin #include_next <stddef.h> ^ 1 error generated. While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer /SDKs/iPhoneSimulator9.1.sdk/usr/include/CommonCrypto/CommonCryptoError.h:35: In file included from :86: In file included from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../lib/clang/3.8.0/include/tgmat h.h:29: /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c++/v1/math.h:309:10: fatal error: could no t build module 'std' #include <type_traits>

2 errors generated.

zhangying19871987 avatar Mar 28 '16 03:03 zhangying19871987

You can try to selectively disable modules for your projects: https://github.com/facebook/infer/issues/232#issuecomment-173378896

jvillard avatar Apr 04 '16 11:04 jvillard

we're tracking this error in #335

jvillard avatar Apr 19 '16 13:04 jvillard