8

I'm getting the following static analyzer error when building my iOS project that is using cocoapods with the latest Xcode 6 GM release.

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

I can disable the static analyzer, but obviously I don't want to do that. Does anyone know how to fix this ( or a workaround ) and what exactly is causing this error?

1
  • 1
    Having the same problem here. Not sure what to do about it though so hopefully someone chimes in.
    – xsee
    Sep 11, 2014 at 16:26

1 Answer 1

4

It appears to be a known issue with a fix already in the queue for the next version of Cocoapods. Check out the bug report for more info.

Supposedly you can work around this in the meantime by re-enabling warnings (e.g remove inhibit_all_warnings from your podspec).

Alternatively, and what turned out to be the real problem for me, was that I had a deprecated flag set on a couple of the files. I removed these flags and the build succeeded.

enter image description here

3
  • 2
    Thanks @Evan. Not sure though how to fix this in my current project. The pods I'm using don't have inhibit_all_warnings in their podspec. Additionally I don't use those offending compiler flags you mentioned on any of my project files.
    – immichs
    Sep 12, 2014 at 20:49
  • 1
    According to this comment on the bug, it will be fixed in the next release of CocoaPods. Sep 13, 2014 at 4:19
  • @ZevEisenberg Yes, but how do I get this fixed immediately?
    – immichs
    Sep 13, 2014 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.