1
votes

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
Can you paste an example compilation line and the associated cov-internal-emit-clang command line from the build log? The first should be preceded with [COMPILING] with the latter following shortly after and for the same source file (parallelism may cause some interleaving of output).Caleb
Here is a sample of the logging for one of the source files pastebin.com/R8q3vArsraynebc
Thanks. This seems to be a misconfiguration issue - see the answer I've posted. There are some outstanding questions as to the source of the misconfiguration, but you should be able to get yourself unblocked with that answer.Caleb

2 Answers

2
votes

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
votes

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?