1. Carl Pulley
  2. libbap


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 http://volatility.googlecode.com/svn/trunk/ volatility-2.3

svn checkout http://distorm.googlecode.com/svn/trunk/ distorm3
cd distorm3
python setup.py build
sudo python setup.py install
cd ..

git clone https://github.com/OCamlPro/opam.git
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 "core.top"
#require "core.syntax"

svn co https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp stp
cd stp
sudo ./clean-install.sh
cd ..

git clone https://bitbucket.org/carlpulley/libbap.git
cd libbap
sudo python setup.py install
cd ..

git clone https://github.com/carlpulley/distorm.git
cd distorm
oasis setup
ocaml setup.ml -configure
ocaml setup.ml -build
ocaml setup.ml -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 setup.py install.