Enterprise Edition - Version 8.1 (build 31237)
with SonarCFamily Code Analyzer for C, C++, Objective-C * 6.7.0 (build 15300) installed
When trying to scan our project which is Built on CentOS 7 with GCC
15:02:28.873 INFO: Subprocess(es) done in 1948ms
15:02:28.879 INFO: Cache: 0/0 hits, 135 bytes
15:02:28.879 INFO: 0 compilation units analyzed
15:02:29.026 INFO: ------------------------------------------------------------------------
15:02:29.026 INFO: EXECUTION FAILURE
15:02:29.026 INFO: ------------------------------------------------------------------------
15:02:29.027 INFO: Total time: 16.584s
15:02:29.089 INFO: Final Memory: 30M/104M
15:02:29.089 INFO: ------------------------------------------------------------------------
15:02:29.089 ERROR: Error during SonarQube Scanner 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 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
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.execute(CFamilySensor.java:357)
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:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
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)
The plugins are the latest version.
Build-wrapper-dump.json is attached in this thread.
The build is clean and complete.
Some assistance to troubleshoot would be appreciated.
I can only see compilation of files conftest.c and conftest.cpp which I don’t believe are your files. What compiler and build system are you using? Are you running a clean build?
We are using GCC compiler both and clang onto a native Centos7. Currently our build process is invoked with manual commands /sandbox/untriage/sonar-scanner-4.2.0.1873-linux/bin/sonar-scanner -X -Dsonar.projectKey=ftcore-ax -Dsonar.projectVersion=2.8.0.0 -Dsonar.sources=./ -Dsonar.host.url=http://134.111.32.115:9000 -Dsonar.login=f9108ea61403c3e94b9558e4e637492029a0409d -Dsonar.scm.provide=git -Dsonar.cfamily.build-wrapper-output=/sandbox/ftcbuild/demo1/ but it will be done with Jenkins for continuous integration in the near future.
This is a development build which does include some points for testing, which is the reason for conftest, but we can try to pull it out and see if it does complete.
We are getting complete builds, but just the json does not appear to be analyzing.
The build-wrapper-dump was too large to upload, so that was only a subset (original was 616,024 lines at 35.5MB)
I would need you to share your build-wrapper-dump.json file and the output of sonar-scanner. You can compress them before uploading them, size will drop by a while.