Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemtest compile tries to copy tools.jar from Java 11 JDK #52

Closed
pdbain-ibm opened this issue Oct 17, 2018 · 6 comments
Closed

systemtest compile tries to copy tools.jar from Java 11 JDK #52

pdbain-ibm opened this issue Oct 17, 2018 · 6 comments

Comments

@pdbain-ibm
Copy link

make compile fails because it is trying to copy tools.jar. That file was removed from the JDK as of Java 9.

The JDK was built per instructions: https://www.eclipse.org/openj9/oj9_build.html#version-11.
The test repo was set up per instructions: https://github.com/eclipse/openj9/wiki/Reproducing-Test-Failures-Locally

git clone https://github.com/AdoptOpenJDK/openjdk-tests.git
cd openjdk-tests/
./get.sh -t $PWD -i openj9 -p x64_mac
cd TestConfig/
export BUILD_LIST=systemtest
export JDK_VERSION=11
export JDK_IMPL=openj9
export SPEC=osx_x86-64_cmprssptrs
export JAVA_BIN=/Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin
make -f run_configure.mk 
make compile
...
BUILD FAILED
/Users/pdbain/macprojects/systemtest/openjdk-tests/TestConfig/scripts/build_test.xml:71: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/build.xml:172: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/openj9-systemtest/openj9.build/include/top.xml:193: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/openjdk-systemtest/openjdk.build/include/top.xml:300: Warning: Could not find file /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/lib/tools.jar to copy.
@JasonFengJ9
Copy link
Contributor

JasonFengJ9 commented Oct 17, 2018

Warning: Could not find file /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/lib/tools.jar to copy.

it is a warning, do you see any other errors?

@pdbain-ibm
Copy link
Author

pdbain-ibm commented Oct 17, 2018

Not that I can see. Note that the warning became an error. I copied in a tools.jar from another JRE and the compile ran farther.
Here is a larger sample of the log:

[echoproperties] java8.user.variant=
   [delete] Deleting: /var/folders/zp/0f604shn63bgj7y2sw1bfzyw0000gn/T/openjdk.java.build.properties.1913052360
     [echo] /var/folders/zp/0f604shn63bgj7y2sw1bfzyw0000gn/T/openjdk.java.build.properties.1913052360 deleted
     [echo] osname is Mac OS X
     [echo] arch is amd64
     [echo] bits is 64
     [echo] java8_platformclass set to osx_x86
     [echo] java8_platform set to osx_x86-64
     [echo] java8_bindir set to /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin/../bin
     [echo] java8_compiler set to /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin/javac
     [echo] java8_osname set to osx 
     [echo] java8_arch set to x86 
     [echo] java8_bits set to 64
     [echo] java8_java_specification_version set to 11
     [echo] java8_home set to /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin/..
     [echo] java8_compiler set to /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin/javac

configure-tools-jar:
     [echo] configure-tools-jar: Copying /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/bin/../bin/../lib/tools.jar to /Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest_prereqs/tools

BUILD FAILED
/Users/pdbain/macprojects/systemtest/openjdk-tests/TestConfig/scripts/build_test.xml:71: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/build.xml:172: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/openj9-systemtest/openj9.build/include/top.xml:193: The following error occurred while executing this line:
/Users/pdbain/macprojects/systemtest/openjdk-tests/systemtest/openjdk-systemtest/openjdk.build/include/top.xml:300: Warning: Could not find file /Users/pdbain/vm/openj9-openjdk-jdk11/build/macosx-x86_64-normal-server-release/images/jdk/lib/tools.jar to copy.

@smlambert
Copy link
Contributor

smlambert commented Oct 17, 2018

This change went in late this afternoon: #50, which may or may not affect the story.

Couple of questions, is this problem mac specific?

I have not seen this problem with my local system testing (using a jdk11_openj9_osx build provided from Keith. I got blocked on daa tests not compiling.

Wondering of differences between Keith's build and your build.

@pdbain-ibm
Copy link
Author

Tested on a linux machine, same deal:

[echoproperties] java8.user.variant=
   [delete] Deleting: /tmp/openjdk.java.build.properties.1735286889
     [echo] /tmp/openjdk.java.build.properties.1735286889 deleted
     [echo] osname is Linux
     [echo] arch is amd64
     [echo] bits is 64
     [echo] java8_platformclass set to linux_x86
     [echo] java8_platform set to linux_x86-64
     [echo] java8_bindir set to /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin//../bin
     [echo] java8_compiler set to /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin/javac
     [echo] java8_osname set to linux
     [echo] java8_arch set to x86
     [echo] java8_bits set to 64
     [echo] java8_java_specification_version set to 11
     [echo] java8_home set to /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin//..
     [echo] java8_compiler set to /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin/javac

configure-tools-jar:
     [echo] configure-tools-jar: Copying /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin//../bin/../lib/tools.jar to /home/pdbain/projects/systemtest/openjdk-tests/systemtest_prereqs/tools

BUILD FAILED
/home/pdbain/projects/systemtest/openjdk-tests/TestConfig/scripts/build_test.xml:71: The following error occurred while executing this line:
/home/pdbain/projects/systemtest/openjdk-tests/systemtest/build.xml:172: The following error occurred while executing this line:
/home/pdbain/projects/systemtest/openjdk-tests/systemtest/openj9-systemtest/openj9.build/include/top.xml:193: The following error occurred while executing this line:
/home/pdbain/projects/systemtest/openjdk-tests/systemtest/openjdk-systemtest/openjdk.build/include/top.xml:300: Warning: Could not find file /home/pdbain/vm/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/lib/tools.jar to copy.

@Mesbah-Alam
Copy link
Contributor

From openjdk-systemtest top.xml, there is a comment that says :

test.debugging requires tools.jar for building.
tools.jar is shipped with Java.
The code below looks for tools.jar in Java 8, but only if we are using java 8.
If tools.jar is found, it is copied to PREREQS_ROOT/tools.
The file is not automatically refreshed once it exists in PREREQS_ROOT/tools.

The tools.jar is only copied when we are using Java 8.

The problem is not seen in the jdk11 system test builds, e.g. https://ci.adoptopenjdk.net/view/Test_system/job/openjdk11_hs_systemtest_x86-64_linux/

@pdbain-ibm - are you doing all the necessary exports of env variables for running system tests locally as mentioned here:
https://github.com/eclipse/openj9/blob/master/test/README.md ?

You can compile and run system tests locally via TestKitGen as mentioned in the above readme.

@Mesbah-Alam
Copy link
Contributor

@pdbain-ibm - can this issue be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants