Build-wrapper empty for c++ on linux

I have been struggling with this. I have the following versions

  • build-wrapper-linux-x86 - build-wrapper, version 6.9 (linux-x86)
  • Ubuntu 18.04
  • sonarqube-developer-
  • SonarScanner
  • Java 11.0.3 AdoptOpenJDK (64-bit)

I have run the following to compile, but still leaves build-wrapper-dump.json empty

**build-wrapper-linux-x86-64 --out-dir /opt/builddir sudo ./ **

** 161 mkdir build**
** 162 cd build**
** 163 build-wrapper-linux-x86-64 --out-dir /opt/builddir sudo …/configure**
** 164 build-wrapper-linux-x86-64 --out-dir /opt/builddir sudo make clean all**
** 165 build-wrapper-linux-x86-64 --out-dir /opt/builddir sudo make check**

Excerpts from build-wrapper.log
Sun Jun 28 16:59:44 2020: executable: </opt/build-wrapper-linux-x86/build-wrapper-linux-x86-64>
Sun Jun 28 16:59:44 2020: argv[0]:
Sun Jun 28 16:59:44 2020: argv[1]: <-c>
Sun Jun 28 16:59:44 2020: argv[2]: <>
Sun Jun 28 16:59:44 2020: argv[3]:
Sun Jun 28 16:59:44 2020: argv[4]:
Sun Jun 28 16:59:44 2020: argv[5]:
Sun Jun 28 16:59:44 2020: skipping process with pid: 24904
Sun Jun 28 17:00:10 2020: finalizing json file
Sun Jun 28 17:00:10 2020: returned with code: 2

I have checked settings, permissions. My trial license will expire soon and need to ensure I can get this working and desired results are achieved before we purchase.

Hello @binie,
First, you only have to call build-wrapper once with the build command instead of 3 times.
Second, sudo shouldn’t be passed to build-wrapper.

So following the build commands that you provided it should be something like that:

sudo ./
mkdir build
cd build
sudo ../configure
sudo build-wrapper-linux-x86-64 --out-dir /opt/builddir make clean all
sudo make check

If this still fails please can you upload the full build-wrapper log file directly after executing these commands?

1 Like

many thanks @Abbas_Sabra. The build-wrapper file gets created but is still empty.

I do notice that one of the functional test fails when I do a make check. Will this affect data being written to build-wrapper. I am trying to get the developers to look at this.
build-wrapperlog.txt (4.6 KB)

in addition, the following command comes back with an unknown command -
sudo build-wrapper-linux-x86-64 --out-dir /opt/builddir make clean all

I have to run it as
build-wrapper-linux-x86-64 --out-dir /opt/builddir sudo make clean all

you cannot pass sudo to build-wrapper. Do you really need sudo to build your project?
try build-wrapper-linux-x86-64 --out-dir /opt/builddir make clean all

1 Like

:blush: looks like that has fixed it. Thanks a lot. I have started the scan now; I’ll keep you updated. Many thanks for your help @Abbas_Sabra

1 Like

@Abbas_Sabra Thanks for all your help; I was able to get this to scan same code on ubuntu 18.04 and 20.04. We’ll move on to the next phase of getting justification :wave:t4: :muscle:t4:

1 Like

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