Latest Graal and AArch64 WTF?
Dmitry Samersoff
dms at samersoff.net
Sun Jul 29 14:58:27 UTC 2018
Andrew,
Finally, I end up with script below building graal on AArch64
=====================================================
#!/bin/sh
JDK8_STOCK=/export/dsamersoff/jdk1.8.0_172
JDK11_HOME=/export/dsamersoff/esc/graal/jdk/build/linux-aarch64-normal-server-fastdebug/jdk
JDK8_HOME=/export/dsamersoff/esc/graal/graal-jvmci-8/jdk1.8.0_172/linux-aarch64/product
JAVA_HOME=${JDK11_HOME}
export JAVA_HOME
(
cd graal-jvmci-8
../mx/mx --java-home=${JDK8_STOCK} --vmbuild=product build --no-native
)
cd graal/compiler
../../mx/mx --java-home=${JDK11_HOME} --extra-java-homes=${JDK8_HOME} -v
build
=============================================================================
On 07/26/2018 03:43 PM, Andrew Dinn wrote:
> On 26/07/18 11:54, Doug Simon wrote:
>> Does the "JVMCI-jars-only" work-around described at
>> http://mail.openjdk.java.net/pipermail/graal-dev/2018-June/005413.html
>> not work for you? The original mail in that thread provides some
>> background as to why the build change was made.
>
> The workaround is news to me. I saw the first note about mx
> --strict-compliance being the only option available now but did not
> notice the comment in the follow-up about building for AArch64.
>
> Is this process advertised anywhere on the graal github sites? I
> couldn't find anything on either of these two sites:
>
> https://github.com/oracle/graal
> https://github.com/graalvm/graal-jvmci-8
>
> If not perhaps it could be added to the instructions in
>
> https://github.com/oracle/graal/blob/master/compiler/README.md
>
> I'm still a little confused as to one specific though. Given that the
> workaround is happy to use a pre-supplied JDK8 to perform the build
> (modulo inclusion of the JVMCI jars overlay) why was there a need to
> modify the hotspot sources that sit in the graal-jvmci-8 repo? Are these
> hotspot changes needed to be able to run the JDK8 version of Graal on
> JDK8? i.e. does this mean it is not possible to use Graal on a standard
> jdk8 release?
>
>> In terms of making Graal not require a JVMCI JDK8 to build, one would
>> need to factor out all code using API specific to a JDK version. For
>> each body of such code, you'd have a "placeholder" source file
>> specifying its API and overlays for each JDK version. Currently, we
>> collapse the JDK8 overlay into the placeholder. As a concrete example
>> of what I mean, today we have:
>>
>> src/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
>>
>> src/org.graalvm.compiler.serviceprovider.jdk9/src/org/graalvm/compiler/serviceprovider/GraalServices.java>
>> Where the first file specifies the API for GraalServices as well as
>> its JDK8 implementation.
>>
>> We need to move to this instead:
>>
>> src/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
>>
>> src/org.graalvm.compiler.serviceprovider.jdk8/src/org/graalvm/compiler/serviceprovider/GraalServices.java>
> src/org.graalvm.compiler.serviceprovider.jdk9/src/org/graalvm/compiler/serviceprovider/GraalServices.java
>>
>> Where the first file specifies only the API and all its methods
>> simply throw some exception.
>>
>> In addition to the Java code changes, you'd also need to modify mx to
>> consider JDK8 overlays (until now, overlay support is mostly in the
>> JDK9+ parts of mx).
>
> Ok, thanks. I will try to use the recommended workaround and also look
> at what is involved in fixing the problem in the Graal tree.
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>
--
Dmitry Samersoff
http://devnull.samersoff.net
* There will come soft rains ...
More information about the graal-dev
mailing list