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

Daniel Dunbar daniel at zuster.org
Mon May 11 11:18:06 PDT 2009


On Mon, May 11, 2009 at 11:12 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 9, 2009, at 6:10 PM, Daniel Dunbar wrote:
>
>> This is fallout from
>>  http://llvm.org/viewvc/llvm-project?view=rev&revision=70806
>> but I'm not sure of the right fix. As a temporary workaround, changing
>> --
>> +#if __STDC_HOSTED__
>> --
>> to
>> --
>> +#if 0
>> --
>> in clang's stdint.h should work.
>
> Eli, this is fallout from your patch, do you have an idea for a better
> solution?

I think Eli's solution is fine, but we probably need an additional
define for whether the platform has its own stdint.h to fall back to,
so that we can change the #if test to something like
--
#if __STDC_HOSTED__ && __SYS_PROVIDES_STDINT__
--

However, I don't exactly know what the problem Gary is seeing is; I am
just guessing that it is that the iPhone SDK does not include
stdint.h?

Does this seem workable?

 - Daniel

> -Chris
>
>>
>>
>> What version of OS X are you on? Do you have a /usr/include/stdint.h?
>>
>> - Daniel
>>
>> On Sat, May 9, 2009 at 5:53 PM, Gary Boone <gary.boone at gmail.com> wrote:
>>>
>>> I downloaded the latest Mac version of the checker, but it fails. I CD
>>> into my Xcode project directory, then:
>>>
>>> Success:
>>> $ xcodebuild clean; ~/development/checker-0.147/scan-build -k -V
>>> xcodebuild
>>>
>>> Fail:
>>> $ xcodebuild clean; ~/development/checker-0.195/scan-build -k -V
>>> xcodebuild
>>>
>>>
>>> Details:
>>>
>>> 1. Download and decompress the checker distribution into ~/development/
>>> checker-0.147/
>>> 2. CD into my xcode project directory.
>>> 3. Execute:
>>>
>>> $ xcodebuild clean; ~/development/checker-0.147/scan-build -k -V
>>> xcodebuild
>>>
>>> This command works correctly. But the new version:
>>>
>>> $ xcodebuild clean; ~/development/checker-0.195/scan-build -k -V
>>> xcodebuild
>>>
>>>
>>> /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.
>>>
>>> I haven't set any paths. Has something changed that that an Include
>>> path is required to find stdint.h, which is in:
>>>
>>>       checker-0.195/lib/clang/1.0/include/stdint.h
>>>
>>> What path should I set?
>>>
>>> Thanks,
>>> Gary
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>




More information about the cfe-dev mailing list