CppCheck plugin fails on Ubuntu 18.04

483 views
Skip to first unread message

Fabian Cenedese

unread,
Sep 20, 2018, 8:29:39 AM9/20/18
to jenkins...@googlegroups.com
Hi

I have a job that among other things uses cppcheck to examine the code.
This has worked on several systems (Ubuntu, Debian, Windows). However
I have a problem using the same job on the last Ubuntu 18.04. Here's a
snippet from a working build:

(Ubuntu 16.04, CppCheck 1.72)
[Cppcheck] Starting the cppcheck analysis.
[Cppcheck] Processing 1 files with the pattern 'cppcheck.xml'.
[Cppcheck] Not changing build status, since no threshold has been exceeded.
[Cppcheck] Ending the cppcheck analysis.

And this is what happens on Ubuntu 18.04

(Ubuntu 18.04, CppCheck 1.82)
[Cppcheck] Starting the cppcheck analysis.
[Cppcheck] Processing 1 files with the pattern 'cppcheck.xml'.
[Cppcheck] Error on cppcheck analysis: java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/inos_unittest_desktop/INOSTYPE/600205020 Linux/OPT/Debug/OS/linux/label/inos_desktop at hudson.remoting.Channel@282557ba:Ub18-04-64: java.io.IOException: Remote call on Ub18-04-64 failed
Build step 'Publish Cppcheck results' changed build result to FAILURE
Build step 'Publish Cppcheck results' marked build as failure

The cppcheck logfile looks the same, xml with version 2. So what else
could be the reason for this exception? Is there a log file on the slave
that has more information? Or can I tell the slave to output more information
to the master?

Thanks

bye Fabi

Ullrich Hafner

unread,
Sep 20, 2018, 4:02:55 PM9/20/18
to Jenkins Users
The beta release of the warnings plug-in has also support for CPPcheck now. You can try if your file works here.

https://jenkins.io/blog/2018/09/11/speaker-blog-warnings-plugin/
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20180920122925.855C736B177E%40macserver.private.
> For more options, visit https://groups.google.com/d/optout.

signature.asc

Tore Havsø Sæstad

unread,
Oct 23, 2018, 9:02:41 AM10/23/18
to Jenkins Users
Maybe you already solved this. Here is what I found after having the same problem:

It started after upgrading a slave machine to Ubuntu 18.04. In the log for the slave machine in Jenkins UI I found this error message: "java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException". The problem seems to be caused by changes to JAXB APIs in newer Java version. Read more about this here [1].

My current solution is to change Java version to 8. This is the version currently recommended by Jenkins [2]. First I listed my Java versions by running this command: "update-java-alternatives --list". Then I selected Java 8 by running "update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64". Then I restarted the slave agent from the Jenkins UI. Now my cppcheck job went back to normal again.



Regards,
Tore Havsø Sæstad

fabian

unread,
Nov 29, 2018, 5:29:23 AM11/29/18
to Jenkins Users
Not really the best solution but I guess the best one until Jenkins and plugins are Java 1.11 ready.
Thanks for the hint, I'll try that.

bye   Fabi

Reply all
Reply to author
Forward
0 new messages