Template:Building Blender/Linux/dependencies

Advanced Setup

Automatic Dependency Installation

When not using precompiled libraries, the preferred way to install dependencies under Linux is to use the install_deps.sh script in the Blender sources. It will install system packages where possible, and if needed can build some libraries from source.

It currently supports Debian (and derivatives), Ubuntu, Fedora, Suse and Arch distributions. It is executed as follows.

cd ~/blender-git
./blender/build_files/build_environment/install_deps.sh

Some commands in this script requires sudo, so you'll be likely be asked for your password. When the script finishes installing/building all the packages, it prints the instructions to configure the build with the required CMake parameters.

For other distributions, it can:

  • Print the list of all main dependencies needed to build Blender (--show-deps option).
  • Attempt to build main 'big' libraries you cannot easily install from packages (--build-foo options, see --help of the script for details).

Important It might be required to re-run install-depsh.sh once in a while, as Blender updates its dependencies. You will typically want to try this when you have build errors after updating the sources.

This scripts accepts some optional command lines arguments (use --help one to get an exhaustive list), among which:

--source <path>
Where to store downloaded sources for libraries we have to build (defaults to ~/src/blender-deps).
--install <path>
Where to install the libraries we have to build (defaults to /opt/lib).
--with-all
Include some extra libraries that are by default not considered mandatory (main effect of this one is building OpenCollada).


Portable Builds

The above instructions install packages through the system package manager. This makes it possible to share packages between Blender and other software, however the resulting builds will generally not work on other computers.

When using the precompiled libraries, builds are portable and can be shared with others. These libraries are built from source, and this system can also be used to create your own portable libraries.

Running make deps will build libraries in ../lib/linux_x86_64, which will be automatically picked up when building Blender itself.

Besides the libraries, the glibc version of the system affects portability. Builds will only run on Linuxes with the same or higher glibc version. Official builds are made with RHEL 7 and glibc 2.17.