RFR: 8366837: Clean up gensrc by spp.Spp
xxDark
duke at openjdk.org
Mon Sep 8 18:00:20 UTC 2025
On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up.
Hello, this seemingly broke the build on Windows x64.
VarHandleGuards class does not get generated.
^
f:\openjdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:558: error: cannot find symbol
VarHandleGuards.class, getVarHandleGuardMethodName(guardType),
^
symbol: class VarHandleGuards
location: class MethodHandleNatives
f:\openjdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:562: error: cannot find symbol
VarHandleGuards.class, LM_TRUSTED);
^
symbol: class VarHandleGuards
location: class MethodHandleNatives
f:\openjdk\src\java.base\share\classes\java\lang\invoke\VarHandle.java:2249: error: cannot find symbol
UNSAFE.ensureClassInitialized(VarHandleGuards.class)
Reverting this commit fixed the issue.
The setup to configure the build was as follows:
set JAVA_HOME=D:\jdks\temurin-24.0.32
d:\MSV2019\VC\Auxiliary\Build\vcvars64.bat
d:\cygwin64\Cygwin.bat
cd /cygdrive/f/openjdk
bash configure
make java.base
$ make clean java.base
Building targets 'clean java.base' in configuration 'windows-x86_64-server-release'
Cleaning hotspot build artifacts ... done
Cleaning jdk build artifacts ... done
Cleaning bootcycle-build build artifacts ... done
Cleaning test-results build artifacts ... done
Cleaning test-support build artifacts ... done
Cleaning test build artifacts ... done
Cleaning buildtools build artifacts ... done
Cleaning support build artifacts ... done
Cleaning support/images build artifacts ... done
Cleaning images build artifacts ... done
Cleaning make-support build artifacts ... done
Cleaning test-make build artifacts ... done
Cleaning bundles build artifacts ... done
Cleaning buildjdk build artifacts ... done
Cleaned all build artifacts.
Compiling up to 1 files for BUILD_TOOLS_HOTSPOT
Compiling up to 9 files for BUILD_TOOLS_LANGTOOLS
Generating classes for compiler.properties launcher.properties
Compiling 17 properties into resource bundles for jdk.javadoc
Generating FlagsEnum
Compiling 19 properties into resource bundles for jdk.compiler
Compiling up to 136 files for BUILD_java.compiler.interim
Compiling up to 360 files for BUILD_jdk.compiler.interim
Compiling up to 145 files for BUILD_jdk.internal.md.interim
Compiling up to 213 files for BUILD_jdk.javadoc.interim
Compiling up to 17 files for BUILD_JAVAC_SERVER
Compiling up to 190 files for BUILD_TOOLS_JDK
Compiling up to 2 files for COMPILE_DEPEND
Compiling up to 2 files for BUILD_BREAKITERATOR_BASE
Compiling up to 2 files for BUILD_BREAKITERATOR_LD
SocketOptionRegistry.java.template
d:\msvwin10kit\include\10.0.19041.0\um\winbase.h(9531): warning C5105: macro expansion producing 'defined' has undefined behavior
Compiling 11 properties into resource bundles for java.base
Compiling 3 properties into resource bundles for java.base
Compiling 22 properties into resource bundles for java.base
Compiling 11 properties into resource bundles for java.base
Compiling up to 3366 files for java.base
Creating hotspot/variant-server/tools/adlc/adlc.exe from 13 file(s)
Compiling up to 2 files for BUILD_JVMTI_TOOLS
Creating support/modules_libs/java.base/server/jvm.dll from 1223 file(s)
f:\jdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:558: error: cannot find symbol
VarHandleGuards.class, getVarHandleGuardMethodName(guardType),
^
symbol: class VarHandleGuards
location: class MethodHandleNatives
f:\jdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:562: error: cannot find symbol
VarHandleGuards.class, LM_TRUSTED);
^
symbol: class VarHandleGuards
location: class MethodHandleNatives
f:\jdk\src\java.base\share\classes\java\lang\invoke\VarHandle.java:2249: error: cannot find symbol
UNSAFE.ensureClassInitialized(VarHandleGuards.class);
^
symbol: class VarHandleGuards
location: class VarHandle
3 errors
make[3]: *** [CompileJavaModules.gmk:102: /cygdrive/f/jdk/build/windows-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch] Error 1
make[2]: *** [make/Main.gmk:182: java.base-java] Error 2
make[2]: *** Waiting for unfinished jobs....
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3267328044
More information about the core-libs-dev
mailing list