From 5282f4eb3d3a776cdc095509048e694215787a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Tue, 16 Jul 2019 10:36:26 +0200 Subject: [PATCH] Makefile: clarify bap/opam installation --- Makefile | 5 +++-- README.md | 26 +++++++++++++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8920bc3..a2f9067 100644 --- a/Makefile +++ b/Makefile @@ -49,5 +49,6 @@ $(TARBALL): --exclude=*.cmi \ --exclude=*.cmx \ --transform='s#^#dwarfsynth/#g' \ - DwarfSynth dwarfsynth.ml DwarfSynth.mlpack libdwarfw LICENSE Makefile \ - README.md synthesize_dwarf.sh _tags + csmith DwarfSynth dwarfsynth.ml DwarfSynth.mlpack HEURISTICS.md \ + libdwarfw LICENSE Makefile README.md synthesize_dwarf.sh _tags \ + testsuite diff --git a/README.md b/README.md index c0bddc8..7e8aeef 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ examine its assembly code and, based solely on that, generate the corresponding This tool relies on -* [BAP](https://github.com/BinaryAnalysisPlatform/bap) version 1.6 as of today, +* `opam` set up with an OCaml 4.05 switch (see below), +* [BAP](https://github.com/BinaryAnalysisPlatform/bap) version 1.5 as of today, which is available through OPAM; * `objcopy`, often packaged as `binutils` * `libelf` @@ -20,10 +21,25 @@ This tool relies on ### Installing dependencies You should be able to easily install `objcopy` (`binutils`), `libelf`, -`libdwarf` and `opam` via your package manager. Once -[`opam` is set up](https://opam.ocaml.org/doc/Install.html), you should be able -to simply `opam install bap`. We recommand that you use a fresh `opam switch` -in case you already have installed packages with `opam`. +`libdwarf` and `opam` via your package manager. + +Once [`opam` is set up](https://opam.ocaml.org/doc/Install.html), you will have +to use an `OCaml 4.05` opam switch. If you are not familiar with opam, we +recommand using a fresh switch: + +```bash +# If you never used opam before on this session: +opam init +eval $(opam config env) + +opam switch create dwarf-synthesis ocaml-base-compiler.4.05.0 # With opam 2 +# OR +opam switch dwarf-synthesis --alias-of 4.05.0 # With opam 1.x + +# Always: +eval $(opam config env) +opam install bap +``` ## Compiling