eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 722 forks source link

DDR not supported by exploded-image #6998

Closed fjeremic closed 5 years ago

fjeremic commented 5 years ago

Using the JDK11 Dockerfile and adding the test dependencies needed to build and execute tests by running the following commands:

apt-get install -qq -y --no-install-recommends ant ant-contrib perl
echo yes | cpan install JSON Text::CSV XML::Parser

Then trying to build the tests:

cd /java/openj9-openjdk-jdk11/openj9/test/TestConfig
export BUILD_LIST=functional
make -f run_configure.mk
make compile

The test compilation fails at this point:

compile:
     [echo] Ant version is Apache Ant(TM) version 1.9.6 compiled on July 20 2018
     [echo] ============COMPILER SETTINGS============
     [echo] ===fork:                         yes
     [echo] ===executable:                   /java/openj9-openjdk-jdk11/build/linux-s390x-normal-server-release/jdk/bin/javac
     [echo] ===debug:                        on
     [echo] ===destdir:                      /java/openj9-openjdk-jdk11/openj9/test/TestConfig/../../jvmtest/functional/DDR_Test
    [javac] Compiling 54 source files to /java/openj9-openjdk-jdk11/openj9/test/functional/DDR_Test/bin
    [javac] /java/openj9-openjdk-jdk11/openj9/test/functional/DDR_Test/src/j9vm/test/ddrext/AutoRun.java:60: error: package com.ibm.j9ddr.tools.ddrinteractive does not exist
    [javac] import com.ibm.j9ddr.tools.ddrinteractive.Context;
    [javac]                                          ^
    [javac] /java/openj9-openjdk-jdk11/openj9/test/functional/DDR_Test/src/j9vm/test/ddrext/AutoRun.java:310: error: cannot find symbol
    [javac]     public static void runTest(Context ctx, PrintStream out, String testCaseList) {

It seems like the same errors encountered in #3366. Removing the DDR_Test directory and running make compile works around the problem.

pshipton commented 5 years ago

@keithc-ca

keithc-ca commented 5 years ago

See also #6994.

pshipton commented 5 years ago

Since DDR is supported and enabled for zLinux, it seems strange the DDR tests cannot compile.

keithc-ca commented 5 years ago

It appears TEST_JDK_HOME was improperly specified as

/java/openj9-openjdk-jdk11/build/linux-s390x-normal-server-release/jdk

when it should have been

/java/openj9-openjdk-jdk11/build/linux-s390x-normal-server-release/images/jdk

The former does not support DDR while the latter should (if it was enabled at configuration time).

DanHeidinga commented 5 years ago

The former does not support DDR while the latter should (if it was enabled at configuration time).

Why doesn't DDR work for the build in /jdk?

fjeremic commented 5 years ago

I've just tested with:

/java/openj9-openjdk-jdk11/build/linux-s390x-normal-server-release/images/jdk

And everything is working as expected. Interesting caveat. I'd also like to understand why /jdk does not work.

keithc-ca commented 5 years ago

Why doesn't DDR work for the build in /jdk?

I was under the impression that /jdk (as opposed to /images/jdk) was not expected to be a full JDK - it only needed to be capable enough to build /images/jdk, etc. Given that belief, I never arranged for DDR artifacts to be present in /jdk. The comment [1] suggests otherwise. Let's repurpose this issue to fix that.

[1] https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/openj9/make/Main.gmk#L951

keithc-ca commented 5 years ago

Fixed via the three PRs linked above; closing.