Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 751379 - dev-java/hamcrest-core should depend on >=virtual/jdk-1.8 instead of explicit virtual/jdk-1.8 to support openjdk-11
Summary: dev-java/hamcrest-core should depend on >=virtual/jdk-1.8 instead of explicit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL: https://gitweb.gentoo.org/repo/gentoo...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-10-26 17:50 UTC by Johannes Schmidt
Modified: 2021-03-20 08:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fails to build with openjdk:11 (build.log,62.96 KB, text/plain)
2021-03-17 10:07 UTC, Volkmar W. Pogatzki
Details
Build log of junit:4 after swithing to jdk:11 (build.log.gz,1.91 KB, application/gzip)
2021-03-18 13:21 UTC, Volkmar W. Pogatzki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schmidt 2020-10-26 17:50:21 UTC
Recently the dependencies of hamcrest-core were changed to require a minimum of jdk-1.8, however the version requirement requires exactly 1.8 instead of >=1.8 as advertised in the commit message.

This broke my setup of having openjdk-11 as the only system-vm. Since this recent change hamcrest-core tries to pull in the whole openjdk-8 stack just to build hamcrest-core.

See this commit for more info:
https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-java/hamcrest-core?id=5a4de0cb8a5a2c58023c58167b14996352461dda

Reproducible: Always
Comment 1 Dennis Schridde 2021-03-10 18:27:23 UTC
Judging from the release notes of the latest Hamcrest release (version 2.2 from 2019) there might be compatibility issues with JDK 11 in older versions: https://github.com/hamcrest/JavaHamcrest/releases
Comment 2 Dennis Schridde 2021-03-10 18:27:54 UTC
(In reply to Dennis Schridde from comment #1)
> Judging from the release notes of the latest Hamcrest release (version 2.2
> from 2019) there might be compatibility issues with JDK 11 in older
> versions: https://github.com/hamcrest/JavaHamcrest/releases

... hence a version bump might be needed: bug #775281
Comment 3 Volkmar W. Pogatzki 2021-03-17 10:07:06 UTC
Created attachment 692124 [details]
Fails to build with openjdk:11

(In reply to Johannes Schmidt from comment #0)
> Recently the dependencies of hamcrest-core were changed to require a minimum
> of jdk-1.8, however the version requirement requires exactly 1.8 instead of
> >=1.8 as advertised in the commit message.
> [...]

If you tried with openjdk:11 it would fail:
Comment 4 Volkmar W. Pogatzki 2021-03-17 17:53:48 UTC
This bug should be blocker of of bug 697014
Comment 5 Volkmar W. Pogatzki 2021-03-18 13:21:03 UTC
Created attachment 692241 [details]
Build log of junit:4 after swithing to jdk:11
Comment 6 Miroslav Šulc gentoo-dev 2021-03-18 13:27:18 UTC
&Volkmar this works for you?

JAVA_PKG_FORCE_VM=openjdk-8 emerge -va1 junit
Comment 7 Volkmar W. Pogatzki 2021-03-18 14:24:05 UTC
Comment on attachment 692241 [details]
Build log of junit:4 after swithing to jdk:11

Root cause was another change I made.  Just adjusted
Comment 8 Larry the Git Cow gentoo-dev 2021-03-20 08:29:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7eb968c34b6f4bda3d7a72f1cc8740eaea11144d

commit 7eb968c34b6f4bda3d7a72f1cc8740eaea11144d
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-03-17 17:09:50 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-03-20 08:29:19 +0000

    dev-java/hamcrest-core: jdk 11 + EAPI 7
    
    SRC_URI (:1.3) was from googlecode.com
    
    Allow jdk:11
    Closes: https://bugs.gentoo.org/751379
    
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/19981
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 .../files/hamcrest-core-1.1-java-11.patch          | 42 +++++++++++++++
 .../files/hamcrest-core-1.3-java-11.patch          | 26 ++++++++++
 dev-java/hamcrest-core/hamcrest-core-1.1-r4.ebuild | 40 +++++++++++++++
 dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild | 60 ++++++++++++++++++++++
 4 files changed, 168 insertions(+)