Comments (10)
same error
from infer.
I assume it's caused by some third part libraries? I use Cocoapods in most of my projects, some run ok some fail when using Infer, but all of them run build fine will xcodebuild tool directly in command line, which makes me thinking it might be a bug in Infer
from infer.
Please try cleaning your builds first with a command like this:
xcodebuild -workspace <your_workspace> -scheme <your_scheme> -configuration Debug -sdk iphonesimulator clean
from infer.
I clean every time before build
from infer.
The detailed error message should be few lines above the one you reported. Could you please paste it if possible?
from infer.
In file included from /Users/markddaa/Temp/training_ios/Training/NATViewController.m:27:
/Users/markddaa/Temp/training_ios/Training/NATViewController.h:27:1: error: use
of '@import' when modules are disabled
@import CoreLocation;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.h:28:1: error: use
of '@import' when modules are disabled
@import CoreBluetooth;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.h:30:50: error:
cannot find protocol declaration for 'CLLocationManagerDelegate'; did you
mean 'NSLayoutManagerDelegate'?
...NATViewController : UIViewController <CLLocationManagerDelegate, CBPerip...
^~~~~~~~~~~~~~~~~~~~~~~~~
NSLayoutManagerDelegate
In file included from /Users/markddaa/Temp/training_ios/Training/NATViewController.m:1:
In file included from /Users/markddaa/Temp/training_ios/Training/Training-Prefix.pch:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:130:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutManager.h:277:11: note:
'NSLayoutManagerDelegate' declared here
@protocol NSLayoutManagerDelegate
^
In file included from /Users/markddaa/Temp/training_ios/Training/NATViewController.m:27:
/Users/markddaa/Temp/training_ios/Training/NATViewController.h:30:77: error:
cannot find protocol declaration for 'CBPeripheralManagerDelegate'
...NATViewController : UIViewController <CLLocationManagerDelegate, CBPerip...
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:62:31: error:
unknown type name 'CLLocationManager'
@Property (nonatomic, strong) CLLocationManager *locationManager;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:62:1: error:
property with 'retain (or strong)' attribute must be of object type
@Property (nonatomic, strong) CLLocationManager *locationManager;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:63:31: error:
unknown type name 'CLBeaconRegion'
@Property (nonatomic, strong) CLBeaconRegion *beaconRegion;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:63:1: error:
property with 'retain (or strong)' attribute must be of object type
@Property (nonatomic, strong) CLBeaconRegion *beaconRegion;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:64:31: error:
unknown type name 'CBPeripheralManager'
@Property (nonatomic, strong) CBPeripheralManager *peripheralManager;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:64:1: error:
property with 'retain (or strong)' attribute must be of object type
@Property (nonatomic, strong) CBPeripheralManager *peripheralManager;
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:176:39: error:
expected a type
- (NSString *)detailsStringForBeacon:(CLBeacon *)beacon
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:439:26: error:
expected a type - (void)locationManager:(CLLocationManager )manager didChangeAuthorizat...
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:439:84: error:
expected a type
...)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:486:26: error:
expected a type - (void)locationManager:(CLLocationManager *)manager
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:488:26: error:
expected a type
inRegion:(CLBeaconRegion *)region {
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:522:26: error:
expected a type - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLR...
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:529:26: error:
expected a type - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRe...
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:534:26: error:
expected a type - (void)locationManager:(CLLocationManager )manager didDetermineState:(...
^
/Users/markddaa/Temp/training_ios/Training/NATViewController.m:534:73: error:
expected a type
...)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)r...
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
from infer.
looks like it caused by beacon functions somehow, I use CoreLocation and CoreBluetooth inside my project.
from infer.
Thank you @markddaa for reporting the entire error message, the cause of your issue is this:
error: use of '@import' when modules are disabled
It is a known issue and there's a task open for that here #2
from infer.
what I use:
infer -- xcodebuild -workspace ~/Downloads/workspace/iOSWorkspace/BaiduBoxApp.xcworkspace -scheme BaiduBoxApp -configuration Debug -sdk iphonesimulator
what I got:
In file included from /Users/liguang/Documents/infer/facebook-clang-plugins/clang/bin/../include/c++/v1/cstddef:43:
/Users/liguang/Documents/infer/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 /Users/liguang/Downloads/workspace/iOSWorkspace/BaiduBoxApp/BoxCore/BoxCore-Prefix.pch:5:
In file included from :86:
In file included from /Users/liguang/Documents/infer/facebook-clang-plugins/clang/bin/../lib/clang/3.8.0/include/tgmath.h:29:
/Users/liguang/Documents/infer/facebook-clang-plugins/clang/bin/../include/c++/v1/math.h:309:10: fatal error:
could not build module 'std'
#include <type_traits>
2 errors generated.
In file included from <built-in>:363:
In file included from <command line>:21:
/Users/liguang/Downloads/workspace/iOSWorkspace/BaiduBoxApp/BoxCore/BoxCore-Prefix.pch:5:9: fatal error:
could not build module 'Darwin'
#import <Availability.h>
~~~~~~~^
While building module 'UIKit' imported from /Users/liguang/Downloads/workspace/iOSWorkspace/BaiduBoxApp/BoxCore/BoxCore-Prefix.pch:15:
In file included from <module-includes>:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: fatal error:
could not build module 'Darwin'
#import <Availability.h>
~~~~~~~^
While building module 'UIKit' imported from /Users/liguang/Downloads/workspace/iOSWorkspace/BaiduBoxApp/BoxCore/BoxCore-Prefix.pch:15:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.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/iPhoneSimulator9.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from <module-includes>:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: fatal error:
could not build module 'Darwin'
#include <sys/types.h>
~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/liguang/Downloads/workspace/iOSWorkspace/BaiduBoxApp/BoxCore/BoxCore-Prefix.pch:15:
***
***
** BUILD FAILED **
The following build commands failed:
CompileC /Users/liguang/Library/Developer/Xcode/DerivedData/BaiduBoxApp-etvhlrqpeligjvfqjifuyfqdjgca/Build/Intermediates/BaiduBoxApp.build/Debug-iphonesimulator/BoxCore.build/Objects-normal/i386/BBAVoiceRecognitionViewController.o BoxCore/Classes/UI/View/BBAVoiceRecognitionViewController.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
None
Anyone know what should I do to solve this problem?
thanks~
from infer.
Hello @markddaa,
This issue has already been discussed in #232 (comment) please try adding that argument to your build command and see if it helps.
Thanks
from infer.
Related Issues (20)
- False positive memory leak on loop HOT 4
- Dockerfile: US-ASCII locale causes crash on UTF-8 input
- How to add extra nullability condition to NULL_DEREFERENCE checking
- Is Adding a C++ Infer Port to the VSCode Plugin on the Roadmap? HOT 3
- [java] A false negative about the rule NULL_DEREFERENCE
- [java] A false positive about the rule THREAD_SAFETY_VIOLATION
- `--biabduction-unsafe-malloc` doesn't assume that `calloc()` and `realloc()` never return null HOT 1
- Error building the `Resource Leak analysis` lab in docker
- False positive Uninitialized Value in C code
- Need help when using infer run or capture during maven compilation HOT 1
- Query on --changed-files-index option HOT 3
- Meta leak HOT 1
- Infer - clang plugin OCaml - Issue HOT 3
- Termux command request
- Improving Robustness of Infer Command
- [pulse] Handling Third-Party Library Calls when Analysing Projects HOT 2
- infer fails to capture any file on maven build HOT 2
- Detected non-deterministic results when --jobs is not set to 1 HOT 2
- Usage Error: Java model file is required
- source build infer models fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infer.