Clang + GCC + GDB + Cmake Toolchain

All our tools used in the development of Memgraph are manually built for each OS and collected in an archive. Please refer to the memgraph/environment folder for all related code.

<aside> ‼️ NOTE Keep in mind, cargo is also required to build memgraph, follow the official installation guide https://doc.rust-lang.org/cargo/getting-started/installation.html

</aside>

Installation Procedure

To download appropriate toolchain archive for your operating system and unpack it automatically, execute

sudo ./environment/os/install_deps.sh prepare TOOLCHAIN_RUN_DEPS

This will unpack latest toolchain to /opt/toolchain-v5 (for OSes that support latest toolchain).

If you have not already installed toolchain dependencies, please check and install required toolchain runtime dependencies by executing

sudo ./environment/os/install_deps.sh check TOOLCHAIN_RUN_DEPS
sudo ./environment/os/install_deps.sh install TOOLCHAIN_RUN_DEPS

Activate the toolchain:

source /opt/toolchain-v5/activate

In case you need to deactivate the toolchain you can run:

deactivate

<aside> 📺 If easier, watch a video on YouTube showcasing the above details!

</aside>

<aside> 📢 If you put toolchain on some other path, it’s possible to say to the cmake there the root is, that’s done by setting MG_TOOLCHAIN_ROOT environment variable.

That’s also useful where you have different versions of libraries under system compare to what memgraph build process needs. There was a case with zstd.

Introduced in https://github.com/memgraph/memgraph/pull/1868

</aside>

Toolchain Upgrade Procedure

  1. Build a new toolchain for each supported OS (latest versions).