From BlenderWiki
Subversion
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 'https://server.com/repo': Certificate verification error: signed using insecure algorithm (https://server.com/repo)
Here is the work around:
In the [groups] section (before [global]) of your ~/.subversion/servers add the following:
blender = svn.blender.org [blender] ssl-trust-default-ca = no
Python
Compiling
Blender 2.6x needs Python 3.3, it won't build with any older Python versions, thus it is an important dependency.
If your distro has no python3.3 package yet, this is very easy to compile without installing into your system and confusing the package manager.
- Get the Python 3.3 source from here (Python-3.3.0.tar.bz2)
- Extract the Python 3.3 source.
- In the folder where you extracted Python 3.3 source type (note, /opt/py33 is just an example):
./configure --prefix="/opt/py33"
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
- Now type:
make; sudo make install
- Later you will need to setup your blender build system (cmake or scons) to find your Python 3.3 build.
Compiling with 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 wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz && tar -xvf Python-3.3.0.tgz # make install ./configure make sudo make altinstall # make 3.3 the default python system wide (number 1 at the end stays there) sudo update-alternatives --install /usr/bin/python python /your/path/to/python3.3 # 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.3 installation path. If your distro already uses Python 3.3, 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
BF_PYTHON_ABI_FLAGS_SUFFIX
Set its content to any combination of 'dmu', or empty.
Manually built Python
In case you have compiled your own Python in
/opt/py33
go in in your user-config.py file and change the following :
BF_PYTHON = '/usr/local' BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' BF_PYTHON_VERSION = '3.3' WITH_BF_STATICPYTHON = False BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' 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'] BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
into :
BF_PYTHON_ABI_FLAGS_SUFFIX = "m" # may be any combination of 'dmu' or empty BF_PYTHON = '/opt/py33' BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' BF_PYTHON_VERSION = '3.3' BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS_SUFFIX BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS_SUFFIX BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic', '-ltk8.5', '-ltcl8.5', '-lz'] BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS_SUFFIX + '.a'
Note that this is an example, use your own Python 3.3 installation path (use the absolute path!). By default the file user-config.py does not exist. You have to create a file called user-config.py 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, linux2-config.py).
Setting Python Paths in CMake
In case you have compiled your own Python in
/opt/py33
please update CMakeCache.txt file like this:
PYTHON_INCLUDE_DIR:STRING=/opt/py33/include/python3.3 PYTHON_LIBPATH:STRING=/opt/py33/lib PYTHON_LIBRARY:STRING=python3.3;-ltk8.5;-ltcl8.5;-lz PYTHON_VERSION:STRING=3.3
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
PYTHON_INCLUDE_DIR:STRING=/opt/py33/include/python3.3d PYTHON_LIBPATH:STRING=/opt/py33/lib PYTHON_LIBRARY:STRING=python3.3d;-ltk8.5;-ltcl8.5;-lz PYTHON_VERSION:STRING=3.3
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.
OpenCOLLADA
TR1
To be able to use OpenCOLLADA, make sure your compiler supports TR1
|
Dependencies
On some distros (ubuntu) you need to install the pcre lib:
sudo apt-get install libpcre3-dev
Checkout revision 839
Note, OpenCollada has changed it's repository to code.google.com. Make sure to make a fresh svn check out.
svn checkout http://opencollada.googlecode.com/svn/trunk/@839 opencollada
or if you have a working copy already:
svn update -r 839
Also apply two patches from http://code.google.com/p/opencollada/issues/detail?id=164 I also needed this patch: http://www.pasteall.org/22607 (Thanks to nazgul on IRC)
Note I had problems getting the patch command to apply some of those patches (line ending issues), so I had to do it manually (pjoe)
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
scons
Add these lines to your user-config.py:
WITH_BF_COLLADA = True BF_OPENCOLLADA = "[opencollada-dir]" # replace [opencollada-dir] with an _absolute_ path to your opencollada source tree
Build
python scons/scons.py
cmake
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 make
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
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
|
Introduction
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.
- Change to a non default library path. Your home directory would work such as /home/yourhome/yoursources.
- Checkout ffmpeg:
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
- Configure ffmpeg:
cd ffmpeg; ./configure --enable-gpl --prefix=/home/yourhome/yoursources
- Make ffmpeg:
make - 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
- Configure Blender.
If you already have a user-config.py file in your Blender source directory, you will edit it.
If you don't, copy the linux2-config.py file from ./config to the root directory and rename it user-config.py.
Adjust the following variable:BF_FFMPEG = '/home/yourhome/your-ffmpeg-prefix-setting-above' - 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 user-config.py file and add
# enable ffmpeg support WITH_BF_FFMPEG = True BF_FFMPEG = '/usr' BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice' BF_FFMPEG_INC = '${BF_FFMPEG}/include/ffmpeg' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
This should help finding the header files that ubuntu install in a ffmpeg directory.