Error during SonarQube Scan

I am using trial version of SonarQube to perform static code analysis for our source code.
Below versions of packages are used:
Latest version of Build wrapper ‘build-wrapper-win-x86-64.exe’ downloaded from SonarQube official portal.
Sonar Scanner version Used: sonar-scanner-cli-4.4.0.2170-windows

Our source code is a combination of C and C++ files and we are using Embarcadero Builder XE3 IDE. At background we are using Clang family compiler (bcc32 compiler).

We are following below steps:

  1. Build Wrapper and Sonar Scanner latest packages has been downloaded and respective paths are set in PATH environment variable
  2. New environment variable SONAR_TOKEN is created and correct Token value is set
  3. All properties are set correctly
  4. Running below two commands:
    Build Wrapper activity:
    build-wrapper-win-x86-64.exe --out-dir bw-output build command
    (Note: Build is successful, however there is issue during this build wrapper)

SonarQube scan command:
sonar-scanner.bat -D"sonar.organization=trail" -D"sonar.projectKey=XYZ" -D"sonar.sourceEncoding=UTF-8" -D"sonar.verbose=true" -D"sonar.sources=." -D"sonar.cfamily.build-wrapper-output=bw-output" -D"sonar.host.url=https://sonarcloud.io"

Issue faced:
While running build wrapper for SonarQube empty .json file is created and generated log files contains the errors like- Skipping processes for bcc32. So the build wrapper activity is not successful and subsequently execution of Sonar Scanner exe is also not successful.

In Buildwrapper logs getting below messages for every PID:
Thu Mar 04 07:48:04 2021: isWow64: 1
Thu Mar 04 07:48:04 2021: skipping process C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe with pid: 9788
Thu Mar 04 07:48:06 2021: process created with pid: 7248

As per further analysis on this issue we found that, bcc32/bcc64 compilers are not supported by SonarQube which seems to be resulting in skipping of the bcc32.exe processes and generating empty JSON file as output.

Can anyone suggest any workaround or solution for these issues. Is it true that bcc32 compiler is not supported by SonarQube?

Thanks .
Amit Yadav

Hi @ayadav1208 ,

we currently don’t support such compiler, see the related ticket: CPP-2092.

If possible I would recommend you to use a supported compiler for the analysis.

Hi, We are using sonar cloud and using Embarcadero bcc32c compiler. Our company is using sonar cloud for C# project and planning to extend to C++ projects. Can you tell when we can expect bcc32c compiler support for sonar cloud?

Hi @Jeenus_CK ,

I don’t know the ETA. Thank you for reporting your interest.

Out of curiosity, are you also using bcc32x.exe or bcc64.exe? Their support would be easier as they support Clang command-line interface.

Hi @mpaladin ,

We are using bcc32c compiler. Our current project is using bcc32 (Old borland compiler) and we are porting this to clang compiler. Win32 Clang-enhanced Compilers - RAD Studio.

Hi @Jeenus_CK ,

are you porting it to the official LLVM Clang compiler or to the Embarcadero Clang-based compiler?

Hi @mpaladin ,

We are porting our application to Embarcadero Clang-based compiler which is bcc32c.

Hi @Jeenus_CK ,

ok, thank you for the answer. Out of curiosity, why not moving to bcc32x instead which is supposed to have the same cli as Clang or GCC?

We are using C++ builder and we have an option to select “Classic Borland compiler or not” (Win32 Clang-enhanced Compilers - RAD Studio) . UI select which compiler should be used. See New in C++Builder 10.2.3: a new Win32 compiler front-end, bcc32x . We are using MSBUILD for command line build and we are not specifying the compiler.

Hi @mpaladin, Is there any further development on this issue?

Hi @Jeenus_CK ,

not yet, you can follow the jira ticket CPP-2092. We don’t have it in our plans for short term.