Partial Blender compilation HOWTO

Hello, everyone…it seems that nobody can get this thing to compile, but I’ve been able to get farther than most I’ve heard of so far, so I’ll try to explain how to get at least to where I am.
Please note I’m doing this on Linux (RedHat 8), but the steps should hopefully help on other OS’s as well.
This first thing to do is to extract your blender-source-2.25b.tar.gz file to your home directory:

mv blender-source-2.25b.tar.gz ~
tar xvfz blender-source-2.25b.tar.gz

The next thing to do, as the makefiles default to looking in a ~/develop directory rather than ~/blender, rather than mess with the makefiles as I did, rename the extracted directory to develop:

mv ~/blender ~/develop

Now, if you go into ~/develop/source and type make, you get some errors about guessconfig being denied, so find it and give it executable permissions, and give the config file it writes to write permissions:

cd ~/develop/source/tools/guess
chmod +x guessconfig
chmod +w config.guess
cd ~/develop/source

Now this takes us a bit further, but we still get errors when we type make. It says that it cannot find ‘’, when it goes into the ‘creator’ directory. This is a problem with almost all the source dirs, but you already have a copy of these files with you, just not in the right places, so we’re going to symlink them to all the other source dirs so they can be accessed (on other OS’s, you should be able to just copy them), note I’m using bash scripting to accomplish this:

cd ~/develop/source
for thesrcdir in `find -type d`; do
ln -sf $PWD/*.mk $thesrcdir/;

Now, some successful compiling can happen…but not a lot.
There is still much to be done, I’m afraid.
If you try to ‘make’ now, something compiles, but then you get some errors about not being able to find two includes, MEM_guardedalloc.h and render.h.
MEM_guardedalloc.h is being looked for in ~/develop/lib/guardedalloc/include, but it is actually in ~/develop/intern/guardedalloc, so rather than modifying all the Makefiles as I did the first time, we’ll just appease it by linking (or moving) the header into the appopriate directory:

mkdir ~/develop/lib/guardedalloc
ln -s ~/develop/intern/guardedalloc ~/develop/intern/guardedalloc/include

The next file, render.h is in ~/develop/source/blender/render/extern/include, which is odd, because in further investigation, this is where it is looked for. It may just be me, but I’ve found that duplicating the line ‘CPPFLAGS += -I…/blender/render/extern/include’ in ~/develop/source/creator/Makefile fixes this wierd bug.
Now, if you go back to ~/develop/source and type make, hopefully quite a bit will compile, until you come to the encryption part, which complains of missing header file ‘blenkey.h’… All you have to do is copy the file ~/develop/intern/keymaker/key.h to ~/develop/intern/keymaker/blenkey.h, or link it:

ln -s ~/develop/intern/keymaker/key.h ~/develop/intern/keymaker/blenkey.h

Then, add the line ‘CPPFLAGS += -I…/…/…/…/intern/keymaker’ into the following Makefiles:

Thus far, typing make, you can get quite a ways into compilation, which is where I am, getting a bunch of errors with the makefiles trying to use the ‘c’ command as my compiler, which it isn’t…At the moment, at 1:40 AM in my time, I’m not going to try and get further, but I will tomorrow, and I’ll keep you posted…please tell me if I was at all helpfull, or if I left out any info. See you all later, fellow blenderheads!


I posted this last night on the forums, but when I got up, their site was down, so I figured I’d post it here too…I’m still working on getting past the aforementioned problem, if anybody figures it out give me a shout…feel free to ask any questions (as your results may vary, and I’ll try to be as helpful as possible)

i have got blender to the linking stage, but am currently having issues with the GamePlayer and python.

However, in addtion to the above, you can do the following:

'export MAKEFLAGS= ‘-w -I/lwhere/you/unpacked/the/archive/blender/source’ will remove the requirement of putting it in $HOME/develop/. This also eliminates the requirement to symlink the files

‘export CCC=g++’ will stop the ‘trying to build with c’ errors, as the ‘c’ is actually supposed to be a ‘-c’ following the $CCC macro which is not defned by default on my machine at least.

I also had to manually ‘export OPENGL_HEADERS=/usr/X11R6/include/GL’ to get some of the makefiles to work, as the variable substitutions for the OpenGL libraries leave you with a gcc command like g++ <extra crap removed> -I source.c -o out.o, where the -I is causing the compiler to try and include source.c instead of seeing it as a source file. This may be the wrong folder to include, but i can’t easily tell until I can get the whole project mostly building.

There are a few errors in the Makefiles, with a couple of manual edits necessary, see

for more details.

Hopefully I can resolve my Python issues tonight and get blender built and running.

is anyone trying to compile in windows or even have any idea how?

Just a small comment on the intern library stuff. The idea was that modules in the intern directory ended up as seperate libs in the lib directory. For each module in the intern library there should be a makefile that creates the libs and maps the external header files and libs into a corresponding directory in the lib directory. Unfortunately I dont think the makefiles create those directories in the top level lib structure.

So first map the blender directory to develop as menitoned. Go through the intern directories and create a corresponding directory in the lib folder. You also need to specify include lib and lib/debug directories as sub directories e.g.

for example the decimation module


do a ‘make install’ in the decimation intern directory, this should load up the lib with the right files.

Only at that point should you do a make in the blender source, coz blender is expecting all those libs and headers to be in the lib folder.

The projectfiles directory contains the MSVC6 project files. For windows create the same folder structure as above. Go into the make/mscv6 directory of the intern module and build ye… Although note that the you have to build intern library modules in the right order as they are interdependent.

Then try building the main blendercreater project file.

all this stuff is from memory so don’t expect it to be 100% accurate - sorry. Good luck to you…

Yo dude, thanks!!
Great advice. I’d got about as far as the blenkey.h part, but then I hit a brick wall (RUBS HEAD). Now I’m gonna progress onward… Good work, tho’. Thanks very much!!!