Running build wrapper along with build but 0 c files are analysing

Iam running build wrapper with bitbake command , then iam getting following 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 CFamily 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
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps

	
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:396)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:127)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)

Hey there.

  • What command are you running exactly?
  • Can you zip up the build wrapper output directory and share it?

Hi,
The error which i posted is not coming now, and analysis is passed but it is saying 0 files are indexed

08:16:39.148 INFO: 0 files ignored because of inclusion/exclusion patterns
08:16:39.148 INFO: 0 files ignored because of scm ignore settings.
I have given the sonar properties as below
sonar.projectKey=********
sonar.organization=*******
sonar.projectName=*******
sonar.sources=/path/to/my/src
sonar.inclusions=/path/to/my/src/*.c
sonar.cfamily.build-wrapper-output=path to build wrapper json
sonar.verbose=true
And also iam seeing in pipeline log that build wrapper json file is excluded as below
**Excluded sources: /build-wrapper-dump.json, but i didnot gave any exclusion

Iam not sure why my c file is not indexed.

It would make sense at this point to share your full analysis logs.

please find the attached analysis pipeline log,
analysis.log (19.4 KB)

It looks like all your files are getting excluded.

2023-09-27T08:42:19.3227706Z INFO: 0 files indexed
2023-09-27T08:42:19.3268910Z INFO: 31 files ignored because of inclusion/exclusion patterns

Can you remove these inclusions/exclusions?

2023-09-27T08:42:17.8231146Z INFO: Indexing files...
2023-09-27T08:42:17.8260884Z INFO: Project configuration:
2023-09-27T08:42:17.8263036Z INFO:   Included sources: /azure/PR_Build_Agent/_work/2/s/meta-fisker/meta-fisker-scg-software/recipes-fisker-api/Pyserial/files/*.c
2023-09-27T08:42:17.8264329Z INFO:   Excluded sources: **/build-wrapper-dump.json, /azure/PR_Build_Agent/_work/2/s/sources/**, /azure/PR_Build_Agent/_work/2/s/build_fisker-scg-rev1/**

Okay sure, i will remove inclusions and exclusion and let you know
But the excluded path of build wrapper dump.json , i didnot added as excluded.

I have run the analysis without adding inclusions and exclusions. But iam getting error like “The “build-wrapper-dump.json” file was found but 0 C/C++/Objective-C files were analyzed”
Please find the attached analysis pipeline
analysis.log (253.0 KB)
log
i have given sonar-project.properties:
sonar.projectKey=********
sonar.organization=*******
sonar.projectName=*******
sonar.sources=/path/files/
sonar.cfamily.build-wrapper-output=/path/

Okay. So we’re back here.

Hi, the size of my build wrapper zip is 550 mb, may i know how can i share. iam not able to attach here