java.lang.IllegalStateException: The "build-wrapper-dump.json"

Morning,

I’m getting this error:

15:51:49.806 ERROR: Error during SonarScanner execution
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 com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:451)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:392)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:388)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:357)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:150)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)

I’ve gone through the documentation and removed a lot of blockers, but now I can’t get passed this error

# sonar-project.properties
sonar.projectKey=FSW

sonar.qualitygate.wait=true

sonar.login=**********************

sonar.cfamily.build-wrapper-output=build-container-folder

sonar.cfamily.threads=4

# * if you do not want to enable cache

#   please explicitly disable it

#   by setting the following property to your analysis:

  #sonar.cfamily.cache.enabled=false

# * to enable cache please specify the following 2 options:

sonar.cfamily.cache.enabled=true

sonar.cfamily.cache.path=.

sonar.projectBaseDir=/home/lander/code/fsw/apps/

# Path is relative to the sonar-project.properties file. Defaults to .

sonar.sources=.

# sonar.projectBaseDir=home/lander/code/fsw/

# Encoding of the source code. Default is default system encoding

sonar.sourceEncoding=UTF-8

sample_report.txt (1.6 MB)

build-wrapper-dump.json (5.7 MB)

Hi @pturner,

Make sure that you are running sonar-scanner from a directory that contains the file you built and want to analyze. Also, could you please execute the below command and share the output.

/usr/bin/i686-linux-gnu-gcc-7 -x c --std gnu99 -v -dM -E

Additionally, Please refer to documentation important notes.