Setup Graal VM on Mac OS X 10.11 El Capitan Howto Tutorial installation prerequisites

hi,

on wednesday, Jaroslav Tulach showed me the amazingly fast Graal VM together with Truffle. Graal VM will become the fastest scripting environment in the world. And well, since performance always counts, i decided to try it!

There is no Installation Instruction available for MacOS X, so i decided to try it on OS X El Capitan, since it’s a unix system, too.

Prerequisites to install Graal on Mac OS X 10.11 El Capitan (see log below)

* jdk 8
* Apache Ant 1.9.6
* make
* Graal Core
* mx tool
* Mercurial

Here’s the log:

* Java 8 SDK(1.8.0.74) was already installed
* following instructions from Graal wiki: https://wiki.openjdk.java.net/display/Graal/Instructions
* cloned mx from git
* cloned graal core from git
* setting env PATH for the mx folder
* mx launch failed:

Cloning http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8 revision 62804a7d3877709d4d421650a6471a15f0d2cec6 to /Users/nico/NetBeansProjects/graal/graal/jvmci with Mercurial
WARNING: no hg executable found
no hg executable found

* Downloaded Mercurial for OSX 10.10 from http://mercurial.selenic.com/mac/binaries/Mercurial-3.7.2-py2.7-macosx10.10.zip
* successfully installed from pkg.
* next attempt to launch mx was more successful
* input requested: „Please select the VM to be executed from the following: “ – choosing (2- jvmci)
* cool, works. running mx spull. spull successful, too! may i be lucky?
* mx build runs.
* failed. no make command found. OS X asks me to „install“ or „load XCode“. decided to just install make.
* make installed
* mx build runs again
* seems to pretty much „make“ the graal – cpu fan spins up.
* ok, done without errors, just one warning.
* ok, read too late, what jvmci/server option meant. should have used „server“ since i wanted to try truffle, too. so i leave it as it is and build a server version some other day, so i can see whats the difference.
* running mx ideinit, worked (looking into this tomrrow)
* running test:

mx igv &
mx unittest -G:Dump= BC_athrow0

* got error from igv:

Error executing ‚ant -f /Users/nico/NetBeansProjects/graal/graal/jvmci/src/share/tools/IdealGraphVisualizer/build.xml -l /Users/nico/NetBeansProjects/graal/graal/jvmci/.ideal_graph_visualizer.log run‘: [Errno 2] No such file or directory

* Tries to tell me i have to install ant.
* following tutorial http://www.mkyong.com/ant/how-to-apache-ant-on-mac-os-x/
* downloading ant from http://www-eu.apache.org/dist//ant/binaries/apache-ant-1.9.6-bin.tar.gz
* extracted into apache-ant-1.9.6
* test with apache-ant-1.9.6/bin/ant -v
* success!
* setting env in ~/._bash_profile

export JAVA_HOME=$(/usr/libexec/java_home)

# Apache Ant
export ANT_HOME=/Users/nico/apache-ant-1.9.6

# Export to PATH
export PATH=$PATH:$ANT_HOME/bin
~

* executing source ~/.bash_profile to make changes available.
* running igv again. this time no bad error

$ mx unittest -G:Dump= BC_athrow0
MxJUnitCore
JUnit version 4.11
.Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
Could not connect to the IGV on 127.0.0.1:4445 : java.net.ConnectException: Connection refused
CFGPrinter: Output to file /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Output to file /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Dumping method HotSpotMethod<String.charAt(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Dumping method HotSpotMethod<BC_athrow0.test(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Output to file /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_3.cfg
CFGPrinter: Dumping method HotSpotMethod<String.hashCode()> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_3.cfg
CFGPrinter: Dumping method HotSpotMethod<UnwindExceptionToCallerStub.unwindExceptionToCaller(Object, Word, Register)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Dumping method HotSpotMethod<ExceptionHandlerStub.exceptionHandler(Object, Word, Register)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Output to file /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_4.cfg
CFGPrinter: Dumping method HotSpotMethod<UnsafeUtil.readCString(Unsafe, long)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_4.cfg
CFGPrinter: Dumping method HotSpotMethod<BC_athrow0.test(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Dumping method HotSpotMethod<NewInstanceStub.newInstance(KlassPointer, KlassPointer, Register)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_4.cfg
CFGPrinter: Dumping method HotSpotMethod<String.charAt(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Dumping method HotSpotMethod<String.charAt(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Dumping method HotSpotMethod<String.hashCode()> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_3.cfg
CFGPrinter: Dumping method HotSpotMethod<BC_athrow0.test(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
.CFGPrinter: Dumping method HotSpotMethod<BC_athrow0.test(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Dumping method HotSpotMethod<BC_athrow0.test(int)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_1.cfg
CFGPrinter: Dumping method HotSpotMethod<FDBigInteger.multDiffMe(long, FDBigInteger)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_2.cfg
CFGPrinter: Dumping method HotSpotMethod<ByteVector.putUTF8(String)> to /Users/nico/NetBeansProjects/graal/graal/graal-core/compilations-1458953631940_3.cfg

Time: 1,206

OK (2 tests)

* irritating. IGV obviously not running yet. but tests are ok it says. scratching my head several times.
* 5 MInutes later: AHAAA! Oops, IGV is still building when it says „Build File /path/to/pbuildfile.xml“ – thought, that was all 😉
* trying again to run the unit test „mx unittest -G:Dump= BC_athrow0“
* exported mx path is not set. setting it permanently in .bash_profile
* nice, IdealGraphVisualizer UI starts up!
* shows me the graph. let’s see what fancy stuff this is!
* lets read the graal source code to understand what i see here.
* want to reproduce what i saw in prague: https://github.com/jtulach/sieve
* but it’s too late now (02:24 am).

more coming soon.
Nico

Schreibe einen Kommentar