Reputation: 4425
Recently I updated to Xcode 6 beta 6 with iOS 8 SDK. And while running static analyser I jumped into a problem with the following errors.
error: error reading 'pic' error: no analyzer checkers are associated with '-mrelocation-model' 2 errors generated. Command /Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Any Idea what is these errors and how to fix it. Thanks.
Upvotes: 10
Views: 3061
Reputation: 3171
With the above answers in Xcode 8, I noticed build errors when using Swift compilation. Here's what Compiler Flags worked for me:
-w -Xanalyzer -analyzer-disable-all-checks
Upvotes: 0
Reputation: 1657
It´s a issue with the clang static analyzer.
Add to your existing analyzer entry under "Target" -> "Build Phases" -> "Compiler Flags" the suffix -Xanalyzer deadcode
.
Complete entry should read as follows:
-w -Xanalyzer -analyzer-disable-checker -Xanalyzer deadcode
Upvotes: 6
Reputation: 29
I have solve this problem recently you can solve using go to Xcode > Preferences > Location and remove all derived data in derived data folder and then clean and analyze
Upvotes: 2