Skip to content

Instantly share code, notes, and snippets.

@vext01
Last active December 2, 2016 12:30
Show Gist options
  • Save vext01/f97e951ce9654e9437871c26b6f8b651 to your computer and use it in GitHub Desktop.
Save vext01/f97e951ce9654e9437871c26b6f8b651 to your computer and use it in GitHub Desktop.
Building graal using the jvmci from OTN
JVMCI_VERSION=jvmci-0.23
MX_VERSION=d9c7efa53f60e4ca493da08438af01f8ca985985
# XXX when the 0.18 tag appears on GH, use the tag name
GRAAL_VERSION=efb8df47ec55ad5a9c67734ac0b8162e7101cb19 # graal-vm-0.18
#TRUFFLE_VERSION=d5ad21241e5452bdb7a1ea2623db72b63712098f #unused
MX="env JAVA_HOME=${OUR_JAVA_HOME} python2.7 ${wrkdir}/mx/mx.py"
build_graal() {
echo "\n===> Download and build graal\n"
if [ -f ${wrkdir}/jvmci/jdk1.8*/product/bin/javac ]; then return; fi
# A tool called mx is used to clone the code
#if [ ! -d ${wrkdir}/mx ]; then
# cd ${wrkdir} && git clone https://github.com/graalvm/mx || exit $?
# cd mx && git checkout ${MX_VERSION} && cd .. || exit $?
#fi
# mx won't listen to CC/CXX
ln -sf ${OUR_CC} `dirname ${OUR_CC}`/gcc
ln -sf ${OUR_CXX} `dirname ${OUR_CXX}`/g++
GRAAL_PATH=`dirname ${OUR_CC}`:${PATH}
# First we build a JVMCI-enabled JDK
#if [ ! -d ${wrkdir}/graal-jvmci-8 ];then
# hg clone http://hg.openjdk.java.net/graal/graal-jvmci-8
#fi
#cd graal-jvmci-8 || exit $?
#hg up ${JVMCI_VERSION} || exit $?
#if [ ! -d ${wrkdir}/graal-jvmci-8/jdk1.8.0 ]; then
# env PATH=${GRAAL_PATH} ${MX} build
#fi
# Now make mx use the jvmci-enabled jdk
#cd ${wrkdir}/graal-jvmci-8
#JVMCI_JAVA_HOME=`${MX} jdkhome`
# JVMCI downlaoded from OTN for now XXX
JVMCI_JAVA_HOME=${wrkdir}/graalvm-0.18-dk
echo "jvmci JAVA_HOME is: ${JVMCI_JAVA_HOME}"
MX="env JAVA_HOME=${JVMCI_JAVA_HOME} python2.7 ${wrkdir}/mx/mx.py"
# Now build graal itself
cd ${wrkdir}
if ! [ -d ${wrkdir}/graal ]; then
git clone https://github.com/graalvm/graal-core graal || exit $?
fi
cd ${wrkdir}/graal && git checkout ${GRAAL_VERSION} || exit $?
env PATH=${GRAAL_PATH} ${MX} || exit $? # fetches truffle
env PATH=${GRAAL_PATH} ${MX} build || exit $?
# remove the symlinks
rm `dirname ${OUR_CC}`/gcc `dirname ${OUR_CC}`/g++ || exit $?
}
...
Compiling com.oracle.truffle.api.interop.java with javac-daemon... [/home/vext01/research/warmup_experiment/work/truffle/mxbuild/truffl
e/com.oracle.truffle.api.interop.java/bin/com/oracle/truffle/api/interop/java/JavaInteropSnippets.class does not exist]
Compiling com.oracle.graal.compiler.common with javac-daemon... [/home/vext01/research/warmup_experiment/work/graal/mxbuild/graal/com.oracle.graal.compiler.common/bin/com/oracle/graal/compiler/common/Fields.class does not exist]
Compiling com.oracle.graal.asm.aarch64 with javac-daemon... [/home/vext01/research/warmup_experiment/work/graal/mxbuild/graal/com.oracl
e.graal.asm.aarch64/bin/com/oracle/graal/asm/aarch64/AArch64MacroAssembler.class does not exist]
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/vext01/research/warmup_experiment/work/truffle/mxbuild/truffle/com.oracle.truffle.api.interop.java/src_gen/com/oracle/truffle/api
/interop/java/ArrayGetSizeNodeSubNodeGen.java:2: error: class, interface, or enum expected
null
^
/home/vext01/research/warmup_experiment/work/truffle/mxbuild/truffle/com.oracle.truffle.api.interop.java/src_gen/com/oracle/truffle/api
/interop/java/ArrayHasSizeNodeSubNodeGen.java:2: error: class, interface, or enum expected
null
^
/home/vext01/research/warmup_experiment/work/truffle/mxbuild/truffle/com.oracle.truffle.api.interop.java/src_gen/com/oracle/truffle/api
/interop/java/BoxedCheckNodeSubNodeGen.java:2: error: class, interface, or enum expected
null
^
...
// CheckStyle: start generated
null
java.lang.NullPointerException
at com.oracle.truffle.dsl.processor.java.compiler.AbstractCompiler.method(AbstractCompiler.java:31)
at com.oracle.truffle.dsl.processor.java.compiler.JavaCCompiler.getContent(JavaCCompiler.java:82)
at com.oracle.truffle.dsl.processor.java.compiler.JavaCCompiler.getHeaderComment(JavaCCompiler.java:96)
at com.oracle.truffle.dsl.processor.CodeWriter.writeHeader(CodeWriter.java:57)
at com.oracle.truffle.dsl.processor.java.transform.AbstractCodeWriter.writeRootClass(AbstractCodeWriter.java:105)
at com.oracle.truffle.dsl.processor.java.transform.AbstractCodeWriter.visitType(AbstractCodeWriter.java:84)
at com.oracle.truffle.dsl.processor.java.transform.AbstractCodeWriter.visitType(AbstractCodeWriter.java:59)
at com.oracle.truffle.dsl.processor.java.model.CodeElementScanner.visitType(CodeElementScanner.java:70)
at com.oracle.truffle.dsl.processor.java.model.CodeTypeElement.accept(CodeTypeElement.java:202)
at com.oracle.truffle.dsl.processor.AnnotationProcessor.process(AnnotationProcessor.java:102)
at com.oracle.truffle.dsl.processor.TruffleProcessor.processElement(TruffleProcessor.java:98)
at com.oracle.truffle.dsl.processor.TruffleProcessor.processImpl(TruffleProcessor.java:86)
at com.oracle.truffle.dsl.processor.TruffleProcessor.process(TruffleProcessor.java:60)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.oracle.mxtool.compilerserver.JavacDaemon$JavacCompiler.compile(JavacDaemon.java:32)
at com.oracle.mxtool.compilerserver.CompilerDaemon$Connection.run(CompilerDaemon.java:147)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
package com.oracle.truffle.api.interop.java;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment