Skip to content

Latest commit

 

History

History
104 lines (71 loc) · 2.55 KB

Dependencies.md

File metadata and controls

104 lines (71 loc) · 2.55 KB

Dependencies

This page documents how to install necessary dependencies to work with the wire-server code base.

In addition to the information below, you can also consult the Dockerfiles for Alpine Linux, that could serve as inspiration:

General Package dependencies (needed to compile Haskell services)

Fedora:

sudo yum install haskell-platform libstdc++-devel libstdc++-static gcc-c++ libtool automake openssl-devel libsodium-devel ncurses-compat-libs libicu-devel -y

Debian:

sudo apt install libsodium-dev openssl-dev libtool automake build-essential libicu-dev libsnappy-dev libgeoip-dev protobuf-compiler -y

Ubuntu:

Hopefully almost like Debian. Instead of openssl-dev, try libssl-dev.

macOS:

brew install libsodium openssl automake icu4c

Note: macOS users will need to make sure to link Haskell services against a more recent version of OpenSSL than what ships with the OS by default. Additionally, icu4c is installed in a non-standard location by homebrew. Add the following to your .stack/config.yaml:

extra-include-dirs:
- /usr/local/opt/openssl/include
- /usr/local/opt/icu4c/include

extra-lib-dirs:
- /usr/local/opt/openssl/lib
- /usr/local/opt/icu4c/lib

Haskell Stack

curl -sSL https://get.haskellstack.org/ | sh
# or 
wget -qO- https://get.haskellstack.org/ | sh

Ensure stack --version is >= 1.6.5

You may wish to make executables installed by stack available, by e.g. adding the following to your shell profile:

export PATH=~/.local/bin:$PATH

Rust

curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env

cryptobox-c

git clone https://github.com/wireapp/cryptobox-c && cd cryptobox-c
make
make install
# in case `make install` fails due to permissions, edit the Makefile to prepend 'sudo' before the 'cp ... /usr/local...' lines

# Add cryptobox-c to ldconfig
sudo echo '/usr/local/lib' > /etc/ld.so.conf.d/cryptobox.conf
sudo ldconfig

Make sure stack knows where to find it. In ~/.stack/config.yaml add:

extra-include-dirs:
- /usr/local/include

extra-lib-dirs:
- /usr/local/lib

makedeb

Create debian packages, optional, only used in make dist

git clone https://github.com/wire-server && cd wire-server/tools/makedeb
stack install

Docker