Skip to content

Conversation

@christhalinger
Copy link
Contributor

Using an exploded JDK results in:

$ mx --java-home=/Users/cthalinger/jvmci/build/macosx-x86_64-normal-server-release/jdk eclipseinit
  File "/Users/cthalinger/jvmci/graal-core/mx.graal-core/suite.py", line 274 in definition of com.oracle.graal.api.replacements:
JDK library JVMCI_API required by com.oracle.graal.api.replacements not provided by Java 1.8.0_92-internal (1.8) from /Users/cthalinger/jvmci/build/macosx-x86_64-normal-server-release/jdk

This also needs a change in the graal-core suite file:

diff --git a/mx.graal-core/suite.py b/mx.graal-core/suite.py
index 364136c..bf5dbf6 100644
--- a/mx.graal-core/suite.py
+++ b/mx.graal-core/suite.py
@@ -21,14 +21,14 @@ suite = {

   "jdklibraries" : {
     "JVMCI_SERVICES" : {
-      "path" : "jre/lib/jvmci-services.jar",
-      "sourcePath" : "jre/lib/jvmci-services.src.zip",
+      "path" : "lib/jvmci-services.jar",
+      "sourcePath" : "lib/jvmci-services.src.zip",
       "optional" : False,
       "jdkStandardizedSince" : "9",
     },
     "JVMCI_API" : {
-      "path" : "jre/lib/jvmci/jvmci-api.jar",
-      "sourcePath" : "jre/lib/jvmci/jvmci-api.src.zip",
+      "path" : "lib/jvmci/jvmci-api.jar",
+      "sourcePath" : "lib/jvmci/jvmci-api.src.zip",
       "dependencies" : [
         "JVMCI_SERVICES",
       ],
@@ -36,8 +36,8 @@ suite = {
       "jdkStandardizedSince" : "9",
     },
     "JVMCI_HOTSPOT" : {
-      "path" : "jre/lib/jvmci/jvmci-hotspot.jar",
-      "sourcePath" : "jre/lib/jvmci/jvmci-hotspot.src.zip",
+      "path" : "lib/jvmci/jvmci-hotspot.jar",
+      "sourcePath" : "lib/jvmci/jvmci-hotspot.src.zip",
       "dependencies" : [
         "JVMCI_API",
       ],

@graalvmbot
Copy link
Collaborator

  • It appears that user Chris Thalinger with email address cthalinger -(at)- twitter -(dot)- com has not signed the Oracle Contributor Agreement.

If you believe this is an error, please contact graal-dev@openjdk.java.net.

@graalvmbot
Copy link
Collaborator

  • User Chris Thalinger with email address cthalinger -(at)- twitter -(dot)- com is now cleared for contributions.

@dougxc
Copy link
Member

dougxc commented Jul 22, 2016

Why is this necessary? Are you building a JDK8 with a non-standard layout? Or setting JAVA_HOME to the jre/ subdirectory in a JDK?

@christhalinger
Copy link
Contributor Author

I'm using mx --java-home=$(JDK_OUTPUTDIR) because that's the only way to build Graal with the just built JDK. I am integrating Graal into the JDK build process and all this has to happen before make images.

@dougxc
Copy link
Member

dougxc commented Jul 26, 2016

Ok, sounds reasonable. Can you please bump the patch level number of the version field down the bottom of mx.py.

@dougxc dougxc added the accept label Jul 26, 2016
@dougxc dougxc merged commit 392eb07 into graalvm:master Jul 26, 2016
@christhalinger
Copy link
Contributor Author

What happened here? It was merged and then reverted?!? The patch is even gone in my branch now...

@sanzinger
Copy link

Sorry, it had broke our continuous integration builds with JDK 8. I had to take it out immediately. I'll provide a fix for this issues and re-merge.

@christhalinger
Copy link
Contributor Author

What about the version bump, as @dougxc requested?

@sanzinger
Copy link

Yes, I've seen that later, but it is not related. I'm working right now to fix the issue.

@christhalinger
Copy link
Contributor Author

Ok, thanks.


def get_jdk_path(self, jdk, path):
# Exploded JDKs don't have a jre directory.
if exists(join(jdk.home, 'jre')):
Copy link

@sanzinger sanzinger Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here is, that mx.graal-core/suites.py links to the jre directory

    "JVMCI_API" : {
      "path" : "jre/lib/jvmci/jvmci-api.jar",
....
    },

in that case, following path is created: $JAVA_HOME/jre/jre/lib/jvmci/jvmci-api.jar.

We could do a bit of fuzzying like:

    def get_jdk_path(self, jdk, path):
        # Exploded JDKs don't have a jre directory.
        if exists(join(jdk.home, path)):
            return join(jdk.home, path)
        elif exists(join(jdk.home, 'jre')):
            return join(jdk.home, 'jre', path)
        else:
            return join(jdk.home, path)

A simpler version would be:

    def get_jdk_path(self, jdk, path):
        # Exploded JDKs don't have a jre directory.
        if exists(join(jdk.home, path)):
            return join(jdk.home, path)
        else:
            return join(jdk.home, 'jre', path)

this is not beautilful but in order to get this feature and have backwards compatibility we have to do it.
In the long run, we may remove the jre prefix from the suites.py dependencies.
Just have noticed, you suggested to remove the jre prefix anyway. However, the backwards compatibility must be ensured. The second suggestion would do the trick.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I didn't think of being backwards compatible.

@sanzinger
Copy link

Ok, I've prepeared an internal review with the second (simpler) version of get_jdk_path. If this fits to you and I have an internal approval, I'll merge it.

@christhalinger
Copy link
Contributor Author

I haven't tried the patch but it looks ok. Did you try it?

@dougxc
Copy link
Member

dougxc commented Jul 26, 2016

I'm using mx --java-home=$(JDK_OUTPUTDIR) because that's the only way to build Graal with the just built JDK. I am integrating Graal into the JDK build process and all this has to happen before make images.

In this scenario, which JDK version are you building? Based on your mention of make images it sounds like JDK9 in which case the "jdkStandardizedSince" : "9" setting in suite.py should make the "path" attribute effectively ignored. Is the just built JDK somehow reporting the wrong version?

@christhalinger
Copy link
Contributor Author

No, it's 8u; it also has make images.

@dougxc
Copy link
Member

dougxc commented Jul 26, 2016

Ok, thanks for the clarification. I guess you're deploying graal.jar alongside the JVMCI jars as part of the images build step.

@christhalinger
Copy link
Contributor Author

Yes. By doing that we have graal.jar in all the various JDK images (exploded, jre, jdk).

@christhalinger
Copy link
Contributor Author

Yeah, this doesn't work right now. Are you guys pushing a change to graal-core to remove the jre prefix from the libraries?

@dougxc
Copy link
Member

dougxc commented Aug 2, 2016

@christhalinger
Copy link
Contributor Author

Thanks!

jlahoda pushed a commit to jlahoda/mx that referenced this pull request Aug 9, 2016
…OM/mx:NetBeansBuildDir to master

* commit 'b0808a94c0ec6b19519341d68fb0ffdbf795fe39':
  Point NetBeans build.dir to the directory where classes are really created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants