[cfe-dev] checker 0.195 fails on Mac (can't find 'stdint.h')

Gary Boone gary.boone at gmail.com
Sun May 17 11:04:22 PDT 2009


> We suspect that the version of the iPhone SDK you are using did not  
> (by accident) include stdint.h.  What version are you using?
>
> Can you provide the output of 'scan-build -v -v' around the command  
> that is failing?  We're looking for the invocation of 'clang-cc'  
> that produces the error that you are seeing.

Ok, using the original stdint.h file, and '-v -v', the many errors  
look like:

[LOCATION]: /Users/Gary/Development/projects/TestProg
'/Users/Gary/Development/checker-0.195/libexec/clang-cc' '- 
DIBOutlet=__attribute__((iboutlet))' '-arch' 'armv6' '-x' 'objective- 
c' '-analyzer-store=basic' '-analyzer-constraints=range' '-analyzer- 
output=html' '-std=c99' '-fpascal-strings' '-isysroot' '/Developer/ 
Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk' '- 
miphoneos-version-min=2.2' '-iquote' '/Users/Gary/Development/projects/ 
TestProg/build/TestProg.build/Release-iphoneos/TestProg.build/TestProg- 
generated-files.hmap' '-I/Users/Gary/Development/projects/TestProg/ 
build/TestProg.build/Release-iphoneos/TestProg.build/TestProg-own- 
target-headers.hmap' '-I/Users/Gary/Development/projects/TestProg/ 
build/TestProg.build/Release-iphoneos/TestProg.build/TestProg-all- 
target-headers.hmap' '-iquote' '/Users/Gary/Development/projects/ 
TestProg/build/TestProg.build/Release-iphoneos/TestProg.build/TestProg- 
project-headers.hmap' '-F/Users/Gary/Development/projects/TestProg/ 
build/Release-iphoneos' '-I/Users/Gary/Development/projects/TestProg/ 
build/Release-iphoneos/include' '-I/Users/Gary/Development/projects/ 
TestProg/build/TestProg.build/Release-iphoneos/TestProg.build/ 
DerivedSources' '-include' '/Users/Gary/Development/projects/TestProg/ 
TestProg_Prefix.pch' '/Users/Gary/Development/projects/TestProg/ 
Classes/GraphOverlayView.m' '-analyze' '-analyzer-display-progress' '- 
disable-free' '-analyzer-eagerly-assume' '-warn-objc-unused-ivars' '- 
warn-objc-methodsigs' '-checker-cfref' '-warn-dead-stores'
In file included from <built-in>:97:
In file included from <command line>:2:
In file included from /Users/Gary/Development/projects/TestProg/ 
TestProg_Prefix.pch:6:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:6:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/System/Library/Frameworks/ 
CoreFoundation.framework/Headers/CoreFoundation.h:11:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/sys/types.h:81:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/machine/endian.h:39:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/arm/endian.h:74:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/sys/_endian.h:124:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/libkern/_OSByteOrder.h:70:
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/ 
SDKs/iPhoneOS2.2.sdk/usr/include/libkern/arm/OSByteOrder.h:8:
/Users/Gary/Development/checker-0.195/lib/clang/1.0/include/stdint.h: 
32:16: fatal error: 'stdint.h' file not found

# include_next <stdint.h>
                ^
1 diagnostic generated.


Thanks,
Gary




On May 12, 2009, at 11:07 AM, Ted Kremenek wrote:

>
> On May 9, 2009, at 7:18 PM, Gary Boone wrote:
>
>> Y, the '#if 0' worked. Thanks so much!
>>
>> I'm on OSX 10.5.6.
>>
>> Yes,
>> /usr/include/stdint.h -> gcc/darwin/default/stdint.h
>>
>> Love this tool. Can we update the webpage updated to reflect this
>> patch? I'm guessing a lot of people will try the tool and get stopped
>> by this issue. Also, the tool is considerably simpler to run
>> successfully when preceded by 'xcodebuild clean' for XCode/iPhone
>> development. So that tip on the web page would help newbies, too.
>>
>>
>> Thanks,
>> Gary
>>
>>
>
> Hi Gary,
>
> We suspect that the version of the iPhone SDK you are using did not  
> (by accident) include stdint.h.  What version are you using?
>
> Can you provide the output of 'scan-build -v -v' around the command  
> that is failing?  We're looking for the invocation of 'clang-cc'  
> that produces the error that you are seeing.
>
> Ted




More information about the cfe-dev mailing list