This page documents how to install Elixir, Erlang and the necessary compilers and build tools for using PolyHok v1.1 on Debian-based Linux distributions (such as Debian, Ubuntu, Linux Mint etc).
The official asdf documentation explains how to install the tool in great detail, but you can follow these steps for convenience:
sudo apt install git bash $PATH. You can create a folder like ~/.mybins and add it to your path, or simply move the file to /usr/local/bin/. $PATH by running: type -a asdf The output of this command must be the path where you moved the asdf binary. $PATH. This is mandatory for it to work. Open ~/.bash_profile in a text editor (like nano) and append the following line to the end of the file: export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" . <(asdf completion bash) exec $SHELL asdf uses plugins to manage different versions of a tool. Since we want to use Elixir and Erlang, we need to install the appropriate plugins made for them.
sudo apt install -y curl asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git asdf list all elixir Once you choose an Elixir version, note its corresponding Erlang/OTP version to install. For example, if you pick Elixir 1.19.3-otp-29, you must install Erlang 29. Remember: PolyHok requires Elixir v1.17 at minimum to work!
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk sudo apt-get -y install build-essential autoconf m4 libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk sudo apt-get -y install build-essential autoconf m4 libncurses-dev libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils openjdk-17-jdk sudo apt-get -y install build-essential autoconf m4 libncurses-dev libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils openjdk-21-jdk If your OS is not listed here, please check the official Erlang asdf plugin documentation on GitHub.
asdf install erlang 29.0unzip (required by the Elixir plugin) and install Elixir: sudo apt install -y unzip
asdf install elixir 1.19.3-otp-29iex, mix, and elixir will route to these versions anywhere on your terminal: asdf set --home erlang 29.0
asdf set --home elixir 1.19.3-otp-29Now that Elixir and Erlang are installed and configured, the final step is to install the dependencies required for your chosen PolyHok backend. The steps below are tagged according to your desired backend.
sudo apt install -y erlang-dev cmake clinfo to view your machine's OpenCL platforms and configurations: sudo apt install -y clinfo sudo apt install -y mesa-opencl-icd ~/.bashrc: export RUSTICL_ENABLE='radeonsi' sudo mv /etc/OpenCL/vendors/mesa.icd /etc/OpenCL/vendors/mesa.icd.disabled
Warning: The value 'radeonsi' enables rusticl for AMD GPUs. If you use a different manufacturer, check the Mesa documentation for the correct environment variable value.
sudo apt install -y ocl-icd-opencl-dev opencl-c-headers opencl-clhpp-headers Now you are ready to go!