[cfe-dev] Problems getting the Static Analyser to work

Ted Kremenek kremenek at apple.com
Fri Jul 18 13:58:00 PDT 2008

Hi Martin,

This looks like a problem in the python script ccc-analyzer which acts  
as a replacement to gcc, spawning off invocations to gcc and clang  
(the static analyzer) respectively.

The best thing to do is probably to file a bugzilla report for this.   
That way we can track the progress of the bug fix.

In the bug report, can you provide the output of scan-build when you  
use 3 "-v" options?  It would be good to see the exact invocation  
(arguments) that are passed to ccc-analyzer that leads to this problem.


On Jul 18, 2008, at 12:55 PM, Martin Pilkington wrote:

> Hi all,
> I've been hearing people raving about the static analyser in clang  
> and it does look very impressive so I've been wanting to try it out  
> for myself. The problem is that it doesn't seem to want to compile  
> my code. When I run the following command I get errors with my code:
> ./clang/scan-build -V -o /results xcodebuild -configuration "Debug"
> For every file it tries compiling I get the following:
> Traceback (most recent call last):
>   File "/Users/martinpilkington/Personal/M3/Apps/Lighthouse Keeper/ 
> Lighthouse Keeper/dev/clang/ccc-analyzer", line 286, in <module>
>     main(sys.argv[1:])
>   File "/Users/martinpilkington/Personal/M3/Apps/Lighthouse Keeper/ 
> Lighthouse Keeper/dev/clang/ccc-analyzer", line 283, in main
>     analyze(clang, analyze_args, language, output, files, verbose,  
> htmldir, file, analysis_type)
>   File "/Users/martinpilkington/Personal/M3/Apps/Lighthouse Keeper/ 
> Lighthouse Keeper/dev/clang/ccc-analyzer", line 87, in analyze
>     subprocess.call(args)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/subprocess.py", line 443, in call
>     return Popen(*popenargs, **kwargs).wait()
>   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/subprocess.py", line 593, in __init__
>     errread, errwrite)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/subprocess.py", line 1079, in _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory
> I've tried this on two machines (both running OS X 10.5.4 and Xcode  
> 3.1). I've tried this with checker-57 and checker-60 (62 seems to  
> have a bug that makes it not want to work at all with paths with  
> spaces in the name). The project builds fine if I build from Xcode  
> or run xcodebuild on its own but I get 27 failures (one for each  
> file). Is there some sort of configuration setting or something I'm  
> missing? Please be warned that I'm not the most command line savvy  
> of people.
> Thanks
> ---------------------------------
> Martin Pilkington
> Writer of Weird Symbols
> pilky at mcubedsw.com
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080718/dcf26467/attachment.html>

More information about the cfe-dev mailing list