From BlenderWiki
[edit] Installing Dependencies
[edit] Ubuntu Jaunty, Karmic
sudo apt-get install subversion openexr libopenexr-dev build-essential libjpeg-dev \ libpng12-dev libopenal-dev libalut-dev libglu1-mesa-dev libsdl-dev libfreetype6-dev \ libtiff-dev libsamplerate0-dev libsamplerate0-dev python-dev gettext libxi-dev yasm cmake
[edit] Fedora 12
su -c 'yum install gcc gcc-c++ make cmake automake\*'
su -c 'yum install subversion openexr openexr-devel libjpeg-devel libpng12-devel \ openal-soft-devel freealut-devel mesa-libGLU-devel SDL-devel freetype-devel libtiff-devel \ gettext-devel libXi-devel yasm jack-audio-connection-kit-devel libsamplerate-devel \ fftw-devel'
...and if you compile with FFMpeg enabled:
su -c 'yum install ffmpeg-libs ffmpeg-devel xvidcore-devel libogg-devel faac-devel \ faad2-devel x264-devel libvorbis-devel libtheora-devel lame-devel lame-libs'
[edit] Download
cd ~ mkdir blender-svn cd blender-svn svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/blender
If you want to update your svn checkout to the latest source (in ~/blender-svn/blender/ )...
svn update
or just simply svn up.
[edit] Compile
You only need one of these in order to get a blender binary that you can run. Choose whichever you like better.
TODO: Which is the way that is supported by most developers? IIRC e.g. Ton uses make but others use scons?
[edit] Scons
cd ~/blender-svn/blender2.5 echo "BF_OPENAL_LIB = 'openal alut'" >> user-config.py python scons/scons.py
At the end of the build process you will have a blender binary and a message...
Install file: "/home/myname/blender-svn/blender2.5/build/linux2/bin/blender" as "/home/myname/blender-svn/blender2.5/install/linux2/blender" scons: done building targets. *** Success ***
to run blender from the root path "~/blender-svn/blender2.5" you can symlink the binary here...
cd ~/blender-svn/blender2.5 ln -s install/linux2/blender ./blender2.5
Now you can run by typing (in ~/blender-svn/blender2.5 )...
./blender2.5
Rebuild after changing any files (in ~/blender-svn/blender/ )...
python scons/scons.py
Possibly you want to use
python scons/scons.py -j 2
to compile with multi-threading (2 stands for "2 jobs"). For example put "-j 4" if you have a quad-core.
[edit] cmake & make
cd ~/blender-svn/blender2.5 rm blender/CMakeCache.txt mkdir cmake-make cd cmake-make cmake -G "Unix Makefiles" ../ make
"cmake-make" is just an example name for the directoy.
Note
Please note that in some cases the "blender" directory may have a different name.
Some branches are modified copies of the "blender" directory named e.g. soc-2009-name_of_participant. |
You can modify any parameters you want in the file cmake-make/MakeCache.txt
Compiles after changes have been done can be made via the following command:
cmake. && make -j2
(-j2 stands for "2 jobs". For example put "-j4" if you have a quad-core.)
As always, if there is a nicer way to do this please add it here :) --Pontiac 14:01, 14 August 2009 (UTC)
[edit] Setting up Python 3.1
[edit] Install python3.1 from repositories
- Debian - http://wiki.debian.org/Python3
- Ubuntu Karmic
sudo apt-get install python3 python3-dev
[edit] Compile your own Python 3.1
For devs who want to build your own python (if your distro has no py3.1 package yet) this is very easy to do without installing into your system and confusing the package manager.
- Get the Python 3.1 source from here (Python-3.1.1.tar.bz2)
- Extract the Python 3.1 source.
- In the folder where you extracted Python 3.1 source type (note, /opt/py31 is just an example):
- ./configure --prefix="/opt/py31"; make
- sudo make install
- Update your build system to see your Python 3.1 build. This depends on what build system you are using. See below.
Warning
The option --prefix is there to choose a specific folder where you install. If you don't use --prefix, the line
make install will make python 3.1 your system default! If you don't want that, use make altinstallto keep the system's current python version as default. |
[edit] Building Blender with Python 3.1
[edit] Scons with Python 3.1
- Now in your user-config.py set BF_PYTHON to:
- BF_PYTHON="/opt/py31"
- as usual, in /blender run
- python scons/scons.py
[edit] cmake & make with Python 3.1
- Update CMakeCache.txt file like this:
//Missing description PYTHON_INC:STRING=/opt/py31/include/python3.1 //Missing description PYTHON_LIB:STRING=/opt/py31/lib/libpython3.1.a //Missing description PYTHON_LIBPATH:STRING=/opt/py31/lib
If anybody got a simpler way to do this with cmake&make please add it here :) --Pontiac 14:22, 13 August 2009 (UTC)
[edit] External Documentation on Building Blender
Compiling Blender 2.50-svn on Kubuntu 9.04 [[1]]







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