diff options
Diffstat (limited to 'INSTALL.md')
| -rw-r--r-- | INSTALL.md | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -1,26 +1,22 @@ -These are instructions for installing Sail via opam, the ocaml package manager. -The most up-to-date version of this document can be found on the Sail wiki +# How to install Sail using opam (OCaml package manager) -https://github.com/rems-project/sail/wiki/OPAMInstall +First, install opam if you haven't already. You can use your system's package +manager e.g. `sudo apt-get install opam` or follow the [instructions +from the opam website](https://opam.ocaml.org/doc/Install.html). +Depending on your system and how you installed opam you may get either +opam version 1 or 2. Opam 1 is no longer officially supported but our +packages should work with either. -To build everything from source, instructions can be found here: - -https://github.com/rems-project/sail/wiki/Building-from-Source - -# How to install Sail from opam - -Install opam if you haven't already: https://opam.ocaml.org/doc/Install.html - -Use opam to install a version of ocaml we know works for us: +Use `ocaml -version` to check your OCaml version. If you do not have OCaml 4.06.1 or newer then use `opam switch` to install it e.g.: ``` opam switch 4.06.1 ``` OR, if you are using opam >=2.0, the syntax of the switch command changed slightly: ``` -opam switch create ocaml-base-compiler.4.06.1 +opam switch create 4.06.1 ``` -Then set up the environment for the ocaml we just installed: +Then set up the environment for the OCaml we just installed: ``` eval `opam config env` ``` @@ -32,11 +28,11 @@ Install system dependencies, on Ubuntu: ``` sudo apt-get install build-essential libgmp-dev z3 ``` -or homebrew: +or MacOS homebrew: ``` brew install gmp z3 ``` -Install sail and its dependencies: +Finally, install sail and its dependencies: ``` opam install sail ``` |
