which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
SonarQube Server * Enterprise Edition v2025.1 (102418)
SonarScanner 5.0.1.3006
how is SonarQube deployed: zip, Docker, Helm
Docker
what are you trying to achieve
I’m try to analyze C++ code using compilation database
what have you tried so far to achieve this
For my testing I build a simple project code cpp use cmake to generate the Compilation file
but the scanner failed
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)! sonarscanner.log (29.2 KB)
From what I see, /usr/bin/c++ is gcc. It is odd probing it times out.
Can you confirm the following command runs on the same machine than the scanner? Do if before the scanner but after the compilation.
time /usr/bin/c++ -x c++ --std gnu++11 -v -dM -E - < /dev/null
How long does it take to run?
And, while on it, is the build running on hardware, container, VM…? Which OS is it?
That message is intended for compilers that need a license, which isn’t the case.
Sometimes it triggers in macos when Rosetta is involved, but shouldn’t apply either.
Can you share the docker image you are using, so I can try to reproduce?
Thanks for your help, I have requested a container based on a distribution that uses glibc, meanwhile I’m trying another solution using AutoConfig to analyze my simpte C++ project with code smells.
But I have an issue this time sonarqube doesn’t detect any of the issues in the code(0 Security, 0 Reliability; 0 Maintainability, 0 Security Hotspots) sonar_scanner.log (9.7 KB)
Do you have any idea why it doesn’t work correctly?
These logs seem to be the same as the one above, it is using compilation database (plus, the URL is the same, so I imagine discuss has de-duplicated the file)