# (C) SonarSource SA, 2014-2020, info@sonarsource.com
# All SONARSOURCE programs and content are copyright protected.
# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.
#
# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.
# It may not be used in connection with any other software.
# Any other use is prohibited by law and may be grounds for immediate termination of your License.
{
"version":"6.15",
"captures":[
]}
build-wrapper.log:
Mon Mar 08 15:36:26 2021: build-wrapper, version 6.15 (linux-x86)
Mon Mar 08 15:36:26 2021: System name: Linux Nodename: 5526f3aad9e8 Release: 5.10.0-1-amd64 Version: #1 SMP Debian 5.10.4-1 (2020-12-31) Machine: x86_64
Mon Mar 08 15:36:26 2021: socket path: /tmp/build-wrapper-socket.NthDk1
Mon Mar 08 15:36:26 2021: dynamic library found: /build-wrapper/libinterceptor-i686.so
Mon Mar 08 15:36:26 2021: dynamic library found: /build-wrapper/libinterceptor-x86_64.so
Mon Mar 08 15:36:26 2021: dynamic library found: /build-wrapper/libinterceptor-haswell.so
Mon Mar 08 15:36:26 2021: command executed as: </build-wrapper/build-wrapper-linux-x86-64>
Mon Mar 08 15:36:26 2021: command line received: <./linux_build.sh>
Mon Mar 08 15:36:26 2021: env 0: <HOSTNAME=5526f3aad9e8>
Mon Mar 08 15:36:26 2021: env 1: <SONAR_BUILD_WRAPPER_OUTPUT_FOLDER=/project/sonarqube_bw_output>
Mon Mar 08 15:36:26 2021: env 2: <PWD=/project>
Mon Mar 08 15:36:26 2021: env 3: <SONAR_PROJECT_KEY=Project_KEY>
Mon Mar 08 15:36:26 2021: env 4: <CCACHE_DIR=/ccache/>
Mon Mar 08 15:36:26 2021: env 5: <SONAR_HOST_URL=https://sonarqube.mycompany.com>
Mon Mar 08 15:36:26 2021: env 6: <SONAR_CACHE=/project/sonarqube_cache>
Mon Mar 08 15:36:26 2021: env 7: <HOME=/home/docker>
Mon Mar 08 15:36:26 2021: env 8: <TERM=xterm>
Mon Mar 08 15:36:26 2021: env 9: <SHLVL=2>
Mon Mar 08 15:36:26 2021: env 10: <SONAR_OUTPUT_FOLDER=/project/sonarqube>
Mon Mar 08 15:36:26 2021: env 11: <SONAR_SOURCE_PATH=/project/>
Mon Mar 08 15:36:26 2021: env 12: <SONAR_EXCLUDE=*.html>
Mon Mar 08 15:36:26 2021: env 13: <SONAR_TOKEN=----HIDE-TOKEN---->
Mon Mar 08 15:36:26 2021: env 14: <SONAR_USER_HOME=/project/sonarqube_cache>
Mon Mar 08 15:36:26 2021: env 15: <SONAR_JOBS=4>
Mon Mar 08 15:36:26 2021: env 16: <PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin>
Mon Mar 08 15:36:26 2021: env 17: <OLDPWD=/>
Mon Mar 08 15:36:26 2021: env 18: <_=/build-wrapper/build-wrapper-linux-x86-64>
Mon Mar 08 15:36:26 2021: executing: <./linux_build.sh>
Mon Mar 08 15:36:26 2021: initializing json file
Mon Mar 08 15:36:26 2021: process created with pid: 12
Mon Mar 08 15:36:26 2021: parent pid: 11
Mon Mar 08 15:36:26 2021: working directory: </project>
Mon Mar 08 15:36:26 2021: executable: </build-wrapper/build-wrapper-linux-x86-64>
Mon Mar 08 15:36:26 2021: argv[0]: </build-wrapper/build-wrapper-linux-x86-64>
Mon Mar 08 15:36:26 2021: argv[1]: <-c>
Mon Mar 08 15:36:26 2021: argv[2]: <>
Mon Mar 08 15:36:26 2021: argv[3]: <./linux_build.sh>
Mon Mar 08 15:36:26 2021: skipping process with pid: 12
Mon Mar 08 15:36:26 2021: process created with pid: 13
Mon Mar 08 15:36:26 2021: parent pid: 12
Mon Mar 08 15:36:26 2021: working directory: </project>
Mon Mar 08 15:36:26 2021: executable: </bin/bash>
Mon Mar 08 15:36:26 2021: argv[0]: </bin/bash>
Mon Mar 08 15:36:26 2021: argv[1]: <./linux_build.sh>
Mon Mar 08 15:36:26 2021: skipping process with pid: 13
Mon Mar 08 15:36:26 2021: process created with pid: 14
Mon Mar 08 15:36:26 2021: parent pid: 13
Mon Mar 08 15:36:26 2021: working directory: </project>
Mon Mar 08 15:36:26 2021: executable: </bin/date>
Mon Mar 08 15:36:26 2021: argv[0]: <date>
Mon Mar 08 15:36:26 2021: argv[1]: <+%H:%M:%S>
Mon Mar 08 15:36:26 2021: skipping process with pid: 14
Mon Mar 08 15:36:26 2021: process created with pid: 15
Mon Mar 08 15:36:26 2021: parent pid: 13
Mon Mar 08 15:36:26 2021: working directory: </project>
Mon Mar 08 15:36:26 2021: executable: </usr/bin/basename>
Mon Mar 08 15:36:26 2021: argv[0]: <basename>
Mon Mar 08 15:36:26 2021: argv[1]: <./linux_build.sh>
Mon Mar 08 15:36:26 2021: skipping process with pid: 15
Mon Mar 08 15:36:26 2021: process created with pid: 16
Mon Mar 08 15:36:26 2021: parent pid: 13
Mon Mar 08 15:36:26 2021: working directory: </project>
Mon Mar 08 15:36:26 2021: executable: </usr/bin/rsync>
Mon Mar 08 15:36:26 2021: argv[0]: <rsync>
Mon Mar 08 15:36:26 2021: argv[1]: <-rltgoDv>
Mon Mar 08 15:36:26 2021: argv[2]: </home/docker/>
Mon Mar 08 15:36:26 2021: argv[3]: </project/home/>
Mon Mar 08 15:36:26 2021: skipping process with pid: 16
Mon Mar 08 15:36:34 2021: process created with pid: 19
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </bin/cp>
Mon Mar 08 15:36:34 2021: argv[0]: <cp>
Mon Mar 08 15:36:34 2021: argv[1]: </project/patched_files/main.cpp>
Mon Mar 08 15:36:34 2021: argv[2]: <./home/.arduino15/packages/esp32/hardware/esp32/1.0.5/cores/esp32/main.cpp>
Mon Mar 08 15:36:34 2021: skipping process with pid: 19
Mon Mar 08 15:36:34 2021: process created with pid: 20
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </bin/date>
Mon Mar 08 15:36:34 2021: argv[0]: <date>
Mon Mar 08 15:36:34 2021: argv[1]: <+%H:%M:%S>
Mon Mar 08 15:36:34 2021: skipping process with pid: 20
Mon Mar 08 15:36:34 2021: process created with pid: 21
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </usr/bin/basename>
Mon Mar 08 15:36:34 2021: argv[0]: <basename>
Mon Mar 08 15:36:34 2021: argv[1]: <./linux_build.sh>
Mon Mar 08 15:36:34 2021: skipping process with pid: 21
Mon Mar 08 15:36:34 2021: process created with pid: 22
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </bin/date>
Mon Mar 08 15:36:34 2021: argv[0]: <date>
Mon Mar 08 15:36:34 2021: argv[1]: <+%H:%M:%S>
Mon Mar 08 15:36:34 2021: skipping process with pid: 22
Mon Mar 08 15:36:34 2021: process created with pid: 23
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </usr/bin/basename>
Mon Mar 08 15:36:34 2021: argv[0]: <basename>
Mon Mar 08 15:36:34 2021: argv[1]: <./linux_build.sh>
Mon Mar 08 15:36:34 2021: skipping process with pid: 23
Mon Mar 08 15:36:34 2021: process created with pid: 24
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </bin/rm>
Mon Mar 08 15:36:34 2021: argv[0]: <rm>
Mon Mar 08 15:36:34 2021: argv[1]: <-rf>
Mon Mar 08 15:36:34 2021: argv[2]: </project/obj>
Mon Mar 08 15:36:34 2021: skipping process with pid: 24
Mon Mar 08 15:36:34 2021: process created with pid: 25
Mon Mar 08 15:36:34 2021: parent pid: 13
Mon Mar 08 15:36:34 2021: working directory: </project>
Mon Mar 08 15:36:34 2021: executable: </bin/arduino-cli>
Mon Mar 08 15:36:34 2021: argv[0]: <arduino-cli>
Mon Mar 08 15:36:34 2021: argv[1]: <compile>
Mon Mar 08 15:36:34 2021: argv[2]: <--build-cache-path>
Mon Mar 08 15:36:34 2021: argv[3]: </project/cache>
Mon Mar 08 15:36:34 2021: argv[4]: <--build-path>
Mon Mar 08 15:36:34 2021: argv[5]: </project/obj>
Mon Mar 08 15:36:34 2021: argv[6]: <--output-dir>
Mon Mar 08 15:36:34 2021: argv[7]: </project/bin>
Mon Mar 08 15:36:34 2021: argv[8]: <--fqbn>
Mon Mar 08 15:36:34 2021: argv[9]: <esp32:esp32:esp32wrover:PartitionScheme=default,FlashMode=qio,FlashFreq=80,UploadSpeed=921600,DebugLevel=verbose>
Mon Mar 08 15:36:34 2021: argv[10]: <project.ino>
Mon Mar 08 15:36:34 2021: skipping process with pid: 25
Mon Mar 08 15:36:55 2021: process created with pid: 483
Mon Mar 08 15:36:55 2021: parent pid: 13
Mon Mar 08 15:36:55 2021: working directory: </project>
Mon Mar 08 15:36:55 2021: executable: </bin/date>
Mon Mar 08 15:36:55 2021: argv[0]: <date>
Mon Mar 08 15:36:55 2021: argv[1]: <+%H:%M:%S>
Mon Mar 08 15:36:55 2021: skipping process with pid: 483
Mon Mar 08 15:36:55 2021: process created with pid: 484
Mon Mar 08 15:36:55 2021: parent pid: 13
Mon Mar 08 15:36:55 2021: working directory: </project>
Mon Mar 08 15:36:55 2021: executable: </usr/bin/basename>
Mon Mar 08 15:36:55 2021: argv[0]: <basename>
Mon Mar 08 15:36:55 2021: argv[1]: <./linux_build.sh>
Mon Mar 08 15:36:55 2021: skipping process with pid: 484
Mon Mar 08 15:36:55 2021: finalizing json file
Mon Mar 08 15:36:55 2021: returned with code: 0
I did not launch sonar-scanner as the first step contains no files.
from the log it seems that the /bin/arduino-cli is not invoking the compiler. Could you make sure it is running a clean build and all files get compiled?
The compiler is definitely called, the binary is created with correct date … Else I wouldn’t ask such question.
In my script, I first delete the compiled folders :
the skipped in this context means it is not going to build-wrapper-dump.json, it doesn’t mean that the process is not injected with the dynamic library.
Is this binary statically linked? If yes that is the reason why the process doesn’t appear in the build-wrapper logs and json.
then if you are sure that you’re doing everything correct and you can share your dockerfile/script with a helloworld project I can try to reproduce it on my side.
thank you for the reproducer. I gave a look at it and actually discovered that arduino-cli finally implemented compilation database generation. A file named compile_commands.json file gets generated into --build-path=.
Our analyzer still doesn’t offer official support for the compilation database, we are going to add it in few months. In the meantime, we provide a script to convert the compilation database into build-wrapper-dump.json file, you can have a look at the ticket: https://jira.sonarsource.com/browse/CPP-1428. This is the way I would recommend you to use to configure our analyzer.