I have a fairly big C/C++ project and we have just dived into SonarQube.
I have append my build command to the build-wrapper command and that works fine.
On my local Virtual Machine it works and comes out with “returned with code: 1”.
Now I test it on my production server.
My local VM is not a replica of the production server, and the build-wrapper log ends with:
finalizing json file
returned with code: 1
From the size of the log (Comparing with the log on my local VM), I can see the build-wrapper has come almost to the end when it then bail out.
I am using build-wrapper “version”:“6.20.5”
How can I debug that ?
There are no traces of errors in the build-wrapper log or the build-wrapper-dump.json file.
I have a hard time backtracking from build-wrapper versions to SonarQube versions. What’s your SonarQube version?
Can you share the log? Redacted as necessary…
My apologies for not supplying the SQ version:
- Enterprise Edition
- Version 8.9.9 (build 56886)
The build-wrapper log for my project is huge. Almost 280 MB, yes, MegaBytes
Later that day I managed to have a successful build-wrapper session, without doing anything different, so I threw out the build-wrapper log with return code 1.
I could suspect I had too little space left on the device. It said 7.5 MB left when the build-wrapper stopped
There were no traces of No more space in the logfile.
I could see the content of the build-wrapper-dump.json file sort of ended prematurely, not listing all the files. I had a build-wrapper json from my dev environment which has gone well too, so I could use it to compare.
So I don’t leave you left with much - I know.
Is there any FAQ related to debugging if build-wrapper returns a returncode different from zero ?
Thanks for coming back with this. Unfortunately, there’s not a guide on this. TBH, it’s something that’s only recently started coming up, as far as I can tell. Maybe your case will help change that.
Thank you for reporting this. Indeed, the user experience could be improved when the disk space is insufficient.
I have created a ticket to make the error message more explicit: CPP-3738.
Have a nice day