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)
There’s no need to explicitly support musl. Just avoid using non-POSIX features from glibc — I believe it’s being linked accidentally.
Also, Alpine provides a small compatibility layer for glibc, but it’s still not sufficient in this case:
Please reduce the reliance on hardcoded glibc usage. This shouldn’t be a major task.
$ ldd subprocess
/lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
libseam.so => ./libseam.so (0x7f973d3ac000)
libz.so.1 => /usr/lib/libz.so.1 (0x7f973d391000)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f974248e000)
ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f973d38a000)
Error relocating subprocess: strtoll_l: symbol not found
Error relocating subprocess: strtoull_l: symbol not found
Error relocating subprocess: mallinfo: symbol not found
Error relocating subprocess: backtrace: symbol not found
Error relocating subprocess: __register_atfork: symbol not found
Thanks for the detailed report. We had tried gcompat in the past and found the same issues as you: not all symbols we link against are provided by it. However, these dependencies are indirect, so removing them is not an immediately obvious fix.
Nonetheless, I have linked your comment to the relevant ticket to give it more weight: