Xcode 6 beta 6: Inscrutable Error when analyzing sqlite3.c
Originator: | jerrykrinock | ||
Number: | rdar://18115632 | Date Originated: | 2014-08-24 |
Status: | Open | Resolved: | |
Product: | Xcode 6 Beta 6 | Product Version: | Xcode 6.0 (6A280e) |
Classification: | Serious Bug | Reproducible: | Always |
* SUMMARY I build sqlite3 from source into a static library to ship in my app. For historical reasons, it is built in a separate project. Due to known incompatibilities with Dr. Hipp's coding style and clang, I have set a compiler flag -w -Xanalyzer -analyzer-disable-checker on the amalgamated source file, sqlite3.c. If I open this project in Xcode 5 and run the static analyzer, it succeeds with no errors. However, when I do the same thing in Xcode 6 Beta 6, I get a these two completely inscrutable errors: error: error reading 'pic' error: no analyzer checkers are associated with '-mrelocation-model' * STEPS TO REPRODUCE 1. Download archive of project folder from here: http://sheepsystems.com/engineering/sqlite3.zip 2. Unzip, find the project inside and open with Xcode 5. 3. Click in the menu: Product > Analyze. It results in no errors or warnings. 4. Quit Xcode 5. 5. Open the project in Xcode 6 Beta 6. 6. Click in the menu: Product > Analyze. * EXPECTED RESULTS No warnings or errors, same as with Xcode 5 * ACTUAL RESULTS (Scroll down to bottom to see "2 errors") Analyze sqlite3.c cd /Users/jk/Desktop/sqlite3 export LANG=en_US.US-ASCII /Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -isysroot /Applications/Xcode6-Beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-sign-conversion -D__clang_analyzer__ -Xclang -analyzer-output=plist-multi-file -Xclang -analyzer-config -Xclang path-diagnostics-alternate=true -Xclang -analyzer-config -Xclang report-in-main-source-file=true -Xclang -analyzer-checker -Xclang security.insecureAPI.UncheckedReturn -Xclang -analyzer-checker -Xclang security.insecureAPI.getpw -Xclang -analyzer-checker -Xclang security.insecureAPI.gets -Xclang -analyzer-checker -Xclang security.insecureAPI.mkstemp -Xclang -analyzer-checker -Xclang security.insecureAPI.mktemp -Xclang -analyzer-disable-checker -Xclang security.insecureAPI.rand -Xclang -analyzer-disable-checker -Xclang security.insecureAPI.strcpy -Xclang -analyzer-checker -Xclang security.insecureAPI.vfork -iquote /Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/sqlite-generated-files.hmap -I/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/sqlite-own-target-headers.hmap -I/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/sqlite-all-target-headers.hmap -iquote /Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/sqlite-project-headers.hmap -I/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Products/Debug/include -I/Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/DerivedSources/x86_64 -I/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/DerivedSources -F/Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Products/Debug -w -Xanalyzer -analyzer-disable-checker --analyze /Users/jk/Desktop/sqlite3/sqlite3.c -o /Users/jk/Library/Developer/Xcode/DerivedData/sqlite3-ewelmofosrmtfyggddqlcevplxef/Build/Intermediates/sqlite3.build/Debug/sqlite.build/StaticAnalyzer/sqlite3/sqlite/normal/x86_64/sqlite3.plist 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 * NOTES I have no idea how to begin trying to understand what this error is. I have no idea what is meant by 'pic'.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
I filed a duplicate for this and got a response, telling me to use -Xanalyzer -analyzer-disable-all-checks which was introduced with Xcode 6.1 (Build 6A1052d) instead of "-w -Xanalyzer -analyzer-disable-checker".
'pic' stands for Position Independent Code. I found it by googling; no idea what it means.
Marked as
Apple has closed this bug, as a duplicate of 17909871.
Workaround, sort of
In Build Phases for the sqlite target, Compile, sqlite3.c, if you remove the compiler flag "-w -Xanalyzer -analyzer-disable-checker", then you don't get the error. But you get several dozen spurious warnings when you Analyze :((