[cfe-dev] scan-build failure

Michael Blumenkrantz mike at zentific.com
Fri Sep 3 05:02:30 PDT 2010


On Fri, 3 Sep 2010 00:04:28 -0700
Tom Care <tcare at apple.com> wrote:

> Hi Michael,
> 
> Sorry for the late reply, it took me a while to reproduce this.
> 
> I successfully reproduced this on Ubuntu (project wouldn't compile under
> OSX). It looks like a problem with the ccc-analyzer script.  I filed Bug 8070
> 
> Thanks for reporting!
> 
> Tom
> 
> On 01/09/2010, at 6:47 PM, Michael Blumenkrantz wrote:
> 
> > On Wed, 1 Sep 2010 18:34:40 -0700
> > Ted Kremenek <kremenek at apple.com> wrote:
> > 
> >> Hi Michael,
> >> 
> >> From the error diagnostics it appears that they are coming from Clang when
> >> httpconnection.c is compiled.  I know you said that GCC is being used as
> >> the compiler, but that doesn't seem to be the case.
> >> 
> >> BTW, are you doing a parallel build?  It appears that url.c is analyzed
> >> before httpconnection.c, so it is difficult to tell from the log what is
> >> going on.
> >> 
> > Yes, -j2.
> >> FWIW, all ccc-analyzer does is directly forward the command line arguments
> >> to your compiler (e.g., gcc), and then calls clang with various analyzer
> >> comment line options.  If the analyzer fails, however, that shouldn't
> >> cause the build to fail.  The only reason that ccc-analyzer returns an
> >> error code is if the compiler it called returned an error code.
> >> 
> >> Have you tried building your project with Clang?  (not using scan-build).
> >> I suspect that you'll see the same errors, and if so that will at least
> >> confirm that the build is failing because clang is being used for
> >> compilation.
> >> 
> > The project compiles fine with both gcc and clang, but fails when using
> > scan-build.  You can easily check the code out from
> > http://svn.zentific.com/trunk/Zentific-console/shellinabox and test this
> > yourself.
> >> Also, if clang is indeed being used to build your project, I'm not certain
> >> why scan-build is using clang to actually build your project unless...
> >> 
> >>  (a) the 'gcc' in your path is a symlink to clang
> >> 
> >> or
> >> 
> >>  (b) the environment variable CCC_CC is set to 'clang'
> > I don't remember which cc I was using in the log that I sent just now, but
> > neither compiler is able to finish a build when using scan-build.  Required
> > functions that are detected when not using scan-build are no longer detected
> > when using scan-build.
> >> 
> >> On Aug 31, 2010, at 9:41 PM, Michael Blumenkrantz wrote:
> >> 
> >>> Attached are the output for running configure and make with
> >>> CCC_ANALYZER_VERBOSE set (log.txt) as well as the config.log file.  For
> >>> whatever reason, when using scan-build it seems to be unable to compile
> >>> using certain headers.
> >> 
> > Checking out the code and testing this yourselves will likely be the fastest
> > way to solve this, unless it is somehow unique to my system.
> > 
> > -- 
> > Mike Blumenkrantz
> > Zentific: Our boolean values are huge.
> 
Excellent!  Always glad to break things :)

-- 
Mike Blumenkrantz
Zentific: Our boolean values are huge.



More information about the cfe-dev mailing list