which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Enterprise Edition version 9.5 (build 56709)
My environment:
Windows 10 Pro
Sonar Scanner version 4.7.0.2747
CFamily Code Quality and Security 6.34.0.48468 (cpp)
Build Wrapper Tool version 6.34
TI_CGT_C6000_7.4.12 compiler - (cl6x)
xdctools_3_24_03_33 build tool - (gmake)
what are you trying to achieve
Build my project using the build wrapper tool and scan with Sonnar Scanner to analyze source code.
what have you tried so far to achieve this
I can build my project with the build wrapper tool fine (no errors) with the following commands
gmake clean
build-wrapper-win-x86-64 --out-dir %BW_OUTPUT% gmake all
However, it fails to analyze source codes with Sonar Scanner.
It spams some errors like this.
ERROR: Exception in thread pool-1-thread-15
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code
It also generated a sonar-cfamily-reproducer.zip file that I can share privately.
I have investigated the reproducer and the issue is caused by the fact that we do not see the following macros in the compiler probe, that define the size of given types in bytes:
__SIZEOF_INT__
__SIZEOF_LONG__
__SIZEOF_LONG_LONG__
__SIZEOF_FLOAT__
__SIZEOF_DOUBLE__
__SIZEOF_LONG_DOUBLE__
In general, we do not support older versions of Texas Instrument compilers that do not provide these macros. So our recommendation would be to update the newest compiler version (8.x) and retest the analysis.
Consider closing this ticket as it fixed our problem.
We followed your suggestion to add these given types as prefix macros to our .bld file for the TI compiler. The Sonar scanner is working now without errors. I hope SonarQube will add more support for the older TI compilers.
If you didn’t see – last year we introduced support in SonarQube Server for a feature called C/C++ AutoConfig! Removing the question of supported compiler altogether.
This is available in SonarQube Server v10.6+, although you should really target at least v2025.1.