Guide: Compiling Blender...The easy way

I’ve made a little guide on how to compile blender using only free tools (Scons build env). Anyone who wishes to try it out can view the guide here.

This is considered to be an ‘alpha’ version, please, if you find any error, kindly let me know so I can improve the walkthrough. :slight_smile:

Thank You, Thank You, Thank You!! :slight_smile:

thanks mpan3! finally it all makes sense! :wink:

thanks! maybe this should go to the wiki so that it doesn’t get forgotten? :slight_smile:

just curious…

does something like scons also get used during development? if you just make some small changes to a c file does everything have to be recompiled? i guess not since waiting 20 minutes each time you want to try out something could be a pain?

Actually the article is based off the wiki, and can be found HERE. I simply took out some of the more advanced steps since my guide is targetted toward newbies (no offense :-)).

Kakapo has a very good question, and with my knowledge of scons, i can’t answer that. An educated guess would be no, scons doesn’t cache anything. So yes you do have to compile from scratch everytime.

Scons is used by some of the developers (I’m not sure how many, but definitely more than just a few). It does not require recompiling everything on small changes, and there’s a way to specify it to check a small part of the source (BF_QUICK=…), which makes things even faster. It’s all nicely documented in doc/blender-scons.txt in the source.

Really awesome, I finally managed to build blender from source. :smiley: Thanks for the cool tutorial

Eugene also just happened to wrote a step-by-step guide on how to compile with MSVC Express 2005

You will need the following:

Visual C++ 2005 Express Edition
Microsoft ® Windows Server® 2003 R2 Platform SDK Web Install
DirectX End-User Runtime Web Installer
Quicktime SDK

FULL TEXT

Thanks for posting my MSVC one Mike… I was about to add it to this post, until I reached your link to the site!

hmm, have to take a look at that.:wink: thanks for the link!

not working for me. win2k.

Compiling ==> 'writeimage.c'
Compiling ==> 'writemovie.c'
Linking library ==> 'libsrc.a'
The following character string is too long:
 r "C:\b\lib\libsrc.a" "C:\b\source\blender\src\B.blend.o" "C:\b\source\blender\
src\Bfont.o" "C:\b\source\blender\src\bfont.ttf.o" "C:\b\source\blender\src\blen
derbuttons.o" "C:\b\source\blender\src\booleanops.o" "C:\b\source\blender\src\bo
oleanops_mesh.o" "C:\blender\src\buttons_shading.o" "C:\b\source\blender\src\cma
p.tga.o" "C:\b\source\blender\src\cmovie.tga.o" "C:\b\source\blender\src\cursors
.o" "C:\b\source\blender\src\drawaction.o" "C:\b\source\blender\src\drawarmature
.o" "C:\b\source\blender\src\drawdeps.o" 

*************whole bunch more of this*****************

 "C:\b\source\
blender\src\meshtools.o" "C:\b\source\blender\src\mywindow.o" "C:\b\source\blend
er\src\oops.o" "C:\b\source\blender\src\outliner.o" "C:\b\source\blender\src
scons: *** [C:\b\lib\libsrc.a] Error 1
scons: building terminated because of errors.
C:\build\blender>scons BF_TOOLSET=mingw BF_BUILDDIR=c:\b

any help would be appreciated. I dl’d cvs from today. then i dowloaded 2.42a source as instructed. Then I tried switching the output path to C:\B as you see, instead of C:\Blender\Install. Always this same error…

Lucidmonkey, did you use the CVS build or the official 2.42a release tarball? The CVS could be broken (since it’s it constantly being worked on), I suggest you compile on from the 2.42a tarballfirst.

So how do I actually include patches sitting in the tracker in a build?

mpan3: I mentioned in my previous post that I tried cvs first, then when that failed I tried the 2.42a source.

WITH_BF_FFMPEG = ‘false’
WITH_BF_QUICKTIME = ‘false’
Really quicktime and avi codecs aren’t going to work if I switch’em to ‘true’? If not, why?

Btw, great job, thanks

lsscpp: You’ll need to download external libraries (from apple.com, etc) to get those to work.

LucidMonkey, make sure the version of mingw you downloaded is 5.02. Then select ‘candidate release’ when installing. Your GCC (compiler) version should be 3.4.4 (mingw special). You can check by going into a command prompt and type in “gcc -v” … or maybe it doesn’t work at all under 2k (as harkymansuggested)

BigFan: use ‘patch’ from cygwin. refer to discussion here.

Now if someone could post a method for Mac OS X (10.3.9) users, that would be great :slight_smile:

I’m sure the steps would be basically the same - but I’m not confident enough to take those steps without a definitive guide. I’m sure I’ve read somewhere that somethings have to be changed for a Mac build - but what?

AndyD, haven you seen Scons for OS X Tiger?

Once you get that installed and working, compiling under OS X should be a breeze. of course there are other ways to build, for example ‘make’.

Thanks but Tiger’s 10.4, I’m on Panther - 10.3.9. I guess there’s something available but for some reason I have this nagging feeling that I’ve read that building on Mac isn’t so straight forward?

it might be outdated but give it a try: http://www.blender3d.org/forum/viewtopic.php?t=2736&sid=9c39f8d212f7e01aa0e22ee13b24374f