Build From Sources

Requirements

To compile LibrePCB, you need to install the following tools & libraries first:

  • g++, MinGW or Clang (any version with C++20 support should work)

  • Rust >= 1.88 toolchain (GNU, not MSVC)

  • Qt >= 6.2 (make sure the imageformats plugin is installed too as it will be needed at runtime)

  • OpenCASCADE OCCT or OCE (optional, OCCT highly preferred)

  • OpenGL Utility Library GLU (optional)

  • OpenSSL

  • CMake 3.22 or newer

Get the Sources

It is very important to use the correct sources:

  • Do NOT clone any branch (e.g. master) from our repository on GitHub! These sources are not compatible with the stable file format of LibrePCB.

  • Do NOT use the archives provided at the GitHub Releases page. These do not include the submodules and thus can’t be compiled.

  • It’s fine to clone the official release tag (current: 2.0.0) from our repository on GitHub, just keep in mind to pass --recursive to also get all the submodules.

For convenience, we provide an official source archive which contains all the required files (including submodules) and has stripped any unnecessary files: librepcb-2.0.0-source.zip

wget "https://download.librepcb.org/releases/2.0.0/librepcb-2.0.0-source.zip"
unzip ./librepcb-2.0.0-source.zip
cd ./librepcb-2.0.0

Build LibrePCB

Within the downloaded source directory, execute the following commands:

mkdir build && cd build
cmake ..
make -j8

Additional Resources

These are just the most important commands. For more details (e.g. the available configuration flags), check out the following resources: