简体   繁体   中英

Build error with Xcode 6 and (possibly) cocoapods

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?

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 (eg 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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM