Sonar CFamily error - The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed

SonarVersion : 8.2.0.32929
I am trying to analyze by C code files.
I am able to execute build wrapper successfully.
build-wrapper.log and dump-json files have been created successfully.
When I try run sonar scanner I get below error:
compiler used clang

ERROR: Error during SonarScanner execution error java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:

  • you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  • you are correctly invoking the scanner with correct configuration
  • your compiler is supported
  • you are wrapping your build correctly
  • you are wrapping a full/clean build
  • you are providing the path to the correct build-wrapper output directory

I have checked similar other posts from this portal, but it did not help. Hence I am creating the post here.

Please guide me what exactly to check in the log and json files to diagnose this issue. Let me know if any more details are required from my side for further investigation.

Hi @rocky,

first of all I would recommend you to update to a more recent version of SonarQube.

Then, if the problem persist, check all the elements listed:

if you still haven’t managed to get your project analyze could you tell which build system you are using? Then I may ask you to provide the build-wrapper output directory.

Thanks @mpaladin. I shall update it to the latest version and retry. Scan on the previous code repository(branch) is working, but for new branch I am facing this issue.

Make is being used on Linux platform.

Hi @rocky,

feel free to share the build-wrapper logs. If you want to share privately I can send you a PM.

yes please, can you send a PM?

Hi @mpaladin, I have shared the logs, let me know if you were able to check, if not can you send me a PM again?

Hi @rocky,

I answered in the PM thread, sorry but I don’t work over weekends and I answer in community whenever I have some free time.