blob: e96c80b6878b2f48648de6baf8d33487c5654fe8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# How to install Sail using opam
First, install opam (the OCaml package manager) 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.
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 4.06.1
```
Then set up the environment for the OCaml we just installed:
```
eval `opam config env`
```
Add our local opam repo:
```
opam repository add rems https://github.com/rems-project/opam-repository.git
```
Install system dependencies, on Ubuntu:
```
sudo apt-get install build-essential libgmp-dev z3
```
or MacOS homebrew:
```
brew install gmp z3
```
Finally, install sail and its dependencies:
```
opam install sail
```
If all goes well then you'll have sail in your path:
```
which sail
sail --help
```
Some source files that sail uses are found at ``opam config var sail:share`` (e.g. for ``$include <foo.sail>``) but sail should find those when it needs them.
### Installing development versions of Sail
Released Sail packages lag behind the latest development in the repository. If you find you need a recently added feature or bug fix you can use opam pin to install the latest version of Sail from the repository. Assuming you have previously followed the above instructions (required to install dependencies):
```
git clone https://github.com/rems-project/sail.git
cd sail
opam pin add sail .
```
will install from a local checkout of the Sail sources.
You can update with new changes as they are committed by pulling and reinstalling:
```
git pull
opam reinstall sail
```
To remove the pin and revert to the latest released opam package type:
```
opam pin remove sail
```
Alternatively you could follow the instructions to [build Sail manually](BUILDING.md), optionally skipping the steps to install ott, lem and linksem if they were already installed via opam.
|