[jdk11u-dev] RFR: 8358538: Update GHA Windows runner to 2025
Antonio Vieiro
duke at openjdk.org
Thu Jun 26 08:34:31 UTC 2025
On Wed, 25 Jun 2025 17:17:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Fixes GHA. Current Windows runners are already in brown-out stage, and will be decommissioned by the end of the month. So we need to get it into update repos soon.
>>
>> Additional testing:
>> - [ ] GHA
>
> Pulled in new master that contains https://github.com/openjdk/jdk11u-dev/pull/3034 now. Let's see if it fixes the rest of the build.
@shipilev @jerboaa ,
This happens because the `ProgramFiles(x86)` environment variable is not set properly with `windows-2025` (nor with `windows-2022` AFAIK), and the linker cannot be found.
It seems [JDK-8248987](https://bugs.openjdk.org/browse/JDK-8248987]) doesn't work as intented.
If `ProgramFiles(x86)` environment variable is not set we could use a default directory and print out a warning. Something similar to:
diff --git a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
index 92c80aad397..6af0c17512d 100644
--- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
+++ b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
@@ -163,7 +163,7 @@ final class Linker {
*/
private static String getWindowsLinkPath(Main main) throws Exception {
try {
- Path vc141NewerLinker = getVC141AndNewerLinker();
+ Path vc141NewerLinker = getVC141AndNewerLinker(main);
if (vc141NewerLinker != null) {
return vc141NewerLinker.toString();
}
@@ -204,10 +204,11 @@ final class Linker {
return null;
}
- private static Path getVC141AndNewerLinker() throws Exception {
+ private static Path getVC141AndNewerLinker(Main main) throws Exception {
String programFilesX86 = System.getenv("ProgramFiles(x86)");
if (programFilesX86 == null) {
- throw new IllegalStateException("Could not read the ProgramFiles(x86) environment variable");
+ programFilesX86 = "C:\\Program Files (x86)";
+ main.printer.printlnInfo("Could not read the ProgramFiles(x86) environment variable. Using default '" + programFilesX86 + "'");
}
String vswherePath = programFilesX86 + "\\Microsoft Visual Studio\\Installer\\vswhere.exe";
Path vswhere = Paths.get(vswherePath);
Let me know if you want me to create a new issue with that patch on top of this PR.
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/3052#issuecomment-3007654340
More information about the jdk-updates-dev
mailing list