Build from sources fails with Java 17

Michał 'Chlebik' Piotrowski michal.chlebik.piotrowski at gmail.com
Wed Jan 5 07:12:16 UTC 2022


Thank you for the answer, that clarifies it. I think that myabe it will be
worth putting that kind of info in the docs for JTReg (I would expect that
newer versions should work), although I don't know how to request/access
this. Or maybe it should be an actual matter of changing those tests, but
here I also don't know the procedure - that's why I'm writing in the
mailing list.

śr., 5 sty 2022 o 04:46 Jaikiran Pai <jai.forums2013 at gmail.com> napisał(a):

> Forgot to copy the mailing list.
>
> -Jaikiran
>
> On 05/01/22 7:21 am, Jaikiran Pai wrote:
> > Hello Michał,
> >
> > I remember running into that issue while building jtreg from source
> > using newer versions of Java (like Java 17). To get past it, I just
> > switched to Java 8, to build jtreg.
> >
> > Alternatively, if your goal is to build jtreg only to use it for
> > testing the OpenJDK jdk project, then you can find pre-built jtreg
> > versions from here
> > https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/.
> > I think you will need the jtreg-6.1+1.tar.gz from there.
> >
> > -Jaikiran
> >
> > On 02/01/22 11:41 pm, Michał 'Chlebik' Piotrowski wrote:
> >> Howdy!
> >>
> >> I'm a newcomer to the OpenJDK, and therefore tried to start from
> >> scratch by
> >> actually building OpenJDK on my local machine. In order to go through
> >> the
> >> whole process, I've also tried to run JTReg tests, which failed due
> >> to too
> >> old version of this library in my WSL / Linux Mint on VBox (host
> >> system is
> >> Windows 10).
> >>
> >> I've tried to build the latest version from scratch on both WSL (Ubuntu)
> >> and VBox (with aforementioned Mint). An actual build process works,
> >> and I
> >> get BUILD SUCCESSFUL message, unfortunately it seems that tests
> >> executed to
> >> verify the process fails. Below I'm posting all the output I got and
> >> additional information about the environment.
> >>
> >> System: Linux Mint with kernel 4.15.0-47-generic
> >> Java:  Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed
> >> mode, sharing)
> >>
> >>
> >> Last messages in the build log:
> >>
> >>          -encoding ISO8859-1 \
> >>
> >> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/GetSystemProperty.java
> >>
> >> ../src/share/classes/com/sun/javatest/regtest/agent/MainWrapper.java
> >> ../src/share/classes/com/sun/javatest/regtest/agent/AStatus.java
> >> ../src/share/classes/com/sun/javatest/regtest/agent/StringArray.java
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:138:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>              Applet applet = app.getApplet();
> >>              ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:215:
> >>
> >> warning: [removal] AppletStub in java.applet has been deprecated and
> >> marked
> >> for removal
> >>      static class AppletStubImpl implements AppletStub {
> >>                                             ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:234:
> >>
> >> warning: [removal] AppletContext in java.applet has been deprecated and
> >> marked for removal
> >>          public AppletContext getAppletContext() {
> >>                 ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:407:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>          public Applet getApplet() {
> >>                 ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:417:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>                  applet = (Applet) cls.newInstance();
> >>                            ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:471:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>          private Applet applet;
> >>                  ^
> >> error: warnings found and -Werror specified
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:539:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>      AppletPanel(Applet applet, int width, int height) {
> >>                  ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:627:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>          NestedAppletPanel(Applet applet) {
> >>                            ^
> >>
> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java:658:
> >>
> >> warning: [removal] Applet in java.applet has been deprecated and
> >> marked for
> >> removal
> >>      private Applet applet;
> >>              ^
> >> Note:
> >> ../src/share/classes/com/sun/javatest/regtest/agent/AppletWrapper.java
> >> uses
> >> or overrides a deprecated API.
> >> Note: Recompile with -Xlint:deprecation for details.
> >> Note: Some input files use unchecked or unsafe operations.
> >> Note: Recompile with -Xlint:unchecked for details.
> >> 1 error
> >> 9 warnings
> >> jtreg.gmk:40: recipe for target
> >>
> '/usr/share/jtreg-6.1+1/build/classes.com.sun.javatest.regtest-othervm.ok'
> >>
> >> failed
> >> make: ***
> >>
> [/usr/share/jtreg-6.1+1/build/classes.com.sun.javatest.regtest-othervm.ok]
> >>
> >> Error 1
> >>
> >>
> >> I don't know what should be the procedure here, in terms of reporting an
> >> error, so that's why I've decided to post it here, in order to get some
> >> feedback how to proceed further.
> >>
> >>
> >> Cheers,
> >> Michał 'Chlebik' Piotrowski
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/jtreg-use/attachments/20220105/959e64fd/attachment-0001.htm>


More information about the jtreg-use mailing list