Skip to content

Build tips and tricks

Ivan Gotovchits edited this page Jul 29, 2020 · 27 revisions

Getting latest development version

We have the opam-repository that is automatically updated with the new version of bap every time we merge a PR to the master branch (in fact it just pulls the source code from the master branch of BAP upstream repository). Therefore to get access to the latest development of BAP just add it to the list of your opam repositories, with the following command:

opam repo add bap-testing git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing

and then you can do

opam install bap

to get the latest version of BAP, or, if you miss the system dependencies,

opam depext --install bap

Building BAP repository

Disclaimer, it is easier to build and install bap using opam. But if you really want to have the source code of bap and an ability to modify and reinstall it, here are simple instructions.

opam switch create 4.09.0 # creates a new switch
eval $(opam env) # activates the opam switch
git clone [email protected]:BinaryAnalysisPlatform/bap.git 
cd bap
# the next three commands will install bap depedencies from opam
opam pin add . -n 
opam depext bap # installs the system dependencies
opam install bap --deps-only # installs OCaml dependencies
opam pin remove bap
# enables every bap component
./configure --enable-everything --prefix=`opam config var prefix`
make && make reinstall

Staying in sync

To update to the latest available version of BAP issue the following two commands:

opam update bap
opam upgrade

If you don't want to upgrade all your opam stack, then you can upgrade just bap,

opam upgrade bap

Installing on other operating systems

We believe that BAP can be installed on any system with recent compiler toolchain. The hardiest problem is to install system dependencies. As a stating approximation, you can take a look at our system dependencies on Ubuntu 14.04, and extrapolate them to your system,

opam list --safe --recursive --external=ubuntu --required-by=bap

If you managed to install BAP on another system, please share your success story with us!

Clone this wiki locally