Bug 1548735

Summary: closure-compiler crashes in Fedora 28 and rawhide
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: closure-compilerAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: mat.booth, tom, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: closure-compiler-20160315-5.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-30 12:48:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mattias Ellert 2018-02-24 16:01:50 UTC
Description of problem:

I tried to update a package that uses the closure compiler to minify a js script file. The build was successful on Fedora 26 ans 27, but in Fedora 28 and rawhide the build failed due to the closure compiler crashing.

Version-Release number of selected component (if applicable):

closure-compiler.noarch 20160315-4.fc28

How reproducible:
I tried the rawhide build three times and it crashed every time.

Steps to Reproduce:
1. build js-jsroot on Fedora 28 or rawhide

Actual results:

/usr/bin/build-classpath: Could not find js Java extension for this JVM
/usr/bin/build-classpath: Could not find guava Java extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList
	at com.google.javascript.jscomp.AbstractCommandLineRunner.<clinit>(AbstractCommandLineRunner.java:138)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableList
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 1 more

Expected results:

No crash

Additional info:

Failing builds F28 and rawhide:

https://koji.fedoraproject.org/koji/buildinfo?buildID=1049758
https://koji.fedoraproject.org/koji/buildinfo?buildID=1049764

Successful builds F26 and F27

https://koji.fedoraproject.org/koji/buildinfo?buildID=1049757
https://koji.fedoraproject.org/koji/buildinfo?buildID=1049756

Comment 1 Mattias Ellert 2018-02-24 18:19:30 UTC
closure-compiler.noarch 20160315-4.fc28 says:

Requires: mvn(com.google.guava:guava:19.0)

I.e. it explicitly request version 19.0.

It also says in its spec file:

%jpackage_script ... "" "" ...:guava:... %{name} true

The above requires is fulfilled by the guava20-20.0-3.fc28 package that

Provides: mvn(com.google.guava:guava:19.0) = 20.0

However, this package contains /usr/share/java/guava20/guava-20.0.jar. So if this jar should be used the argument to %jpackage_script should be ...:guava20:... instead.

The wrapper as it currently is would find /usr/share/java/guava/guava.jar, which would be installed by guava-24.0-2.fc28. However, this package in not installed as a dependency of the closure-compiler package since it

Provides: mvn(com.google.guava:guava) = 24.0.jre

which doesn't match the requires.

The closure-compiler package should either change it's requires and not request the specific 19.0 version (and then keep using ...:guava:... in the wrapper), or change the wrapper to use ...:guava20:... (and then keep requesting the explicit version in the requires).

Comment 2 Mattias Ellert 2018-03-04 18:25:07 UTC
Any progress?

Comment 3 Tom Hughes 2018-03-04 18:33:20 UTC
Adding in Mat Booth as he seems to have been the one that changed the guava dependencies in https://src.fedoraproject.org/rpms/closure-compiler/c/9fa0645015d9d1ad24bcede3ab63cd4b0c25a17d?branch=master.

Comment 4 Fedora Update System 2018-03-09 17:42:23 UTC
closure-compiler-20160315-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1a0ecc1886

Comment 5 Fedora Update System 2018-03-09 23:26:51 UTC
closure-compiler-20160315-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1a0ecc1886

Comment 6 Fedora Update System 2018-03-30 12:48:21 UTC
closure-compiler-20160315-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.