From BlenderWiki
Intro
This guide will help you to compile a svn Blender version on Ubuntu Feisty Fawn. Previous versions may not need some proposed packages.
Getting the packages
Compiling Blender requires you to install quite a few packages, those are available in Synaptic :
- build-essential
- svn-buildpackage
- scons
- libopenal-dev
- libalut-dev
- libsdl1.2-dev
- ftgl-dev
- libpng12-dev
- libjpeg62-dev
- libtiff4-dev
- libopenexr-dev
- libnspr4-dev
- libglut3-dev
- python2.5-dev
- libxmu-dev
- libarts1-dev
- libsmpeg-dev
- libxi-dev
- gettext
- arts
Alternatively you can use terminal and following command:
sudo apt-get install build-essential svn-buildpackage scons libopenal-dev libalut-dev \ libsdl1.2-dev ftgl-dev libpng12-dev libjpeg62-dev libtiff4-dev libopenexr-dev \ libnspr4-dev libglut3-dev python2.5-dev libxmu-dev libarts1-dev \ libsmpeg-dev arts libxi-dev gettext
Yes, with the \ at the end of each line. Or without but all in a single line.
Note that in case you want to build blender with web plugin, you need to get mozilla-dev too. Also you need to use some other build system than scons as scons does not currently support it.
Creating directory for svn repository checkout
It is a good idea to create a directory for a checkout. mkdir command can be used for this. Example: mkdir svn-blender. This will create a new directory called svn-blender under current directory.
Downloading from svn repository
See http://www.blender.org/development/coding-guides/svn-checkout-and-usage/ .
Compiling Blender
SVN has created a new folder called "blender" to store its sources, go into that directory:
cd blender/
Then execute this command:
scons
Alternatively, to compile Blender without the game engine, execute:
scons blendernogame
It will take a while to complete. (~20min on a amd64) The name of the directory may vary based on name of the branch checked out.
Linker Problems
If you get an error message with lines such as "SND_OpenALDevice.cpp:(.text+0xf05): undefined reference to `alutLoadWAVFile'" you can fix it by adding line "BF_OPENAL_LIB = 'openal alut' " (no "'s) to user-config.py which is created to the same directory in which you execute scons as above (branch/blender/).
Launching Blender
The files are stored into ~/svn-blender/install/linux2/ Go into that directory and just type ./blender And it's done ! :)
if you dont want to always have to type in such a long path you can make a symbolic link to blender In a terminal type
ln -s ~/svn-blender/install/linux2/blender ~/svn-blender/blender
How to Update SVN and Compile Blender Again
Easy! Just go to the base dir of the source and svn up, then build again.
cd ~/svn-blender/blender/ svn up scons blendernogame
The up (or update) command will download the differences between your disk files and the ones in the server, so it should be faster than the co (or checkout) command. That is one adventage of building from SVN, you do not need to get the full sources again.
In rare cases, blender will not properly recompile after a SVN update. if you have trouble recompiling, its best update the sources (overwriting any changes you've made) and do a clean build. (Author's note: It is not sure if this applies for SVN. It would be good if someone could verify this.)
cd ~/svn-blender/blender/ svn up -APCd scons clean scons blendernogame
Categories: Linux | Ubuntu | Installation | Compiling







![[]](/skins/blender/open.png)
