CUDA: 0 C/C++/Objective-C files were analyzed

  • CFamily plugin version: 6.20.1.32841
  • header only library with only a test in form of a test.cu CUDA file
  • steps to reproduce:
    • create a header only library
    • create a CUDA (*.cu) executable/test
    • compile and analyze with SQ

Is this use case supported? I.e: only having one compiled binary that is CUDA

LOG:

INFO: Scanner configuration file: /home/fberchtold/.conan/data/sonarqube_scanner_cli/4.6.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.0.2311
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 5.10.16.3-microsoft-standard-WSL2 amd64
INFO: User cache: /home/fberchtold/.sonar/cache
INFO: Scanner configuration file: /home/fberchtold/.conan/data/sonarqube_scanner_cli/4.6.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.9.1
INFO: Default locale: "en", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=1222ms
INFO: Server id: 243B8A4D-AXe8oQJAeYnY2e2oLIXS
INFO: User cache: /home/fberchtold/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=211ms
INFO: Load/download plugins (done) | time=299ms
INFO: Loaded core extensions: developer-scanner
INFO: JavaScript/TypeScript frontend is enabled
INFO: Process project properties
INFO: Process project properties (done) | time=7ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: lum_common_gpu
INFO: Base dir: /home/fberchtold/.conan/data/lum_common_gpu/1.0.0/_/_/build/55d6bedfd7670408daa16b50de85671649565207
INFO: Working dir: /home/fberchtold/.conan/data/lum_common_gpu/1.0.0/_/_/build/55d6bedfd7670408daa16b50de85671649565207/.scannerwork
INFO: Load project settings for component key: 'lum_common_gpu'
INFO: Load project branches
INFO: Load project branches (done) | time=182ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=184ms
INFO: Load branch configuration
INFO: Found manual configuration of branch/PR analysis. Skipping automatic configuration.
INFO: Load branch configuration (done) | time=2ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=394ms
INFO: Load active rules
INFO: Load active rules (done) | time=5197ms
INFO: Branch name: develop
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources for coverage: **/*test.cpp
INFO: 7 files indexed
INFO: Quality profile for c: Sonar way
INFO: Quality profile for cpp: Sonar way
INFO: ------------- Run sensors on module lum_common_gpu
INFO: JavaScript/TypeScript frontend is enabled
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=196ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=3ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=2ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=1ms
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.20.1.32841
INFO: Using build-wrapper output: /home/fberchtold/.conan/data/lum_common_gpu/1.0.0/_/_/build/55d6bedfd7670408daa16b50de85671649565207/build-wrapper-dump.json
INFO: Available processors: 24
INFO: Using 24 threads for analysis according to value of "sonar.cfamily.threads" property.
INFO: Load project repositories
INFO: Load project repositories (done) | time=182ms
INFO: Loading cache from: /home/luminar/sonar-cache/analysis_state
INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
INFO: SE: 0 out of 0
INFO: Subprocess(es) done in 14ms
INFO: Cache: 0/0 hits, 137 bytes
INFO: 0 compilation units analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 13.337s
INFO: Final Memory: 20M/120M
INFO: ------------------------------------------------------------------------
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)
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Hi @blackliner ,

yes, it is expected, we currently don’t support CUDA.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.