Issue in C++ code analysis after upgrading to LTS 2026.5

What are you trying to accomplish?

  • Support a new language? No

  • Extend an existing one? Which one? No

  • Add language-agnostic features? No

  • Something else? yes
    I have upgraded my sonar staging instance to LTS 2026.5.2. The scan is running inside a docker container. this image was updated with sonar-scanner version 8.0.1 and with latest build-wrapper from staging instance. When the code is scanned, I am getting below error
    he compiler probe ‘stdout’ is expected to contain at least one’#define’ directive:
    [2026-10-18T23:55:30.329Z]
    [2026-10-18T23:55:30.329Z] 23:55:30.141 WARN Provided compiler is not compatible.
    [2026-10-18T23:55:30.329Z] Invalid probe found, skip analysis of files: [/work/source/FunctionGatherIRStats.cpp]
    Eventually the process skipped all .cpp files with this WARN and haven’t generated a report to upload to sonar.

    At the same time tried to scan C++ project using sonar-scanner 7.0.1 and the sonar-wrapper version in LTS(2025.1.2) which worked against running a scan in staging which is in LTS 2026.5.2. The main thing I would like to achieve is to upgrade sonarqube to latest LTS version, but I am stuck to finishe this as the latest LTS failed to scan a C++ project. I would appreciate any help to debug this. Also attached the error log here.

And, if relevant, please share the code that’s giving you problems:

sonar-error.txt (4.0 KB)

Hey @gopaji

Thanks for taking the time to report this issue

Could you share the complete scanner debug log (run with -X) and the compile_commands.json file used by the failing analysis? The attached log snippet shows that all compilation units were skipped, but it doesn’t include enough details to understand why

Let me know if you prefer to share it privately; I can start a private thread with you

Thanks,