AnalyzerException raised during sonar-scanner on C++ files

Hello,

I get an Exception while running sonar-scanner on a C++ projects built with Bazel and build-wrapper-linux-x86-64. Build-wrapper files are generated following instructions described here: https://docs.sonarqube.org/latest/analysis/languages/cfamily/

I can send the sonar-cfamily-reproducer.zip file in private.

Version used:
Ubuntu 18.04
Gcc 8.4.0
Bazel 4.0.0
SonarQube 8.7.1.42226
SonarScanner 4.6.0.2311
CFamily plugin 6.17.0.27551

Error observed:

com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /srv/.cache/bazel/_bazel_root/6b2d616a82e3c53e2b731b04baf0fd17/execroot/binding/base/src/HeartBeat.cpp
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:81)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:78)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:655)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Steps to reproduce:
launch sonar-scanner on the project.

Thank you,
Pierre Falez

Hi @pfalez ,

I sent you a PM.

Hi @pfalez ,

thank you for the reproducer, you are affected by CPP-2696, you can get over it by adding -DBOOST_ASIO_DISABLE_NOEXCEPT to your build.

Thank you ! Scan work fine now.

Regards,
Pierre

1 Like

Hi @pfalez ,

thank you for your notification!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.