user3604158
user3604158

Reputation: 65

"intermediate directory contains no translation units" error while Coverity Static Analysis of my Java project

Recieved following warning while capturing the build for my project on Coverity. [WARNING] No files were emitted. This may be due to a problem with your configuration or because no files were actually compiled by your build command. Please make sure you have configured the compilers actually used in the compilation.

Upvotes: 3

Views: 15890

Answers (2)

Mai Nguyen
Mai Nguyen

Reputation: 21

I do not have any experiences in Coverity. I got similar error with you, and i added sub command "--record-only" or "--ro", then error is solved.

Upvotes: 0

Caleb
Caleb

Reputation: 1173

cov-build needs to know about what compilers you have in your build system. This is informed by the generated configs (using cov-configure).

For a Java project, usually cov-configure --java is sufficient. This will have cov-build look for javac invocations.

Another common problem is that you didn't do a clean build, so no actual compilations were seen.

If you've configured Java properly and captured a clean build and still aren't seeing TUs emitted, then you'll need to inspect the build log (underneath <intermediate directory>/build-log.txt). This should give some indication of what's gone wrong.

Upvotes: 3

Related Questions