The build-wrapper-dump.json is empty on sonarqube 7.7

I have a problem with the C/C++ commercial plugin on sonarqube 7.7 developer version.
Our build is on Red Hat Enterprise Linux server release 7.4 with gcc 4.8.5.
The build wrapper, extracted from sonarqube, is 6.1 version.
The build command:

/share/homes/bamboo/build-wrapper-6.1/build-wrapper-linux-x86-64 --out-dir sonar make -C stdlib clean all

The sonar-project.properties file:

Required metadata

sonar.projectKey=Cortex:c-s_donedone_ora-stdlib-ukbidpplx01
sonar.projectName=C :: s_donedone_ora :: stdlib :: ukbidpplx01
sonar.projectVersion=donedone

Comma-separated paths to directories with sources (required)

sonar.sources=stdlib,include

The build-wrapper output dir

sonar.cfamily.build-wrapper-output=/cortex/build/product/s_donedone_ora/modules/common/src/sonar

Encoding of the source files

sonar.sourceEncoding=US-ASCII

The files are being compiled but there is nothing in the build-wrapper-dump.json file:

© SonarSource SA, 2014-2019, 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”:0,
“captures”:[
]}

The scan only contains duplication checks but I guess this is because the json file is empty.

I tried to use the build wrapper output from 5.4 but it does not work with the scanner from 7.7
I tried the build command directly in the source directory (without the -C option in the make command) and it does not make any difference. The build-wrapper-dump.json is still empty.

Documentation does not defines any additional parameters and I am stuck.

We also have sonarqube 5.4 and all is working as it should.

Hi @Mirek,

what compiler are you using for your project?

Our build is on Red Hat Enterprise Linux server release 7.4 with gcc 4.8.5.

Hello @Mirek,

could you please share with me privately the build-wrapper.log and build-wrapper-dump.json files? I am sending you a PM where you can share.

For the records, the issue comes from the fact that in some shared configuration scripts LD_PRELOAD_64 environment variable was set taking priority to LD_PRELOAD which is used by build-wrapper to catch compiler execution configurations. Unsetting LD_PRELOAD_64 environment variable fix the issue.

Hi, I’m having a similar issue. I can see in the log that compilation commands are captured, but the json file is empty. I’ve checked and I’m not setting LD_PRELOAD_64.

I’m using gcc in amazonlinux:

$ gcc --version
gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hello @Jose_Santos,

Could you please create a dedicated thread for your issue? We’ll also need the build wrapper log to understand what happens.

Thanks for your quick response. I’ve created a new thread here Empty build-wrapper-dump.json when runing on amazonlinux