From BlenderWiki

Jump to: navigation, search


Certificate verification error

If you try to check out your code from a hosted subversion repository, under Ubuntu 10.04 or newer, you may be disappointed to have it fail with the error:

svn: OPTIONS of '': Certificate verification error: signed using insecure algorithm  (

Here is the work around:

In the [groups] section (before [global]) of your ~/.subversion/servers add the following:

blender =
ssl-trust-default-ca = no



Blender 2.7x needs Python 3.4, it won't build with any older Python versions, thus it is an important dependency.

If your distro has no python3.4 package yet, this is very easy to compile without installing into your system and confusing the package manager.

  1. Get the Python 3.4 source from here (Python-3.4.3.tar.bz2)
  2. Extract the Python 3.4 source.
  3. In the folder where you extracted Python 3.4 source type (note, /opt/py34 is just an example):
    ./configure --prefix="/opt/py34"

by default Py3.X doesn't build zlib, and some addons in blender (ie:luxblend) need it so make sure to install zlib and zlib-dev libraries in your system and then uncomment the following line

"zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz"

in the Modules/Setup file in the python source

  1. Now type:
    make; sudo make install
  2. Later you will need to setup your blender build system (cmake or scons) to find your Python 3.4 build.

Compiling (Linux/Generic)

# get source
tar -xvf Python-3.4.0.tgz
# make install
cd Python-3.4.0
./configure --prefix=/opt/py34
sudo make install

Compiling (Linux/Ubuntu)

# get required packages for build
sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev
# get source
tar -xvf Python-3.4.0.tgz
# make install
cd Python-3.4.0
sudo make altinstall
# make 3.4 the default python system wide (number 1 at the end stays there)
sudo update-alternatives --install /usr/bin/python python /your/path/to/python3.4
# ensure various versions of python play nice with each other
sudo update-alternatives --config python

Setting Python Path in SCons

Distro Python package

Scons needs to know the Python 3.4 installation path. If your distro already uses Python 3.4, you probably don't need to do anything. But do check what ABI settings have been used for your distro package. The variable to govern this is


Set its content to any combination of 'dmu', or empty.

Manually built Python

In case you have compiled your own Python in


go in in your file and change the following :

BF_PYTHON = '/usr/local'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/#config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']

into :

BF_PYTHON_ABI_FLAGS_SUFFIX = "m"  # may be any combination of 'dmu' or empty
BF_PYTHON = '/opt/py34'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic', '-ltk8.5', '-ltcl8.5', '-lz']

Note that this is an example, use your own Python 3.4 installation path (use the absolute path!). By default the file does not exist. You have to create a file called in the root directory of the Blender source. All the configuration in this file will override the ones in your Scons config file (for example,

Setting Python Paths in CMake

In case you have compiled your own Python in


please update CMakeCache.txt file like this:


This is an example, use your own python installation path.

Note, a debug python will have a 'd' suffix, depending on your configuration you may have to add suffix chars 'd', 'm' & 'u' eg


Note, these settings can now be done from the ccmake or cmake-gui section (as outlined above) by entering these values in the appropriate sections.

If you choose a GUI, after you modify the parameters you need to re-configure and re-generate makefiles: for example in ccmake you can re-configure by pressing C and re-generate makefiles by pressing G.


To be able to use OpenCOLLADA, make sure your compiler supports TR1


On some distros (ubuntu) you need to install the pcre lib:

sudo apt-get install libpcre3-dev


Build with

The preferred way to build Opencollada is to use the script which knows which exact version of collada is needed for the Blender release that you want to build. you can find the script in the Blender source distribution at the location:


Build manually from source

If you want to build Opencollada, then get the sources from Make sure to make a fresh git check out. However you need to know which exact version you have to checkout. You find this information in, function compile_OpenCOLLADA().

For Blender 2.68 you can checkout:

git checkout e886e196673222f2f4bc32b936dc96419fff815f 

Then follow the build instructions.

Build OpenCollada

scons XMLPARSER=expatnative

Copy libs into ./lib

Blender's scons and cmake expect OpenCollada's libs to be in [opencollada-dir]/lib directory. Create ./lib and copy OpenCollada libs into it with:

mkdir lib
find . -iname "*.a" | xargs cp -vt lib

Enable COLLADA support in Blender


Add these lines to your

BF_OPENCOLLADA = "[opencollada-dir]" # replace [opencollada-dir] with an _absolute_ path to your opencollada source tree


python scons/


mkdir build-cmake
cd build-cmake
# generate makefiles
env OPENCOLLADA_ROOT_DIR=[opencollada-dir] cmake -G 'Unix Makefiles' -D EXPAT_LIB=expat -D WITH_OPENCOLLADA=ON [other build options] [source-directory] # optional: -D CMAKE_BUILD_TYPE=Debug

Note: [source-directory] is NOT optional in the above cmake command. Just replace it with your blender source directory (as usual with cmake out-of-source builds).

You can also set PCRE and EXPAT paths with the above cmake command. By default they are expected to be in /usr/lib and /usr/include.


FFMpeg for blender 2.59 and higher
The dependency has changed to ffmpeg 0.7. For windows, new libraries are already included in the lib folder. For linux, check the migration guide: User:Nazg-gul/FFmpegUpdate


Since Blender's revision r26894, FFMPEG your system's default libraries. If you are compiling Blender from the sources, you will likely encounter a few migration issues.

What does this mean to me?

This now means that you will need to supply the proper development libraries for ffmpeg. This is exactly the same process as for any other compilation.

What are the libraries?

Depending on your platform, ffmpeg will sometimes be packaged into separate libraries. For example, under Ubuntu 9.10, the libraries in question are libavcodec-dev, libavdevice-dev, libavformat-dev, libswscale-dev, and libavutil-dev by default.

What if I want to use the official FFMPEG SVN?

There are significant changes between FFMPEG stable releases and the ones in SVN. Stable releases of FFMPEG may cause blender to not build due to header file include path issues. Depending on your platform, you will need to acquire the SVN version, compile it, and configure your Blender configuration environment.

Compiling FFMPEG in a non default path

(Tested on Linux: Ubuntu 9.10 amd64 / i386)

Due to default library paths, compiling a local copy of ffmpeg can cause headaches. In order to prevent default library issues, it is advised that you locate the SVN version of ffmpeg away from the default library paths.

  1. Change to a non default library path. Your home directory would work such as /home/yourhome/yoursources.
  2. Checkout ffmpeg:
    svn checkout svn:// ffmpeg
  3. Configure ffmpeg:
    cd ffmpeg; ./configure --enable-gpl --prefix=/home/yourhome/yoursources
  4. Make ffmpeg:
  5. Install it. Note that sudo is not required if you stay within your home directory.
    make install

Setting Scons to use your new FFMPEG path

  1. Configure Blender.
    If you already have a file in your Blender source directory, you will edit it.
    If you don't, copy the file from ./config to the root directory and rename it
    Adjust the following variable:
    BF_FFMPEG = '/home/yourhome/your-ffmpeg-prefix-setting-above'
  2. Compile Blender as normal.

Depending on your system configuration, you may need to further refine the above steps. The most important thing to note here however, is that default library paths will overrule your customized libraries.

Setting paths for system FFmpeg in Scons

If you have compiled your own FFMPEG please follow instructions written here.

Otherwise, if you want to build Blender with the system ffmpeg, go in in your file and add

 # enable ffmpeg  support
 BF_FFMPEG = '/usr'
 BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
 BF_FFMPEG_INC = '${BF_FFMPEG}/include/ffmpeg'

This should help finding the header files that ubuntu install in a ffmpeg directory.