Build from sources fails with Java 17
Jaikiran Pai
jai.forums2013 at gmail.com
Wed Jan 5 03:46:23 UTC 2022
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
>>
More information about the jtreg-use
mailing list