Empty build-wrapper-dump.json when using RDP session

Good day,

At the moment we are able to perform local analysis without problems.
However, a problem arise when building C code using remote desktop protocol session (RDP) from PsExec - Windows Sysinternals | Microsoft Docs.

  • We are you using SonarQube version.
  • Windows 10 build environment.
  • We are trying to run the build simultaneously with build-wrapper.

We run this command: C:\path\PsExec.exe -s cmd.exe /c “cd /D C:\path && make new”

What we get is empty build-wrapper-dump.json file:

# (C) SonarSource SA, 2014-2021, 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.

I can provide build-wrapper.log and build.log files.
If it is not clear - I will provide more details.

Best regards,

Hi @Ovidijus ,

are you wrapping PsExec.exe with build-wrapper? If yes, this is not going to work, build-wrapper collect information from the processes created on the same system.

Note that build and analysis should be done within the same environment. So, you can either build&analyze on your system, or build&analysis should be done on the remote one, like C:\path\PsExec.exe -s cmd.exe /c “cd /D C:\path && build-wrapper --out-dir compdb make new && sonar-scanner -Dsonar.cfamily.build-wrapper-output=compdb ...”

Hello @mpaladin ,

You are right. We were wrapping PsExec.exe with build-wrapper.

Code snippet C:\path\PsExec.exe -s cmd.exe /c “cd /D C:\path && build-wrapper --out-dir compdb make new did the job well.

Greatly thank you!

1 Like

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