Install Molly on Ubuntu

Molly is an implementation of LDFI. Whose author (Prof. Alvaro) is the one teaching my distributed systems course. So after read the paper I decided to try it, however it’s not very easy to setup (at least on Ubuntu).

There are following problems for the latest Molly code

First install Java and Scala before you clone the repository. JDK6 will not work. I am using JDK8 and Scala 2.11 which works fine on Ubuntu 16.04. Download the tarball and config environment variables should work. I don’t like using apt if extracting tarball is enough.

Then it’s time to clone the repository.

Molly will install local copies of C4 and Z3 automatically.

Molly’s Makefile just clone and run make, it does not handle dependency problems for C4 and Z3. We have to do it by ourselves.

The first step is to install the requirement of C4., whose doc is pretty … brief. It took me a while to figure out the right package name in Ubuntu.

Build dependencies: flex (>= 2.3.35), bison, cmake (>= 2.8), apr (>= 1.4), apr-util (>= 1.3) and SQLite (>= 3). At the moment, the binaries provided by each of these packages (flex, bison, apr-1-config, and apu-1-config) must be in your $PATH.

on Ubuntu it’s the following command. Note those *-dev packages are needed

sudo apt-get install flex bison libapr1 libapr1-dev libaprutil1 libaprutil1-dev libsqlite3-dev

After that, make get-deps && make c4 would work. As for Z3, either you change the .gitmodules or clone the repository manually. Then run make z3

Run Molly’s example use the command in README

sbt "run-main edu.berkeley.cs.boom.molly.SyncFTChecker \
src/test/resources/examples_ft/delivery/simplog.ded \
src/test/resources/examples_ft/delivery/deliv_assert.ded \
--EOT 4 \
--EFF 2 \
--nodes a,b,c \
--crashes 0 \
--prov-diagrams"

And you will most likely found the images in output html are broken. Because dot is required to transform .dot file to svg. It does not have any warning or errors when if fails. sudo apt-get install graphviz should work. (dot executable is included in graphviz)

That’s all and thanks czheo for pointing out the Z3 problem. btw: The Molly(LDFI) paper is pretty interesting, you can read it when you try to buy a cup of coffee in Santa Cruz.

References

Show your support

Clapping shows how much you appreciated at15’s story.