[cfe-dev] 'scan-build ./configure' hang

Devin Coughlin via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 11 13:43:49 PST 2015


> On Nov 11, 2015, at 1:37 PM, Jonathan Roelofs via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> 
> 
> On 11/11/15 2:28 PM, Craig, Ben via cfe-dev wrote:
>> I usually run 'top' in another console.  Often, you will find an
>> instance of clang running the analyzer.  It is usually taking a fair
>> amount of CPU and memory.
>> 
>> If this is the case, then you may be able to look at the command line to
>> see which part of the configure is causing the slow build.
>> 
>> On 11/11/2015 3:18 PM, Maarten Hoes via cfe-dev wrote:
>>> Hi,
>>> 
>>> 
>>> I'm trying to analyze a certain project [1] with the clang-analyzer.
>>> But at a certain step [2] during 'scan-build ./configure', the command
>>> appears to hang (or at least perform so slowly that it appears to
>>> hang). If I just run './configure' without scan-build, the configure
>>> finishes quite fast and as expected. I'm running the latest svn
>>> version (r252789) of llvm/clang/scan-build on Fedora 23.
>>> 
>>> I aborted the scan-build and took a look at 'config.log' but must
>>> admit I'm not quite sure what to look for.
>>> 
>>> Any and all help to figure out what is going on here, and help fix it,
>>> is appreciated.
> 
> I think you ought to be running scan-build on the resulting makefiles, not on configure itself (unless you intend to analyze the code that configure uses to feature-test the compiler).

It is sometimes important to run scan-build on ./configure as well because configure often generates Makefiles that have paths that are hard-wired to the compiler, which scan-build interposes. There are more details about this at <http://clang-analyzer.llvm.org/scan-build.html#recommended_autoconf>.

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


More information about the cfe-dev mailing list