Build failing when disabling the serialgc

Sanne Grinovero sanne at redhat.com
Thu Jun 20 10:42:16 UTC 2024


Many thanks Erik and Julian for the pointers,

I'll explore the --with-build-jdk suggestion, and opened a bug report:
 - https://bugs.openjdk.org/browse/JDK-8334617


On Thu, Jun 20, 2024 at 9:53 AM <erik.joelsson at oracle.com> wrote:
>
> On 6/20/24 01:01, Sanne Grinovero wrote:
> > Hi all,
> >
> > I was hoping to build a custom JVM which would only have G1GC as a
> > garbage collector, for some experiments.
> >
> > Essentially I'm running:
> >
> >> bash configure --with-jvm-variants=custom --with-jvm-features=cds,compiler1,compiler2,g1gc,jfr,jni-check,jvmci,jvmti,management,services,link-time-opt --enable-generate-classlist --disable-manpages --with-vendor-name=Experiments
> > However then during the "make images" step, this will fail when the
> > jmod(s) are being created, with a long sequence of errors such as:
> >
> > Creating java.security.jgss.jmod
> > Error occurred during initialization of VM
> > Option -XX:+UseSerialGC not supported
> >
> > The same build succeeds if I add the "serialgc" in the list of
> > selected features.
> >
> > Should I open a bug report?
> > I've verified that both the `master` branch and `jdk23` are affected,
> > and so is the `premain` branch on the Leyden fork.
> Yes, I think that may be warranted, however see workaround below.
> > I'm assuming that it should be supported to build a JVM without the
> > serialgc implementation since it's listed as a feature and therefore
> > I'd expect it to be OK to disable it, however I'm wondering about this
> > explicitly stated need during the jmod building process; is there
> > perhaps a specific need for these to be built with the serialgc, or is
> > this just a hint meant to make the build more efficient?
>
> There is no specific need, this is just for efficiency. Using the
> "small" java configuration, saves considerable user time for small short
> lived java processes. We currently don't take any limitations in the
> configuration for the built JDK into account when using it as the
> "BUILD_JDK" during the build. Perhaps we should. On the other hand, if
> you are building a limited JDK through configuration options, it can
> often be adviceable to supply a separate BUILD_JDK (for performing the
> build steps that need a JDK N). This can be done by first building a
> standard configuration and then pointing to that JDK image with the
> configure arg --with-build-jdk.
>
> /Erik
>
> > Many thanks,
> > Sanne Grinovero
> >
>



More information about the build-dev mailing list