Build Wrapper not Populating build-wrapper-dump.json using wrenv on some projects but working on oth

I have several windriver projects I am trying to get working in Sonar Cloud. I have 2 projects that work correctly and several more projects that do not. The projects files are similar with slightly different directory trees in the build. The builds all build correctly. But Several of the projects fail sonar-scanner.bat. I don’t understand why one of the projects work correctly and others do not.
sonarRpt.log (26.6 KB) This is the log from one of the failures. What am I doing wrong?
Do you need the properties and batch file I am running to do the build and analysis?

Hi,

Assuming all these projects use the same compiler, let’s look at the error message:

java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the 
container and not wrapping the external Docker process

Are all of these^ conditions met?

And if so, how are you building? Does the build-wrapper directly wrap the compiler, or is there some intermediate layer?

 
Ann

Ann,
All of these conditions are being met. Also I have 2 projects that work correctly, and the builds are basically the same. Yes there is an intermediate layer, we are using windRiver vxWorks, so the intermediate layer is wrenv.exe. Like I said I have 2 projects that are set up the same way that both work correctly. When I compare the working and non working builds they look the same. Do you need more information, like working and non-working properties files or working and non-working build scripts?

Hi,

It certainly wouldn’t hurt to have the properties and build scripts, redacted as necessary.

 
Ann

I’ll get them cleaned up and uploaded in a little while.

1 Like

Here are all 4 a working properties and script and a nonworking properties and script
propandscritp.zip (1.9 KB)

Hi,

Unsurprisingly, I see very little difference between the two. I’ve flagged this for more expert eyes.

 
Ann

Thank you, I could not see anything obvious either.

Hi @dkerrisk, and thanks for sharing the problem with us,

To help us track down the problem, could you please share the build-wrapper.log and build-wrapper-dump.json files generated for both projects? You can find these files in the build-wrapper output directory (c:/lpro/dakScan/App and c:/lpro/dakScan/Rpt).

Let me know if you prefer to share these files in private so that I can start a thread with you.

Best regards,
Michael

Here they are in this zip
logs.zip (71.5 KB)

Hi @dkerrisk, thanks for sharing the logs,

I have identified the issue and I opened [CPP-5154] - Jira to track work on it.

Thanks again for sharing the problem with us.

Best regards,
Michael

Thank you very much. Have a great day.

Any luck finding a solution for this issue?

Hi @dkerrisk, and thanks for your question,

I am afraid we can’t provide a time commitment at the moment, but we will address the issue as soon as possible. Stay tuned!

Thanks,
Michael

1 Like

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