View Full Version : HOWTO: Compile Blender 2.5 SVN
skkeeper
August 18th, 2009, 09:39 PM
Blender is THE free 3D graphics application and the version 2.5 his expected to introduce some outstanding changes to its workflow. For all of you, like me, who dont like to wait months for a stable release, I'll present you a way of downloading the source code and compiling it yourselves.
This guide was tested in Ubuntu 9.04 Jaunty Jackalope.
Installing Dependencies
sudo apt-get install build-essential scons g++ libx11-dev libgl1-mesa-dev libxi-dev zlib1g-dev libpng12-dev libglu1-mesa-dev libjpeg62-dev libfreetype6-dev libtiff4-dev libopenexr-dev libsdl1.2-dev libopenal-dev python2.6-dev libfftw3-dev libsamplerate0-dev libjack-dev libavformat-dev libxvidcore4-dev libogg-dev libfaac-dev libfaad-dev libx264-dev libmp3lame-dev libvorbis-dev libtheora-dev libswscale-dev libavdevice-dev subversion
If youre going to follow this guide, ALL THIS PACKAGES must be installed sucessfully.
Getting and Compiling Python 3.1.1
Get the Source Code tarball here: http://www.python.org/download/
Extract it and cd into it
Configure before compiling:
./configure --prefix=/usr --enable-shared
Now compile
make
Finally lets install
sudo make install
Getting and Compiling Blender 2.5 SVN
Create a new folder where you're gonna save the source code
Now let's get our hands on the source code:
svn checkout https://svn.blender.org/svnroot/bf-blender/branches/blender2.5
Enter the folder you just checked out
cd blender
Let's define some settings for the compilation
nano user-config.py
Paste and save the following:
WITH_BF_FFMPEG = 'true'
BF_FFMPEG_LIB = 'avformat avcodec avutil xvidcore ogg faac faad x264 mp3lame vorbis theora vorbisenc swscale avdevice'
WITH_BF_OPENAL = 'true'
WITH_BF_GAMEENGINE='true'
WITH_BF_FFTW3 = 'true'
WITH_BF_PLAYER='false'
WITH_BF_VERSE='false'
WITH_BF_YAFRAY='false'
BF_PYTHON_VERSION = '3.1'
WITH_BF_JACK = 'true'
Finally lets compile
scons
Now lets clean
scons clean
The binaries should be created so lets go to the right folder
cd ../install/linux2
And finnaly run blender
./blender
This is my first tutorial for Ubuntu Forums, so any question or feedback please post here:). Namaste
-Zeus-
September 3rd, 2009, 06:22 PM
Great post, but actually, the proper svn for 2.5 is:
svn checkout https://svn.blender.org/svnroot/bf-blender/branches/blender2.5
The svn you provided is just the current branch, currently 2.49b.
skkeeper
September 3rd, 2009, 08:00 PM
Great post, but actually, the proper svn for 2.5 is:
svn checkout https://svn.blender.org/svnroot/bf-blender/branches/blender2.5
The svn you provided is just the current branch, currently 2.49b.
Thank you, my mistake. I compiled both versions for personal use and confused the svn url when i did the tutorial.
Sorry for the mistake and I'll correct it in the main post
caddict
September 7th, 2009, 08:07 PM
i am trying to install blender 2.5 on 8.10. first problem is
Couldn't find package python2.6-dev
i guess it is not in the 8.10 repositories
am i wasting my time to try installing on 8.10?
kevdog
September 8th, 2009, 12:04 AM
try python2.4-dev -- I know that's in the intrepid repositories
caddict
September 8th, 2009, 05:07 PM
thanks kevdog, i may give that a try. i think blender 2.5 needs python 2.6 and 3.1 but really not sure.
i am building up the strength to do a fresh install of jaunty, so i may just hold off until then.
but i am keen to have a play with the new blender!
caddict
September 15th, 2009, 02:05 AM
thanks skkeeper
i have upgraded to 9.04 and your instructions worked perfectly.
now to explore blender 2.5!
lubosz
September 23rd, 2009, 08:36 PM
great news. the proper blender 2.5 svn is trunk:
https://svn.blender.org/svnroot/bf-blender/trunk/blender
Labello
October 3rd, 2009, 08:51 AM
Well it did actually work but performance is soooo bad. about 1FPS. the blender from karmic repos works without such an issue.
caddict
October 3rd, 2009, 06:17 PM
also some good builds at
http://www.graphicall.org/builds/
mo0nykit
October 12th, 2009, 09:03 AM
Hello!
Before attempting to follow this HOWTO, I asked around at #python about upgrading to Python 3.1.1 in Jaunty.
These things I only learned from there:
An important thing to note is that Jaunty uses Python 2.6 as a system default. According to their advice, this command could cause problems sudo make install # may cause problems So instead of that, it should be sudo make altinstall
infinitybrain
October 13th, 2009, 05:45 AM
hey thanks for all skseeker but it doesn't work.its still causing Segmentation fault's .When i try to start it from terminal by writing ./blender from /install/linux2 is says no such file or directory . I've done every thing .is it causing because my displaycard is on board ?.
.i'm 3ds max creator but ive changed my OS to linux and im trying to learn blender .
So Please Help Me !! my OS is Ubuntu 9.04 jaunty
vinutux
October 13th, 2009, 06:21 AM
Well it did actually work but performance is soooo bad. about 1FPS. the blender from karmic repos works without such an issue.
Blender from karmic repos is version 2.49a v.2.5 still under active development...
caddict
October 14th, 2009, 02:17 AM
i have been downloading "latest blender builds" from graphicall.org - look for builds by Fish, they are compiled on 9.04 - after installing python as above, i just unpack those builds and run blender direct from that directory. no problems.
infinitybrain
October 14th, 2009, 03:42 AM
srry man but its still causing segmentation fault .Guess i've done something wrong back there . i'll try to fix it
caddict
October 14th, 2009, 03:01 PM
just an idea to keep you going. if you are wanting to learn blender, you could run v2.49 (which i think is in the jaunty repos)...until you can get 2.5 working. 2.5 is pretty different but the basic priciples are still the same. also, there are a lot of features in 2.5 which are not working yet, so that could be frustrating.
infinitybrain
October 14th, 2009, 08:30 PM
yeah but i'm still don't know how to work blender 2.49a or 2.49b in Ubuntu 9.04 any suggestions
infinitybrain
October 14th, 2009, 08:53 PM
i found it how stuped i m i skiped this error
see
/usr/bin/ld: cannot find -lgettextlib
collect2: ld returned 1 exit status
scons: *** [/home/bagi/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.
it caused while scons
and what is -gettextlib
help pls
im bit new in linux
mo0nykit
October 15th, 2009, 02:32 AM
EDIT: I figured out my mistakes relating to this post. Look here post #20 (http://ubuntuforums.org/showpost.php?p=8107501&postcount=20)
I have Python 3.1.1 installed in
$HOME/python/Python-3.1.1-installI copied the linux2-config.py to the top of the source tree as user-config.py
cp ~/blender-source/blender/config/linux2-config.py ~/blender-source/blender/user-config.pyIn my user-config.py, I edited BF_PYTHON= to match my Python3.1.1 installation. Included here are also the other unedited variables relating to Python
# user-config.py
<--cut-->
BF_PYTHON = '$HOME/python/Python-3.1.1-install'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.1'
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 = BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a' #'python${BF_PYTHON_VERSION}'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
<--cut-->However I cannot finish compiling. It complains that it cannot find Python.h. Is there something wrong in my user-config.py? Here is the tail end of the output
Compiling ==> 'nla.c'
Compiling ==> 'node.c'
source/blender/blenkernel/intern/node.c:31:20: error: Python.h: No such file or directory
scons: *** [/home/kit/blender-source/build/linux2/source/blender/blenkernel/intern/node.o] Error 1
scons: building terminated because of errors.
$I tried to locate Python.h and here is the output
$ locate -e Python.h
/home/kit/blender-source/blender/source/gameengine/Expressions/KX_Python.h
/home/kit/blender-source/blender/source/gameengine/Expressions/.svn/prop-base/KX_Python.h.svn-base
/home/kit/blender-source/blender/source/gameengine/Expressions/.svn/text-base/KX_Python.h.svn-base
/home/kit/python/Python-3.1.1/Include/Python.h
/usr/include/python2.6/Python.h
$ Is there something that I'm missing?
Thanks in advance!
mo0nykit
October 15th, 2009, 03:27 AM
I figured out my mistakes
# user-config.py
<--cut-->
BF_PYTHON = '$HOME/python/Python-3.1.1-install'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.1'
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 = BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a' #'python${BF_PYTHON_VERSION}'
<--cut-->
Here is the correct one. Note BF_PYTHON and BF_PYTHON_LIB
# user-config.py
<--cut-->
BF_PYTHON = '/home/kit/python/Python-3.1.1-install'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.1'
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'
<--cut-->
caddict
October 15th, 2009, 04:54 AM
@infinitybrain, you could try downloading 2.49 from this site:
http://www.blender.org/download/get-blender/
just unpack to /usr/local/blender and run the binary from that directory.
Dread Knight
October 16th, 2009, 04:58 PM
@infinitybrain, you could try downloading 2.49 from this site:
http://www.blender.org/download/get-blender/
just unpack to /usr/local/blender and run the binary from that directory.
Yo, news flash! Blender.org provides 32 and 64 bit binaries (.deb) for months now.
Labello
October 17th, 2009, 04:19 AM
Blender from karmic repos is version 2.49a v.2.5 still under active development...
well... thanks for that... i must have misunderstood something while downloading blender 2.5.. -.-*
coCoKNIght
November 13th, 2009, 11:23 AM
In Karmic, Python doesn't need to be compiled. Just install it from the repository:
sudo apt-get install python3 python3-dev
a2z
April 25th, 2010, 09:20 AM
Blender
Paste and save the following:
WITH_BF_FFMPEG = 'true'
BF_FFMPEG_LIB = 'avformat avcodec avutil xvidcore ogg faac faad x264 mp3lame vorbis theora vorbisenc swscale avdevice'
WITH_BF_OPENAL = 'true'
WITH_BF_GAMEENGINE='true'
WITH_BF_FFTW3 = 'true'
WITH_BF_PLAYER='false'
WITH_BF_VERSE='false'
WITH_BF_YAFRAY='false'
BF_PYTHON_VERSION = '3.1'
WITH_BF_JACK = 'true'
Namaste
I do not have any option I can find to save this code.
I have went back and checked that I have all python installed and dependencies.
When running scons, it terminates because of errors.
[/home/a2z/blenderSource/build/linux2/bin/blender] Error 1
help please.
a2z
nnelsotn55
April 25th, 2010, 12:45 PM
Good post, thanks for sharing......:lolflag:
________________________
HDMI Cable (http://www.lindy.co.uk/cables/audio-video/hdmi/)
USB Cable (http://www.lindy.co.uk/cables/usb/)
freesparks
May 16th, 2010, 06:53 PM
OK,
I am a little confused and have some questions. For the sake of staying on top of new trends but still learning where it all came from, I want to install both Blender 2.49b, and Blender 2.5 Alpha 2 on Ubuntu 10.04 Lucid Lynx. With that said, I believe I have done so successfully and installed both. For Blender 2.49b, I installed that using the Synaptic Package Manager, and basically runs by me going to the Terminal and, typing:
blender:)Blender 2.49b then launches successfully confirming that it was compiled using Python 2.6.5.
Now, for Blender 2.5 Alpha 2, which I learned that I downloaded the binary for and not the source,I untarred the binary to it into a source file in my home directory. I go to the Terminal and have to type:
source ~/.bash_profilethen I type:
echo $PATHand then the result of that is as I anticipated:
home/myhomefolder/source/blender-2.5-alpha2-linux-glibc27-i686:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesAnd finally, I just type:
blenderand then I get:
found bundled python: /home/myhomefolder/source/blender-2.5-alpha2-linux-glibc27-i686/.blender/python
Blender 2.5 Alpha2 launches, confirming that it compiled with a bundled Python.,,which in actuality is Python3.1.
In detail to do this,
Basically, I created a .bash_profile file which consists of the path to the binary of Blender 2.5 Alpha2 and placed it in my home directory. And, within that file, I simply typed:
export PATH="/home/myhomefolder/source/blender-2.5-alpha2-linux-glibc27-i686:${PATH}"
My questions are as follow:
1) Do I have to type:
source ~/.bash_profile
echo $PATHthen
blendereach time I want to launch Blender 2.5 Alpha2 from the Terminal instead of Blender 2.49b?
Or is there a better alternative to running both Blender 2.5 Alpha2 and Blender 2.49b?
Any insights and help on this would be greatly appreciated. I am confident there is more than one way to get this done.
Best Regards,
freesparks
Jonah Bron
September 24th, 2010, 01:38 AM
Works great! I installed Blender 2.54 on Ubuntu 10.10 beta without a hitch. One note, one of the packages is wrong. It's not libxvidcore4-dev, it's libxvidcore-dev. That can be confusing because the one without -dev has the 4.
Thanks!
chandni
December 15th, 2010, 02:38 AM
i get errors while compiling blender.
The main problem i face is 'pthread.h not found'
How do i resolve this.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.