Clone wiki

libbap / Installation

Environment Configuration and Installation

Build a default Ubuntu 12.04 desktop (64 bit) virtual machine.

Execute the following commands to now configure this machine (answer yes or y to any questions):

sudo apt-get install gnome-session-fallback # Omit if you're actually happy with the Unity interface!
sudo apt-get install subversion git mercurial
sudo apt-get install python-setuptools ipython python-dev
sudo apt-get install xdot flex bison binutils-dev automake 
sudo apt-get install libpcre3-dev zlib1g-dev libgmp3-dev g++ libtool
sudo apt-get install gcc-multilib g++-multilib lib32z1-dev
sudo apt-get install ocaml ocaml-native-compilers camlp4-extra
sudo apt-get install libpcre3-dev curl build-essential m4 libffi-dev

svn checkout volatility-2.3

svn checkout distorm3
cd distorm3
python build
sudo python install
cd ..

git clone
cd opam
sudo make install
cd ..
opam init
opam switch 4.00.1
eval `opam config env`
opam install core core_extended async
opam install utop batteries ounit zarith pcre-ocaml
opam install piqi protobuf ctypes llvm camlidl otags
cat >> ~/.ocamlinit <<END
#use "topfind"
#require ""
#require "core.syntax"

svn co stp
cd stp
sudo ./
cd ..

git clone
cd libbap
sudo python install
cd ..

git clone
cd distorm
oasis setup
ocaml -configure
ocaml -build
ocaml -install
cd ..


  1. opam install llvm may fail with building. This appears to be related to the use of make -j9? If you hit this issue, simply change into the failed build directory and manually make and make install yourself.
  2. if installing libbap fails with something like ocamlfind: Package XXXX not found, then switch to a root shell (e.g. sudo -s) and, after executing eval `opam config env`, manually install with python install.