Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Eclipse Temurin™ for native distributions #40

Closed
christoff-buerger opened this issue Jul 12, 2024 · 2 comments
Closed

use Eclipse Temurin™ for native distributions #40

christoff-buerger opened this issue Jul 12, 2024 · 2 comments
Assignees

Comments

@christoff-buerger
Copy link
Owner

christoff-buerger commented Jul 12, 2024

To build any distribution (i.e., the jar and native macOS and Windows distributions) the same JDK/JRE should be used. Only open source licensed JDKs/JREs that can be used by an MIT licensed product (i.e., are compatible with the pmChess license) are suited.

A good candidate is the IBM Semeru Runtime Open Edition. The IBM Semeru Runtimes are free production-ready binaries built with the OpenJDK class libraries and the Eclipse OpenJ9 JVM. The version fitting for our current build process (cf. issue #38) is IBM Semeru Runtime Open Edition 21.0.3.0 with OpenJDK 21.0.3+9 and OpenJ9 0.44.0

Since the runtime libraries are bundled/included in the native distributions, their licenses (i.e., the license of the IBM Semeru Runtime Open Edition) has to be added to the licenses overview in the About dialog of pmChess.

Update (2024-11-24)

Due to issues of the IBM Semeru Runtime Open Edition with jlink (see next comment below), Eclipse Temurin™ from the Adoptium Working Group shall be used instead; the latest LTS version is 21.0.5+11.

@christoff-buerger christoff-buerger self-assigned this Jul 12, 2024
@christoff-buerger christoff-buerger changed the title Use IBM Semeru Runtime Open Edition for native distributions use IBM Semeru Runtime Open Edition for native distributions Jul 12, 2024
@christoff-buerger
Copy link
Owner Author

christoff-buerger commented Aug 10, 2024

jlink of IBM Semeru Runtime Open Edition 21.0.3.0 is broken on macOS (we use jlink for the native Windows and macOS distributions, see issue #3 and #14):

Buildfile: /Users/cbuerger/Documents/development/pmChess/builds/build.xml

clean:
   [delete] Deleting directory /Users/cbuerger/Documents/development/pmChess/builds/binaries
   [delete] Deleting directory /Users/cbuerger/Documents/development/pmChess/builds/portable-jar
   [delete] Deleting directory /Users/cbuerger/Documents/development/pmChess/builds/macOS/pmChess.app/Contents/Resources/pmChess
   [delete] Deleting: /Users/cbuerger/Documents/development/pmChess/releases/version-2.0.0/pmChess 2.0.0 – portable jar.zip
   [delete] Deleting: /Users/cbuerger/Documents/development/pmChess/releases/version-2.0.0/pmChess 2.0.0 – macOS x86_64.zip

binaries:
    [mkdir] Created dir: /Users/cbuerger/Documents/development/pmChess/builds/binaries
    [javac] Compiling 11 source files to /Users/cbuerger/Documents/development/pmChess/builds/binaries
    [javac] Ignoring source, target and bootclasspath as release has been set
     [copy] Copying 3 files to /Users/cbuerger/Documents/development/pmChess/builds/binaries/pmchess/gui/icons
     [copy] Copying 25 files to /Users/cbuerger/Documents/development/pmChess/builds/binaries/pmchess/gui/logo
     [copy] Copying 11 files to /Users/cbuerger/Documents/development/pmChess/builds/binaries/pmchess/gui/fonts
     [copy] Copying 1 file to /Users/cbuerger/Documents/development/pmChess/builds/binaries/pmchess/gui
     [copy] Copying 1 file to /Users/cbuerger/Documents/development/pmChess/builds/binaries/pmchess/gui

distributions:
      [jar] Building jar: /Users/cbuerger/Documents/development/pmChess/builds/portable-jar/pmChess.jar
     [jmod] Created /Users/cbuerger/Documents/development/pmChess/builds/portable-jar/pmChess.jmod

BUILD FAILED
/Users/cbuerger/Documents/development/pmChess/builds/build.xml:169: jlink failed (exit code 1), output is: Error: Hash of java.xml (a3049502038bd502c113e1cd6baf6e0d4f47c0d70440f639ccf3b8077d7571c1) differs to expected hash (59855fad5118df27f76cd5ee0bbb38140c0d85df47c097f2e1a239972eea3ad2) recorded in java.base
java.lang.module.FindException: Hash of java.xml (a3049502038bd502c113e1cd6baf6e0d4f47c0d70440f639ccf3b8077d7571c1) differs to expected hash (59855fad5118df27f76cd5ee0bbb38140c0d85df47c097f2e1a239972eea3ad2) recorded in java.base
	at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)
	at java.base/java.lang.module.Resolver.checkHashes(Resolver.java:480)
	at java.base/java.lang.module.Resolver.finish(Resolver.java:378)
	at java.base/java.lang.module.Configuration.<init>(Configuration.java:139)
	at java.base/java.lang.module.Configuration.resolve(Configuration.java:422)
	at java.base/java.lang.module.Configuration.resolve(Configuration.java:254)
	at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:217)
	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:523)
	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:411)
	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:286)
	at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:56)
	at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:73)
	at java.base/java.util.spi.ToolProvider.run(ToolProvider.java:162)
	at org.apache.tools.ant.taskdefs.modules.Link.execute(Link.java:1951)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
	at org.apache.tools.ant.Task.perform(Task.java:350)
	at org.apache.tools.ant.Target.execute(Target.java:449)
	at org.apache.tools.ant.Target.performTasks(Target.java:470)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
	at org.apache.tools.ant.Main.runBuild(Main.java:818)
	at org.apache.tools.ant.Main.startAnt(Main.java:223)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)


Total time: 9 seconds

Looks like they sign the jmods used for linking after compiling them, which in turn changes their hashes, which are checked against the original hashs encoded in the compiled code.

This issue is known since three years (see issue 3 on their issue tracker)! Inaccaptable for an LTS.

I will drop IBM Semeru Runtime Open Edition and instead go for Eclipse Temurin™ from the Adoptium Working Group; the latest LTS version is 21.0.4+7.

@christoff-buerger christoff-buerger changed the title use IBM Semeru Runtime Open Edition for native distributions use Eclipse Temurin™ for native distributions Aug 10, 2024
christoff-buerger added a commit that referenced this issue Aug 13, 2024
…ses tab of the About window to account for higher number of licenses (changed from button per license to single combo box).
@christoff-buerger
Copy link
Owner Author

Redesigned also the licenses tab of the About window to account for higher number of licenses (changed from button per license to single combo box). Tested everything -- looks good.

christoff-buerger added a commit that referenced this issue Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant