RFR: 8347831: Re-examine version check when cross linking [v9]
Henry Jen
henryjen at openjdk.org
Tue Dec 2 16:11:02 UTC 2025
> This PR include build changes from @magicus and jlink change to verify the build signature.
>
> Tested with local builds for MacOS and Linux as below shows that cross linking with same build is working while linking with different build failed with error message.
>
> ❯ export JAVA_HOME=./build/macosx-x86_64-server-fastdebug/images/jdk-bundle/jdk-26.jdk/Contents/Home
>
> ❯ java --version
> openjdk 26-internal 2026-03-17
> OpenJDK Runtime Environment (fastdebug build 26-internal-adhoc.hjen.JDK-8347831)
> OpenJDK 64-Bit Server VM (fastdebug build 26-internal-adhoc.hjen.JDK-8347831, mixed mode, sharing)
>
> ❯ jlink --version
> 26-internal
>
> ❯ jlink --module-path ./build/linux-x86_64-server-release/images/jdk/jmods --add-modules java.base --output linux
>
> ❯ jlink --add-modules java.base --output macos
>
> ❯ jlink --module-path ~/linux/jdk-25.0.1/jmods --add-modules java.base --output linux25
> Error: jlink build N/A-26-internal-adhoc.hjen.JDK-8347831-2026-03-17 does not match target java.base build N/A
>
> ❯ jlink --module-path /Library/Java/JavaVirtualMachines/jdk-25.jdk/Contents/Home/jmods --add-modules java.base --output macos25
> Error: jlink build N/A-26-internal-adhoc.hjen.JDK-8347831-2026-03-17 does not match target java.base build N/A
Henry Jen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
- Merge openjdk/master
- adapt review feedbacks
- remove the extra space
- Update the error message when not finding release signature
- Treat missing release.txt as emptry release signature
- Refactoring to clarify version checking cases
- Address review feedbacks
- Use release.txt from java.base module in current and target for comparison
- JLink to check java build information
- Build changes to generate release.txt for java.base and jdk.jlink.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28155/files
- new: https://git.openjdk.org/jdk/pull/28155/files/a3edf9ac..2641504b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28155&range=08
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28155&range=07-08
Stats: 257641 lines in 2281 files changed: 172190 ins; 47655 del; 37796 mod
Patch: https://git.openjdk.org/jdk/pull/28155.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28155/head:pull/28155
PR: https://git.openjdk.org/jdk/pull/28155
More information about the core-libs-dev
mailing list