which versions are you using (build-wrapper-linux-x86-64 with and without SonarQube docker sonarsource/sonar-scanner-cli)
what are you trying to achieve - get build-wrapper-linux-x86-64 to work
what have you tried so far to achieve this:
In docker images: sonarsource/sonar-scanner-cli and uppoints/docker-java-gcc I extract build-wrapper-linux-x86.zip and place all the files into a directory. I chmod +x build-wrapper-linux-x86-64
When I run build-wrapper-linux-x86-64 the following error output displays:
build-wrapper-linux-x86/build-wrapper-linux-x86-64: line 1: {message:401 Unauthorized}: command not found
What is Unauthorized? What is ‘not found’? There is no log file or any output. The build-wrapper-linux-x86-64 just fails with the above output. Help is appreciated.
Thank you for responding. There are no .log or .json files output. The ‘build-wrapper-linux-x86-64’ seems to just terminate with that cryptic message. I wish there was documentation on the build-wrapper-linux-x86-64 program itself? I only know of the --out-dir arg.
I see no log files at all. Where would these job/console log be? I am calling build-wrapper-linux-x86-64 from a GitLab CI Pipeline script. I can send the output from that. Still hoping you can help me. Thanks. buildwrapperfail.txt (3.1 KB)
The thing is, that a 401 is presumably a web server error. I wouldn’t expect the build-wrapper to be making any web calls. That’s why I wanted to see the build-wrapper command.
The ‘line 1’ in this error is a bit suspicious:
/builds/foofoo/foosea/build-wrapper-linux-x86/build-wrapper-linux-x86-64: line 1: {message:401 Unauthorized}: command not found
Since the build-wrapper is a compiled executable, I wouldn’t expect a line number to be reported. Are you sure there’s not a script in there that got named ‘build-wrapper’ that in turn calls the compiled build-wrapper downloaded from your server?
I am sure there is no script calling the executable, the executable is called directly: /builds/foofoo/foosea/build-wrapper-linux-x86/build-wrapper-linux-x86-64
And the files in that directory listed in the gitlab ci:
-rwxr-xr-x 1 100 101 30 Dec 1 18:46 build-wrapper-linux-x86-64
-rw-r–r-- 1 100 101 30 Dec 1 18:46 libinterceptor-haswell.so
-rw-r–r-- 1 100 101 30 Dec 1 18:46 libinterceptor-i686.so
-rw-r–r-- 1 100 101 30 Dec 1 18:46 libinterceptor-x86_64.so
But I understand what you are saying and I agree. I may try outside of a ci pipeline and see what happens. thanks for trying to help.
currently not using ‘make’ but I could. the same error occurs with the above command. I kept stripping it down and got the same error and ended up with just the command.
the g++ by itself works fine.
Please keep thinking of what it could be thanks.
Unfortunately, the SonarScanner CLI Docker image does not support analysis of C++ projects.
(See the explanation in SonarQube documentation > Important Notes).
If you are willing to modify your configuration to use the “regular” SonarScanner and have still trouble with the build-wrapper, I will be happy to help.
Hello, What do you mean by modify my configuration to use the “regular” SonarScanner? Do you mean running the sonarscanner command from a Linux terminal?
Is there anyway to call the “regular” SonarScanner from a GitLab CI pipeline script?
The SonarScanner Docker image is meant to be used in a Docker image. But we don’t support the analysis of C or C++ projects in Docker images.
So by “modify your configuration”, I meant not doing the build wrapper with the build nor the analysis in a Docker image.