These are instructions on how to build Ligo from source in Ubuntu. For ordinary user installs, see the doc website.
In order to build Ligo, you may need to install:
opam
- OCaml package manager,pkg-config
tool for finding library compilation flags,cargo
- rust package manager for Rust interoperability (needed for the Tezos Edo protocol)- libraries with include files:
libev
- event handling librarylibhidapi
libffi
- foreign function interface librarylibgmp
- arbitrary size integer library
For tests:
pip3
- Python package manager for Python CLI utilitiesjsonschema
- Python CLI utility to JSON validation
-
Please first install necessary build tools and libraries with:
apt update apt install -y opam cargo make pkg-config libhidapi-dev libev-dev libgmp-dev libffi-dev
opam
andcargo
can be installed via their installation scripts instead of fromapt
, if desired. See the opam and rustup install instructions.Also for tests run:
apt install -y python3-pip pip3 install jsonschema
-
Then you may want to initialize
opam
:opam init --bare --auto-setup
-
Now you are ready to start building Ligo itself. To build and run the tests:
make
To only build:
make build
For an example Ubuntu-based Docker image, see [Dockerfile.ubuntu
][./Dockerfile.ubuntu].
-
Please first upgrade the default
make
anddifftools
installations by executing:brew install make echo -n 'export PATH = ${HOMEBREW_PREFIX}/opt/make/libexec/gnubin:$PATH' >> ~/.zshenv
and
brew install difftools echo -n 'export PATH = ${HOMEBREW_PREFIX}/opt/difftools/bin:$PATH' >> ~/.zshenv
Restart your shell or execute
source ~/.zshenv
to ensure these changes take effect.