After upgrading SQ from 8.9 to 9.3, problems occurred in scanning C language

After upgrading 9.3, Build-Wrapper and SonarScanner plug-ins have also been updated accordingly. After completing the compilation phase, a non empty json file is generated, but an error occurs in the scanning phase.

Environmental information:SQ9.3,Sonar-Scanner4.7,Windows10.

To add, there was no problem in scanning these codes before. Not long ago, after we upgraded from 8.9 to 9.3, the scanning failed.

The content in sonar-project.properties is:

C:\sonar-scanner-4.7.0.2747-windows\bin\sonar-scanner.bat -e -D sonar.host.url=htt/ `
 -D sonar.cfamily.threads=8 `
 -D sonar.projectKey=PCViewer `
 -D sonar.projectName=PCViewer `
 -D sonar.scm.disabled=true -D sonar.sourceEncoding=UTF-8 -D sonar.version=1.0 `
 -D sonar.sources=. `
 -D sonar.cfamily.build-wrapper-output=./_client/sonar-build `
 -D sonar.exclusions="./_client"

Hey there.

v9.3 came out almost a year ago (January 2022), and is EOL. I would recommend upgrading to v9.7 and let us know if you still face an issue.

1 Like

Hello,@Colin
I have upgraded to v9.7, but I still have the same problem. I can provide a log of the scanner.




Hey there.

Please don’t share screenshots of logs – text-based logs are much preferred.

It looks like while you face some trouble not having NodeJS installed (required for analyzing javascript files)… there’s no error present in the screenshot similar to the one you shared before. How do the logs end?

Hey @Colin ,

I am very sorry that it is inconvenient for you to read the screenshots when you help solve my problem(The company asked not to provide text materials. I tried to extract the text in the screenshots, but the results were not accurate enough).
What’s more, I am sorry that I did not check whether the uploaded screenshots was successful and then sent it out. As a result, it looks incomplete.

The error part is only the NodeJS part, and there are several more ‘/openmp’ warning.
I will send some screenshots starting from error again. The previous part has already been sent.





I’m sorry to bother you again. Please tell me how to solve this problem.

Best,
Kevin

Hey there.

It looks like all your files are ignored because they use the /openmp compiler flag. Take a look at this thread:

https://community.sonarsource.com/t/openmp-support-or-better-solution-for-openmp-users/59719?u=colin

Hello,@Colin
Our other c++projects with openmp do not have similar problems when compiling code and scanning with gcc 9.3 on linux.

Is this problem specific to the windows platform using visual studio?