Hello,
I try to analyse a project and I applied the following steps, eventually I have ‘“build-wrapper-dump.json” file was found empty’ error. However, I can see that the file has a content (whether it is meaningful or not) Would you please help me?
-
I change the memory use for SonarQube since otherwise it fails with the error
java.lang.OutOfMemoryError: Java heap space
:
# export SONAR_SCANNER_OPTS="-Xmx16384m -XX:MaxPermSize=16384m -XX:ReservedCodeCacheSize=2048m
-
I run the following line to use a script to use the wrapper (compile.sh has source, lunch and build commands that use make, the script compiles the project successfully):
# ../build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bwoutput ../compile.sh
-
I run the following command with the correct values that I got from SonarQube server:
../sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner -Dsonar.projectKey=<key_info> -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bwoutput -Dsonar.host.url=http://sonarqubetestserver -Dsonar.login=<value> -Dsonar.cfamily.threads=4 -X
-
After a long analysis, I get the following error:
Error during SonarScanner execution
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
Thank you
Versions:
# make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
# ./sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner --version
INFO: Scanner configuration file: /home/sonar-scanner-4.7.0.2747-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Linux 5.4.0-124-generic amd64
# ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --version
build-wrapper, version 6.32 (linux-x86)
Copyright (C) 2014-2022 SonarSource SA, info@sonarsource.com
Usage: ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir <output directory> <build command>