Dev:Doc/Building Blender/Linux/dependencies

提供: wiki
移動先: 案内検索

2. Install/Update the dependencies

Automatic dependencies installation

The preferred way to install dependencies under Linux is now to use the install_deps.sh script featured with Blender sources. It currently supports Debian (and derived), Fedora, Suse and Arch distributions. When using the install_deps.sh script, you are only required to install the following dependencies:

git, build-essential

Then, get the sources and run install_deps.sh

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

This script works for Debian/Redhat/SuSE/Arch based distributions, both 32 and 64 bits.

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).
Exclamation mark.png

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.

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'll print which parameters for CMake you should use to build Blender.

+ install_deps.sh options

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).



+ Manual Dependency Installation (optional)

Manual Dependency Installation

To manually install Blender's dependency packages:

git, build-essential, libx11-dev, libxi-dev, libsndfile1-dev, libopenexr-dev, 
libopenjpeg-dev, libpng12-dev, libjpeg-dev libopenal-dev, libalut-dev, python3.5-dev, 
libglu1-mesa-dev, libsdl-dev, libfreetype6-dev, libtiff4-dev, 
libavdevice-dev, libavformat-dev, libavutil-dev, libavcodec-dev, libswscale-dev, 
libx264-dev, libxvidcore4-dev, libmp3lame-dev, libspnav-dev, python3.5

As a final note, here are the key libraries that you may want to use with Blender:

Python (3.5)
Needed for interface scripts (building without Python is supported but not meant for general use).
Boost (min 1.49)
Necessary for Cycles, OSL, Audaspace, Internationalization…
OpenColorIO (min 1.0)
Necessary to handle color spaces.
OpenImageIO
Necessary for Cycles and OSL (min 1.1 in this case).
LLVM (min 3.0)
Necessary for OSL.
OpenShadingLanguage
Enable custom shaders under Cycles.
FFMPEG or libav (ffmpeg fork)
For handling most video formats/codecs.
OpenVDB (min 3.1)
For caching of smoke simulations.

See also: Building Dependencies From Source