Build-Wrapper Msbuild Cross Compile leads to empty build-wrapper-dump.json

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    *Sonar-scanner 4.6.2.2472
    *Microsoft Build Engine version 17.1.0
    *SonarScanner for MSBuild 5.5.3
    *Build-wrapper, version 6.32
    *Java 18.0
    *Visual Studio 2022 community on the build server
  • Jenkins
  • what are you trying to achieve

Attempting to cross compile:

  • Window 10(Visual Studio MSbuild)
  • Dockerized Ubuntu 18.04 (gcc)
  • Dockerized Jenkins

I want to compile and analyze C, C++ code,
I have the build wrapper wrapping the msbuild with a an msbuild begin and end. The code compiles but the wrapper out put empty.

  • what have you tried so far to achieve this
    attempted:
stage('Build +SonarQube ') {
         environment {
            scannerHome = tool 'MSbuildScanner' // the name you have given the Sonar Scanner (in Global Tool Configuration)
        }
                    steps {
                      withSonarQubeEnv('Sonarqube Testing') { 
                      script {
                        bat "${scannerHome}\\SonarScanner.MSBuild.exe begin /k:(project name)/n:(project name) /d:sonar.verbose=true /d:sonar.cfamily.cache.enabled=false /d:sonar.cfamily.threads=1 /d:sonar.cfamily.build-wrapper-output=bw-out "
                        def msbuild = tool name: 'Csharp', type: 'hudson.plugins.msbuild.MsBuildInstallation'
                        bat "${msbuild} /t:Clean"   
                        bat "build-wrapper-win-x86-64.exe --out-dir bw-out ${msbuild} (project).sln /t:Rebuild"                         
                        bat "${scannerHome}\\SonarScanner.MSBuild.exe end"

I received the follow output:

Tue May 10 12:27:58 2022: build-wrapper, version 6.32 (win-x86-64)
Tue May 10 12:27:58 2022: isWow64: 0
Tue May 10 12:27:58 2022: windows version: 6.2, service pack: 0.0, build number: 9200, product type: 1
Tue May 10 12:27:58 2022: current directory: C:\jenkins\workspace\(project)
Tue May 10 12:27:58 2022: cwd: <C:\jenkins\workspace\(project)>
Tue May 10 12:27:58 2022: out-dir absolute path: <C:\jenkins\workspace\(project)\bw-out>
Tue May 10 12:27:58 2022: command line received: <"C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe" /t:Rebuild>
Tue May 10 12:27:58 2022: initializing json file
Tue May 10 12:27:58 2022: starting debug cycle
Tue May 10 12:27:58 2022: process created with pid: 9368
Tue May 10 12:27:58 2022: image path name: <C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe>
Tue May 10 12:27:58 2022: command line: <"C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe" /t:Rebuild>
Tue May 10 12:27:58 2022: working directory: <C:\jenkins\workspace\(project)>
Tue May 10 12:27:58 2022: isWow64: 1
Tue May 10 12:27:58 2022: skipping process C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe with pid: 9368
Tue May 10 12:28:05 2022: process with pid 9368 exit with code: 0 (0x0)
Tue May 10 12:28:05 2022: finalizing json file

bw-out:

# (C) SonarSource SA, 2014-2022, info@sonarsource.com
# All SONARSOURCE programs and content are copyright protected.
# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.
#
# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.
# It may not be used in connection with any other software.
# Any other use is prohibited by law and may be grounds for immediate termination of your License.
{
"version":"6.32",
"captures":[
]}

Hi @theo ,
Welcome!
Can you try adding /nodeReuse:false to your ${msbuild} line?

The verbose jenkins log(sanatized)

10:45:01.061 INFO:   Base dir: C:\Jenkins\workspace\(path)
10:45:01.063 DEBUG:   Source paths:(files)
10:45:01.071 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.075 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.077 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.078 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.079 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.080 DEBUG: '(src).cpp' indexed with language 'cpp'
10:45:01.081 DEBUG: '(header).h' indexed with language 'c'
10:45:01.081 DEBUG: '(header).h' indexed with language 'c'
10:45:01.083 DEBUG: '(header).h' indexed with language 'c'
10:45:01.084 DEBUG: '(header).h' indexed with language 'c'
10:45:01.084 DEBUG: '(header).h' indexed with language 'c'
10:45:01.085 DEBUG: '(header).h' indexed with language 'c'
10:45:01.086 DEBUG: '(header).h' indexed with language 'c'
10:45:01.087 INFO: Indexing files of module '(path)'
10:45:01.087 INFO:   Base dir: C:\Jenkins\workspace\(path)
10:45:01.091 INFO: 13 files indexed
10:45:01.091 INFO: 0 files ignored because of scm ignore settings
10:45:01.092 INFO: Quality profile for c: Sonar way
10:45:01.092 INFO: Quality profile for cpp: Sonar way
10:45:01.092 INFO: ------------- Run sensors on module (project name)
10:45:01.216 INFO: Load metrics repository
10:45:01.230 DEBUG: GET 200 http://(ip)/api/metrics/search?ps=500&p=1 | time=13ms
10:45:01.242 INFO: Load metrics repository (done) | time=26ms
10:45:02.081 DEBUG: Loading (path).dll
10:45:02.926 DEBUG: Adding rules for repository 'jssecurity', language: JAVASCRIPT, [class com.sonar.security.frontend.js.rules.DomOpenRedirectCheck, class com.sonar.security.frontend.js.rules.DomXssCheck, class com.sonar.security.frontend.js.rules.DynamicCodeExecutionCheck, class com.sonar.security.frontend.js.rules.FilePathInjectionCheck, class com.sonar.security.frontend.js.rules.HttpRedirectionCheck, class com.sonar.security.frontend.js.rules.NoSQLInjectionCheck, class com.sonar.security.frontend.js.rules.OSArgumentConstructionCheck, class com.sonar.security.frontend.js.rules.OSArgumentInjectionCheck, class com.sonar.security.frontend.js.rules.OSCommandInjectionCheck, class com.sonar.security.frontend.js.rules.ReflectedXssCheck, class com.sonar.security.frontend.js.rules.RegularExpressionDoSCheck, class com.sonar.security.frontend.js.rules.ServerSideRequestCheck, class com.sonar.security.frontend.js.rules.SQLInjectionCheck, class com.sonar.security.frontend.js.rules.ZipSlipCheck, class com.sonar.security.frontend.js.rules.SessionFixationCheck] from com.sonar.security.frontend.js.E
10:45:02.934 DEBUG: Adding rules for repository 'tssecurity', language: TYPESCRIPT, [class com.sonar.security.frontend.js.rules.DomOpenRedirectCheck, class com.sonar.security.frontend.js.rules.DomXssCheck, class com.sonar.security.frontend.js.rules.DynamicCodeExecutionCheck, class com.sonar.security.frontend.js.rules.FilePathInjectionCheck, class com.sonar.security.frontend.js.rules.HttpRedirectionCheck, class com.sonar.security.frontend.js.rules.NoSQLInjectionCheck, class com.sonar.security.frontend.js.rules.OSArgumentConstructionCheck, class com.sonar.security.frontend.js.rules.OSArgumentInjectionCheck, class com.sonar.security.frontend.js.rules.OSCommandInjectionCheck, class com.sonar.security.frontend.js.rules.ReflectedXssCheck, class com.sonar.security.frontend.js.rules.RegularExpressionDoSCheck, class com.sonar.security.frontend.js.rules.ServerSideRequestCheck, class com.sonar.security.frontend.js.rules.SQLInjectionCheck, class com.sonar.security.frontend.js.rules.ZipSlipCheck, class com.sonar.security.frontend.js.rules.SessionFixationCheck] from com.sonar.security.frontend.js.B
10:45:03.258 DEBUG: 'JavaSensor' skipped because there is no related file in current project
10:45:03.259 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
10:45:03.259 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project
10:45:03.260 DEBUG: 'IaC CloudFormation Sensor' skipped because there is no related file in current project
10:45:03.260 DEBUG: 'PL/SQL Sensor' skipped because there is no related file in current project
10:45:03.260 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
10:45:03.261 DEBUG: 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project
10:45:03.262 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
10:45:03.262 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
10:45:03.262 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
10:45:03.263 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
10:45:03.263 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
10:45:03.263 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
10:45:03.264 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
10:45:03.264 DEBUG: 'Flex' skipped because there is no related file in current project
10:45:03.264 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
10:45:03.265 DEBUG: 'XML Sensor' skipped because there is no related file in current project
10:45:03.265 DEBUG: 'Swift Code Quality and Security' skipped because there is no related file in current project
10:45:03.266 DEBUG: 'Import of SwiftLint issues' skipped because there is no related file in current project
10:45:03.266 DEBUG: 'gcov' skipped because one of the required properties is missing
10:45:03.267 DEBUG: 'llvm-cov' skipped because one of the required properties is missing
10:45:03.267 DEBUG: 'cppunit' skipped because one of the required properties is missing
10:45:03.267 DEBUG: 'VisualStudioCoverage' skipped because one of the required properties is missing
10:45:03.268 DEBUG: 'bullseye' skipped because one of the required properties is missing
10:45:03.268 DEBUG: 'Python Sensor' skipped because there is no related file in current project
10:45:03.268 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
10:45:03.268 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
10:45:03.269 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
10:45:03.269 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
10:45:03.269 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
10:45:03.269 DEBUG: 'Code Quality and Security for Go' skipped because there is no related file in current project
10:45:03.270 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
10:45:03.270 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
10:45:03.270 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
10:45:03.270 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
10:45:03.270 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
10:45:03.271 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
10:45:03.271 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
10:45:03.271 DEBUG: 'KotlinSurefireSensor' skipped because there is no related file in current project
10:45:03.271 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
10:45:03.272 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
10:45:03.272 DEBUG: 'Import of ktlint issues' skipped because there is no related file in current project
10:45:03.272 DEBUG: 'T-SQL Sensor' skipped because there is no related file in current project
10:45:03.272 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
10:45:03.272 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
10:45:03.273 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project
10:45:03.273 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
10:45:03.273 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
10:45:03.273 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
10:45:03.274 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
10:45:03.274 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
10:45:03.274 DEBUG: 'Import of RuboCop issues' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'Python HTML templates processing' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'PHP sensor' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'Import of PHPStan issues' skipped because there is no related file in current project
10:45:03.275 DEBUG: 'Import of Psalm issues' skipped because there is no related file in current project
10:45:03.276 DEBUG: 'AbapSquidSensor' skipped because there is no related file in current project
10:45:03.276 DEBUG: Sensors : C# Project Type Information -> C# Analysis Log -> C# Properties -> HTML -> Text Sensor -> VB.NET Project Type Information -> VB.NET Analysis Log -> VB.NET Properties -> JaCoCo XML Report Importer -> CSS Rules -> ThymeLeaf template sensor -> Serverless configuration file sensor -> AWS SAM template file sensor
10:45:03.277 INFO: Sensor C# Project Type Information [csharp]
10:45:03.277 INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
10:45:03.277 INFO: Sensor C# Analysis Log [csharp]
10:45:03.287 DEBUG: Project '(proj name and ID)': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.288 INFO: Sensor C# Analysis Log [csharp] (done) | time=11ms
10:45:03.288 INFO: Sensor C# Properties [csharp]
10:45:03.288 DEBUG: Project :(proj name and ID) Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.288 DEBUG: Project '(proj name and ID)': No Roslyn issues reports have been found.
10:45:03.288 INFO: Sensor C# Properties [csharp] (done) | time=0ms
10:45:03.288 INFO: Sensor HTML [web]
10:45:03.290 INFO: Sensor HTML [web] (done) | time=2ms
10:45:03.290 INFO: Sensor Text Sensor [text]
10:45:03.292 INFO: 13 source files to be analyzed
10:45:03.304 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.310 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.311 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.350 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.372 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.373 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.375 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.376 DEBUG: '(src).cpp' generated metadata with charset 'UTF-8'
10:45:03.377 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.379 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.380 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.381 DEBUG: (header).h' generated metadata with charset 'UTF-8'
10:45:03.382 DEBUG: '(header).h' generated metadata with charset 'UTF-8'
10:45:03.382 INFO: 13/13 source files have been analyzed
10:45:03.383 INFO: Sensor Text Sensor [text] (done) | time=93ms
10:45:03.383 INFO: Sensor VB.NET Project Type Information [vbnet]
10:45:03.383 INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
10:45:03.384 INFO: Sensor VB.NET Analysis Log [vbnet]
10:45:03.395 DEBUG: Project (proj name and id)': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.395 INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=11ms
10:45:03.395 INFO: Sensor VB.NET Properties [vbnet]
10:45:03.395 DEBUG: Project '(proj name and ID)': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.396 DEBUG: Project (proj name and ID)': No Roslyn issues reports have been found.
10:45:03.396 INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
10:45:03.396 INFO: Sensor JaCoCo XML Report Importer [jacoco]
10:45:03.397 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
10:45:03.398 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
10:45:03.398 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
10:45:03.398 INFO: Sensor CSS Rules [javascript]
10:45:03.398 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
10:45:03.399 INFO: Sensor CSS Rules [javascript] (done) | time=1ms
10:45:03.399 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
10:45:03.399 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
10:45:03.399 INFO: Sensor Serverless configuration file sensor [security]
10:45:03.400 INFO: 0 Serverless function entries were found in the project
10:45:03.402 INFO: 0 Serverless function handlers were kept as entrypoints
10:45:03.402 INFO: Sensor Serverless configuration file sensor [security] (done) | time=3ms
10:45:03.402 INFO: Sensor AWS SAM template file sensor [security]
10:45:03.403 DEBUG: 0 SAM template configuration files were found in the project. 0 SAM function entries were found in total. 0 were kept as potential entrypoints.
10:45:03.403 INFO: Sensor AWS SAM template file sensor [security] (done) | time=1ms
10:45:03.406 INFO: ------------- Run sensors on module (project name)
10:45:03.559 DEBUG: 'JavaSensor' skipped because there is no related file in current project
10:45:03.559 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
10:45:03.559 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'IaC CloudFormation Sensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'PL/SQL Sensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
10:45:03.560 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'HTML' skipped because there is no related file in current project
10:45:03.560 DEBUG: 'Flex' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'XML Sensor' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'Swift Code Quality and Security' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'Import of SwiftLint issues' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'gcov' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'llvm-cov' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'cppunit' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'VisualStudioCoverage' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'bullseye' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'Python Sensor' skipped because there is no related file in current project
10:45:03.561 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Code Quality and Security for Go' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
10:45:03.562 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
10:45:03.562 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'KotlinSurefireSensor' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
10:45:03.563 DEBUG: 'Import of ktlint issues' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'T-SQL Sensor' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project
10:45:03.563 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
10:45:03.563 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
10:45:03.563 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Import of RuboCop issues' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Python HTML templates processing' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'PHP sensor' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Import of PHPStan issues' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'Import of Psalm issues' skipped because there is no related file in current project
10:45:03.564 DEBUG: 'AbapSquidSensor' skipped because there is no related file in current project
10:45:03.567 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
10:45:03.568 DEBUG: Sensors : C# Project Type Information -> C# Analysis Log -> C# Properties -> Text Sensor -> VB.NET Project Type Information -> VB.NET Analysis Log -> VB.NET Properties -> JaCoCo XML Report Importer -> CSS Rules -> ThymeLeaf template sensor -> Serverless configuration file sensor -> AWS SAM template file sensor -> CFamily -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor -> PythonSecuritySensor -> JsSecuritySensor
10:45:03.568 INFO: Sensor C# Project Type Information [csharp]
10:45:03.568 INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
10:45:03.568 INFO: Sensor C# Analysis Log [csharp]
10:45:03.568 DEBUG: Project '(proj name and ID)': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.568 INFO: Sensor C# Analysis Log [csharp] (done) | time=0ms
10:45:03.568 INFO: Sensor C# Properties [csharp]
10:45:03.568 DEBUG: Project 'LRPM': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.568 DEBUG: Project '(proj name and ID)': No Roslyn issues reports have been found.
10:45:03.568 INFO: Sensor C# Properties [csharp] (done) | time=0ms
10:45:03.569 INFO: Sensor Text Sensor [text]
10:45:03.569 INFO: 0 source files to be analyzed
10:45:03.569 INFO: 0/0 source files have been analyzed
10:45:03.569 INFO: Sensor Text Sensor [text] (done) | time=0ms
10:45:03.569 INFO: Sensor VB.NET Project Type Information [vbnet]
10:45:03.569 INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
10:45:03.569 INFO: Sensor VB.NET Analysis Log [vbnet]
10:45:03.570 DEBUG: Project '(proj name and ID)': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.570 INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=1ms
10:45:03.570 INFO: Sensor VB.NET Properties [vbnet]
10:45:03.570 DEBUG: Project '(proj name and ID)': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
10:45:03.570 DEBUG: Project '(proj name and ID)': No Roslyn issues reports have been found.
10:45:03.570 INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
10:45:03.570 INFO: Sensor JaCoCo XML Report Importer [jacoco]
10:45:03.570 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
10:45:03.570 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
10:45:03.570 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
10:45:03.570 INFO: Sensor CSS Rules [javascript]
10:45:03.571 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
10:45:03.571 INFO: Sensor CSS Rules [javascript] (done) | time=1ms
10:45:03.571 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
10:45:03.571 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
10:45:03.571 INFO: Sensor Serverless configuration file sensor [security]
10:45:03.571 INFO: 0 Serverless function entries were found in the project
10:45:03.571 INFO: 0 Serverless function handlers were kept as entrypoints
10:45:03.571 INFO: Sensor Serverless configuration file sensor [security] (done) | time=0ms
10:45:03.571 INFO: Sensor AWS SAM template file sensor [security]
10:45:03.571 DEBUG: 0 SAM template configuration files were found in the project. 0 SAM function entries were found in total. 0 were kept as potential entrypoints.
10:45:03.571 INFO: Sensor AWS SAM template file sensor [security] (done) | time=0ms
10:45:03.571 INFO: Sensor CFamily [cpp]
10:45:03.573 INFO: CFamily plugin version: 6.32.0.44918
10:45:03.573 INFO: Using build-wrapper output: C:\jenkins\workspace\(path)
10:45:03.576 INFO: Available processors: 8
10:45:03.576 INFO: Using 1 thread for analysis according to value of "sonar.cfamily.threads" property.
10:45:03.577 DEBUG: Unpacking analyzer to: C:\jenkins\workspace\(path)
10:45:05.107 DEBUG: Not enough content in '(src).cpp' to have CPD blocks, it will not be part of the duplication detection
10:45:05.235 DEBUG: Not enough content in '(header).h' to have CPD blocks, it will not be part of the duplication detection
10:45:05.238 INFO: Cache is explicitly disabled: Optional[false]
10:45:05.248 INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
10:45:05.248 INFO: SE: 0 out of 0
10:45:05.248 INFO: Z3 refutation rate: 0 out of 0
10:45:05.249 INFO: Subprocess(es) done in 11ms
10:45:05.250 INFO: 0 compilation units analyzed
10:45:05.550 INFO: ------------------------------------------------------------------------
10:45:05.550 INFO: EXECUTION FAILURE
10:45:05.550 INFO: ------------------------------------------------------------------------
10:45:05.551 INFO: Total time: 8.492s
10:45:05.593 INFO: Final Memory: 28M/100M
10:45:05.593 INFO: ------------------------------------------------------------------------
10:45:05.593 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process

I am receiving the same error with the /nodeReuse:false

Hello @theo,

Could you please describe in more details what you mean by ā€œcross-compileā€? Is the code going to be built on the same machine as the one that actually runs MsBuild.exe, is is it going to be build inside a container?

The code is submitted to a windows machine, build with an out file on the windows machine, but complied for the build in a Linux environment.

The Windows environment is a physical box, the Linux environment is an ssh session within the Visual Studios build process. The Linux environment can be physical, virtual or dockerized as it is only used for native libraries.

This is built in functionality of Visual Studio and our current Software Dev workflow.

As I understood it build needs to happen on the same machine as the sonar scan, but in this context are build and compile interchangeable?

As far as I can understand, this scenario is not supported by the build wrapper. The build wrapper needs to be aware of all processes that are launched during the build, and afterwards, the analysis needs to have access to all files that are required to interpret the code.

Do you think you could generate a compilation database for this situation? This database would have to be generated from the linux point of view, and the analysis would have to be launched on a linux environment.

Otherwise, I donā€™t see an easy way to analyze this codeā€¦ I assume you have good reasons not to build directly on linux, but this kind of build architecture is more convoluted and is not something for which we have a good solution for now.

I attempted to build a comp database on the windows side and it erred out as well. I will attempt to make a build compilation in Linux.

Hello @theo,

Did it work with the Linux build?

Currently working with the development team on converting the project. Their tool chain is windows focused so taking a moment. The VS cross-compile allowed them to stay in a windows dev. tool chain. I will report when completed.

1 Like

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