Is anybody else having problems with Coverity Scan Build tool version 8.7.0?

1.6k views Asked by At

I have been using Coverity Scan for about a year, currently in Windows 7 Pro SP1 x64. Since I first started with it, I had no trouble feeding cov-build my project's make command and it emitting 100% of the compilation units every time. Something has changed with version 8.7.0 of the Coverity Build tool: It takes a similar amount of time to process my source code, but it always results in error and says that no compilation units were emitted.

The intermediate directory has many files written when I use this release of cov-build, and the log has many instances of the following:

error: unknown target triple '--windows-gnu', please use -triple or -arch WARNING: cov-internal-emit-clang returned with code 4

My source code hasn't changed significantly, I haven't changed any of my build tools either. If I downgrade to the previous version of the build tool (8.5.0.5), it works properly and emits all compilation units as expected. I've emailed Coverity support about this a couple of times, but haven't received a response. Is the latest version of the build tool working for other people?

2

There are 2 answers

0
raynebc On BEST ANSWER

It turns out that the original 8.7.0 release had a bug that prevented the capture tool from properly identifying the compiler. Coverity support advised me to re-download the 8.7.0 release and it's working normally now.

0
Caleb On

Looking at the build log snippet you pasted, this looks like you've configured gcc on Windows as comptype clangcc. On MacOSX gcc is really Apple's Clang compiler in disguise, but I'm not aware of the same being true on Windows. This is causing the compiler probes for Clang to fail - most directly indicated by this obviously incorrect compiler version switch:

--comp_ver "gcc.exe (GCC) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "

I believe your solution is to delete your gcc-as-clang configurations and re-run cov-configure. Most likely this will be sufficient:

cov-configure --gcc

however if there is some product bug where that doesn't work (please contact support of that's the case), then this is the more explicit version:

cov-configure --compiler gcc --comptype gcc --template

Did you run cov-configure yourself, or are these the configurations being shipped with SCAN?