temurin-build: [JDK 24] jlink fails on Windows/Mac with ' has been modified' error

Using JLink with JDK 24 fails with:

Error: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\24.0.0-ea.24.0.ea\x64\bin\j2pkcs11.dll has been modified

Build link: https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24%2B24-ea-beta/OpenJDK-jdk_x64_windows_hotspot_24_24-ea.zip

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 38 (31 by maintainers)

Most upvoted comments

There are no jlink tests currently in the smoke tests bucket, as you say, adding a quick test at that point is a good idea.

Thanks. I’ll add that to my TODO.

There are other test targets that do exercise jlink (including the jdk_tools target from openjdk), and they do not look healthy for JDK24, but no one has triaged or investigated those at the moment.

Linux is OK. The basic jdk/tools/jlink tests pass.

Example: https://ci.adoptium.net/job/Test_openjdk24_hs_extended.openjdk_x86-64_linux_testList_0/18/testReport/junit/tools_jpackage_share_JLinkOptionsTest/java/JLinkOptionsTest/

Those are all jpackage tests. I’ll look into those. That’s more of an upstream task.

I was able to build JREs with jlink for 24+28. Thank you for your diligence and support! 🎁

@smlambert Do we have some basic jlink tests that run on Temurin builds? A simple smoke test like running jlink --add-modules java.base --output testimage should reproduce this issue and serve as a regression test. If so I can work on that. I suppose the regular smoke tests run after signing on Windows/Mac?

We have one. @sefroberg is supposed to contribute it to aqa-tests. He wanted the do that during summer, but the interruption on container work-flow delayed it.

@smlambert Do we have some basic jlink tests that run on Temurin builds? A simple smoke test like running jlink --add-modules java.base --output testimage should reproduce this issue and serve as a regression test. If so I can work on that. I suppose the regular smoke tests run after signing on Windows/Mac?

Probably stupid question, but also the content of zips is signed, or just msi?

The files within the zips are also signed. The files that the MSI and zip lays down on the users’ machine should be identical.

Same issue with JDK 24+25

Yep that’s expected - the change was made between +23 and +24 so will affect later versions too until we have a resolution

@sxa we are doing nasty stuff in rpms. We build unstripped portables, and then strip and repack them. That was the reason for ...has been modified error. Regenerating jmods also on stripped form was the cure, thats why the issue it triggered the bell.