Running SonarQube analysis scan - SonarSource build-wrapper
Solution 1
To solve this issue, download the Build Wrapper directly from your SonarQube Server, so that its version perfectly matches your version of the plugin:
Build Wrapper for Linux can be downloaded from URL
http://localhost:9000/static/cpp/build-wrapper-linux-x86.zip
Unzip the downloaded Build Wrapper, Configure it in your PATH because it's just more convenient
export PATH=$PATH:/path/where/you/unzip
Once done, Run below commands.
build-wrapper-linux-x86-64 --out-dir <dir-name> <build-command>
build-wrapper-linux-x86-64 --out-dir build_output make clean all
Once all this done, you have to modify your sonar-project.properties file with following line. Note the dir-name is same directory which we defined in previous command.
sonar.cfamily.build-wrapper-output=<dir-name>
and then you can run the sonar scanner command.
sonar-scanner
this will do the analysis against your code. For more details, you can check this link.
Solution 2
Contacted support, turns out this was caused by missing the argument sonar.cfamily.build-wrapper-output in the scanner begin command.
Solution 3
Build wrapper downloads:
https://binaries.sonarsource.com/CommercialDistribution/sonar-cpp-plugin/
Some links covering how to run the build wrapper:
- https://blog.sonarsource.com/with-great-power-comes-great-configuration/
- https://docs.sonarqube.org/pages/viewpage.action?pageId=7996665
DoruF
Updated on June 07, 2022Comments
-
DoruF almost 2 years
I'm new to running SonarQube scans and I get this error message in the log in Jenkins:
16:17:39 16:17:36.926 ERROR - The only way to get an accurate analysis of your C/C++/Objective-C project is by using the SonarSource build-wrapper. If for any reason, the use of the build-wrapper is not possible on your project, you can bypass it with the help of the "sonar.cfamily.build-wrapper-output.bypass=true" property. By using that property, you'll switch to an "at best" mode that could result in false-positives and false-negatives.
Can someone please advise where I can find and run this SonarSource build-wrapper?
Thanks a lot for your help!
-
Werner Altewischer about 6 yearsI get the following error (probably related to the lack of a valid signature) dyld: warning: could not load inserted library 'libinterceptor.dylib' into library validated process because no suitable image found. Did find: libinterceptor.dylib: code signing blocked mmap() of 'libinterceptor.dylib' libinterceptor.dylib: stat() failed with errno=1
-
Abhijeet Kamble about 6 years@WernerAltewischer not faced this issue .. need to check about this.
-
Hans van der Laan over 5 yearsUnfortunatly the wrapper download is down. The download link gives the error: "Repository path missing or not specified."
-
jjlin over 5 years@HansvanderLaan Updated the download link.
-
Praveenkumar about 5 yearsexport part saved my day. Actually, this wasn't mentioned properly in the sonarqube documentation.