- SonarQube Developer Edition v10.6 (92116), self-hosted, build-wrapper downloaded from the server (/static/cpp/build-wrapper-linux-x86.zip)
- I’m trying to build and analyze a C++ repository - a different repository with the same file structure works fine in this self-hosted Jenkins pipeline with the same Jenkinsfile
The actual executed command on the build executor is this:
.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output mvn -U clean install
The build wrapper is correct (has just been downloaded from the SonarQube instance and works fine with the other repository), the files and directories referenced in the paths below all exist and the user account has access to them.
Still, the build fails at this point (the build log has been truncated to remove irrelevant parts and redacted to remove sensitive information, and this already contains debug output via an -X switch added manually):
[INFO] + cd /JENKINS/workspace/[PROJECTNAME]/BRphysical/target/test-nar/test-reports
[INFO] + /JENKINS/workspace/[PROJECTNAME]/BRphysical/target/test-nar/bin/amd64-Linux-gpp/BRphysical-UTest
[DEBUG] RunCommand: /JENKINS/workspace/[PROJECTNAME]/BRphysical/target/test-nar/bin/amd64-Linux-gpp/BRphysical-UTest
[DEBUG] in: /JENKINS/workspace/[PROJECTNAME]/BRphysical/target/test-nar/test-reports
[DEBUG] with Env:
[DEBUG] 'CLASSPATH=/JENKINS/workspace/[PROJECTNAME]/BRphysical/target/test-classes:[MANY OTHER ENTRIES]:/root/.m2/repository/com/[COMPANY]/[DEPARTMENT]/[PROJECT]/libraries/Library-Poco/1.12.5-SNAPSHOT/Library-Poco-1.12.5-SNAPSHOT.nar'
[ERROR] build-wrapper: read signature: Success
build-wrapper: read signature: No such file or directory
[DEBUG] ExitValue: 1
[WARNING] com.github.maven_nar.NarUtil$2@66756662
[WARNING] com.github.maven_nar.NarUtil$1@5d14e99e
[WARNING] com.github.maven_nar.NarUtil$3@38cfecf3
95b1fb4586f3:/JENKINS/workspace/[PROJECTNAME] # [INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Black 1.0.0-SNAPSHOT:
[INFO]
[INFO] BRphysical ......................................... FAILURE [ 2.366 s]
[INFO] Black .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.972 s
[INFO] Finished at: 2024-09-13T09:37:50Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.10.1:nar-test (default-nar-test) on project BRphysical: exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.10.1:nar-test (default-nar-test) on project BRphysical: exit code: 1
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
The entries in the build-wrapper.log file don’t seem to be relevant to the problem:
Fri Sep 13 09:37:50 2024: skipping process with pid: 5689
Fri Sep 13 09:37:50 2024: process created with pid: 5689
Fri Sep 13 09:37:50 2024: parent pid: 5389
Fri Sep 13 09:37:50 2024: working directory: </JENKINS/workspace/[PROJECTNAME]>
Fri Sep 13 09:37:50 2024: executable: </usr/bin/gcc-7>
Fri Sep 13 09:37:50 2024: argv[0]: <gcc>
Fri Sep 13 09:37:50 2024: argv[1]: <-dumpmachine>
Fri Sep 13 09:37:50 2024: envp[0]: <SONAR_CFAMILY_WRAPPER_SOCKET=/tmp/build-wrapper-socket.7XqwEw>
Fri Sep 13 09:37:50 2024: envp[1]: <SONAR_CFAMILY_WRAPPER_LIBRARY=/JENKINS/workspace/[PROJECTNAME]/.sonar/build-wrapper-linux-x86/libinterceptor-${PLATFORM}.so>
Fri Sep 13 09:37:50 2024: envp[2]: <SONAR_CFAMILY_BUILD_WRAPPER_BIN=/JENKINS/workspace/[PROJECTNAME]/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64>
Fri Sep 13 09:37:50 2024: envp[3]: <MAVEN_CMD_LINE_ARGS= -X install>
Fri Sep 13 09:37:50 2024: envp[4]: <JAVACMD=/usr/lib64/jvm/jre/bin/java>
Fri Sep 13 09:37:50 2024: envp[5]: <HOSTNAME=>
Fri Sep 13 09:37:50 2024: envp[6]: <OLDPWD=/JENKINS/workspace/[PROJECTNAME]>
Fri Sep 13 09:37:50 2024: envp[7]: <GPG_TTY=/dev/pts/0>
Fri Sep 13 09:37:50 2024: envp[8]: <JAVA_HOME=/usr/lib64/jvm/jre>
Fri Sep 13 09:37:50 2024: envp[9]: <container=podman>
Fri Sep 13 09:37:50 2024: envp[10]: <PWD=/JENKINS/workspace/[PROJECTNAME]>
Fri Sep 13 09:37:50 2024: envp[11]: <HOME=/root>
Fri Sep 13 09:37:50 2024: envp[12]: <MAVEN_PROJECTBASEDIR=/JENKINS/workspace/[PROJECTNAME]>
Fri Sep 13 09:37:50 2024: envp[13]: <TERM=xterm>
Fri Sep 13 09:37:50 2024: envp[14]: <SHLVL=1>
Fri Sep 13 09:37:50 2024: envp[15]: <containers=podman>
Fri Sep 13 09:37:50 2024: envp[16]: <PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin>
Fri Sep 13 09:37:50 2024: envp[17]: <LD_PRELOAD=>
Fri Sep 13 09:37:50 2024: no candidate files could be found, there will be no entries for this command in the compdb
Fri Sep 13 09:37:50 2024: process created with pid: 5695
Fri Sep 13 09:37:50 2024: parent pid: 5389
Fri Sep 13 09:37:50 2024: working directory: </JENKINS/workspace/SIXDTD3_black_develop_2>
Fri Sep 13 09:37:50 2024: executable: </usr/lib64/jvm/java-17-openjdk-17/lib/jspawnhelper>
Fri Sep 13 09:37:50 2024: argv[0]: <131:134>
Fri Sep 13 09:37:50 2024: skipping process with pid: 5695
How could I either get more detailed logs, for example the actual path of the missing file (running Maven in debug mode with -X did not change the relevant output) or get the build to succeed?
Also, the [ERROR] … : Success line is quite confusing, but that’s an other topic.