Guides for compiling Blender
Moderators: jesterKing, stiv
Guides for compiling Blender
Let's try and consolidate this knowledge somewhat. If you know of any guides that people have written up, please post links to them here! Also, feel free to write up your own guides for various platforms.
Windows
Building Blender on Windows with MSVC (2003/10/11)
http://home.pacbell.net/c_keith/project ... strap.html
Compiling Blender 2.26 on Windows XP with MSVC 6 and Python 2.22
http://www.cise.ufl.edu/~fishwick/blender/make.txt
Help compiling under Windows using Cygwin
http://www.blender.org/modules.php?op=m ... opic&t=692
Compiling in Windows using free tools (mingw-gcc)
http://projects.blender.org/viewcvs/vie ... bf-blender
(click 'view')
Mac OS X
Compiling using the command line
Download the necessary support packages as outlined in the README file included with the CVS sources. Then follow the instructions in the following link:
http://www.blender.org/modules.php?op=m ... =6659#6659
Linux
Easy compiling of tuhopuu under RedHat
http://www.blender.org/modules.php?op=m ... pic&t=1300
Windows
Building Blender on Windows with MSVC (2003/10/11)
http://home.pacbell.net/c_keith/project ... strap.html
Compiling Blender 2.26 on Windows XP with MSVC 6 and Python 2.22
http://www.cise.ufl.edu/~fishwick/blender/make.txt
Help compiling under Windows using Cygwin
http://www.blender.org/modules.php?op=m ... opic&t=692
Compiling in Windows using free tools (mingw-gcc)
http://projects.blender.org/viewcvs/vie ... bf-blender
(click 'view')
Mac OS X
Compiling using the command line
Download the necessary support packages as outlined in the README file included with the CVS sources. Then follow the instructions in the following link:
http://www.blender.org/modules.php?op=m ... =6659#6659
Linux
Easy compiling of tuhopuu under RedHat
http://www.blender.org/modules.php?op=m ... pic&t=1300
Last edited by matt_e on Sat Oct 11, 2003 7:43 am, edited 6 times in total.
-
- Posts: 0
- Joined: Thu Feb 06, 2003 11:01 pm
- Location: Richmond, VA
- Contact:
OS X
Hello:
Download the necessary support packages as outlined in the README file included with the CVS sources. Then follow the instructions in the following link to successfully compile using the command line.
http://www.blender.org/modules.php?op=m ... =6659#6659
-Bischofftep
Download the necessary support packages as outlined in the README file included with the CVS sources. Then follow the instructions in the following link to successfully compile using the command line.
http://www.blender.org/modules.php?op=m ... =6659#6659
-Bischofftep
Blender-bf on windows with MSVC 6 and Python 2.22
Hey guys,
I just got the current Blender-bf to compile, by following:
http://www.cise.ufl.edu/~fishwick/blender/make.txt
I still ran into some difficulties though, and the people in #BlenderSauce helped me out with those, anyways here is what I found out today:
- Get Sp5 for visual studio at:
http://msdn.microsoft.com/vstudio/downl ... efault.asp
or for a direct link to the english version:
http://download.microsoft.com/download/ ... vs6sp5.exe
- Don't get the daily-checkout tarballs, instead really pull the modules from the cvs, since somehow the tarballing messes the project files up.
- Be sure to not only checkout the module 'blender' but also check out the module 'lib'
- The following part in the original make.txt can be ignored, that is fixed in the current version:
ftp://ftp.apple.com/developer/Developme ... DK_Win.hqx
use stuffit to expand it, and place it inthe lib/windows directory.
You will then also need to add the following include and library paths to visual c:
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\CIncludes
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\Libraries
- When linking if you get the error:
LINK : fatal error LNK1181: cannot open input file "freetype214ST.lib"
then you need to link with freetype213ST.lib instead:
Project->Settings-> then click on the link tab, find freetype214ST.lib and change it to freetype213ST.lib
- if you get any other strange errors try regetting the modules from the cvs, it may be that someone was just updating them when you were downloading them the first time.
With this blender compiled and linked like a charm and I got myself a nice Blender 2.27 Binary in blender\bin
Greetings,
Timothy
p.s. if you experience any strange errors,.. and end up fixing them,.. be sure to post it here aswell!!!!!
Hey guys,
I just got the current Blender-bf to compile, by following:
http://www.cise.ufl.edu/~fishwick/blender/make.txt
I still ran into some difficulties though, and the people in #BlenderSauce helped me out with those, anyways here is what I found out today:
- Get Sp5 for visual studio at:
http://msdn.microsoft.com/vstudio/downl ... efault.asp
or for a direct link to the english version:
http://download.microsoft.com/download/ ... vs6sp5.exe
- Don't get the daily-checkout tarballs, instead really pull the modules from the cvs, since somehow the tarballing messes the project files up.
- Be sure to not only checkout the module 'blender' but also check out the module 'lib'
- The following part in the original make.txt can be ignored, that is fixed in the current version:
- if you try to compile and get an error that you can't include movies.h download:make.txt wrote: IMPORTANT: you must now remove a file area and replace it, otherwise the python code will
not build correctly:
4.1: Go to the left window, Press FileView, and locate "BPY_Frozen files". Highlight this
single item, and then Edit->Delete.
4.2: Go to Project->Add to Project->Files and then steer toward the following directory:
C:\blender\source\blender\bpython\frozen, and select all of the C files in that directory
ftp://ftp.apple.com/developer/Developme ... DK_Win.hqx
use stuffit to expand it, and place it inthe lib/windows directory.
You will then also need to add the following include and library paths to visual c:
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\CIncludes
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\Libraries
- When linking if you get the error:
LINK : fatal error LNK1181: cannot open input file "freetype214ST.lib"
then you need to link with freetype213ST.lib instead:
Project->Settings-> then click on the link tab, find freetype214ST.lib and change it to freetype213ST.lib
- if you get any other strange errors try regetting the modules from the cvs, it may be that someone was just updating them when you were downloading them the first time.
With this blender compiled and linked like a charm and I got myself a nice Blender 2.27 Binary in blender\bin
Greetings,
Timothy
p.s. if you experience any strange errors,.. and end up fixing them,.. be sure to post it here aswell!!!!!
FreeBSD compilation of Tuhopuu.
(Was originally going to post this under a new topic, then saw this sticky. Consolidation is a good thing.)
Introduction: I recently managed (with almost no hiccups) to get the Tuhopuu CVS code compiled and running under FreeBSD 4.8.
Since the Downloads section has the FreeBSD version of Blender 2.8 listed as "Soon", I suspect there's other FreeBSD users out there who might like to try the same thing, but have been put off by the possible complexity of such a task. As I'm something of a neophyte myself, I've decided to write up How To Do It, because it's really not that hard at all. This is therefore mainly aimed at coding novices, so apologies if it's overly simplistic for you.
Preparation: First, of course, you're going to need to grab the Tuhopuu CVS sources. Create and enter the directory you want to work from (in my case, it's ~/Working/Blender/Tuhopuu/), and then follow the instructions for Anonymous CVS Access.
If you get an error about a missing or incorrect .cvspass file, you'll need to create one in your home directory and set the correct permissions.
Since there's only one module in the CVS Repository, the modulename we want is "blender".
So, our steps up to this point will look something like this:
% mkdirhier ~/Working/Blender/Tuhopuu; cd ~/Working/Blender/Tuhopuu
Create and move into directory we'll be working from
% ls ~/.cvspass
ls: /home/me/.cvspass: No such file or directory
% touch ~/.cvspass
% chmod 600 ~/.cvspass
Check for the existence of a .cvspass file - if it's not there, create it and set permissions
% cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu login
% cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu co blender
Checkout the CVS code as per the project page instructions
Well, that's going to take a while (depending on your connection, of course - sodding dialup) .
Whilst it's going, you can spend some profitable time checking to see if you've got all the necessary ports installed- the essential ones are as follows:
graphics/Mesa3
graphics/jpeg
graphics/png
audio/openal
lang/python
print/freetype
security/openssl
To check if you've got these, use pkg_info as follows:
% pkg_info|grep -i mesa
Mesa-3.4.2_2 A graphics library similar to SGI's OpenGL
Since they're all pretty popular as dependancies, you'll probably have most if not all of them already. If you're missing any, I'm assuming you know what to do (aren't ports wonderful?).
Compilation: Now, once the Tuhopuu CVS code has finished downloading, it's time to get it ready to compile. This is really hard - it took me at least a minute.
Go into the blender directory, and edit the Makefile there. For simple tasks like this, I tend to use FreeBSD's builtin ee editor.
% pwd
/home/me/Working/Blender/Tuhopuu
% cd blender
% ee Makefile
The first thing we have to change is the assumption that the make on our system is gnumake: Find the line
export GMAKE ?= make
and change it to
export GMAKE ?= gmake
Next, we'll disable the ketsji to speed things up - that's the new game engine, and if you're using this guide, you almost certainly don't want it. A few lines up from the line about GMAKE you'll find
# Not working on the ketsji? Why spend time compiling it?
# export NO_KETSJI=true
Change that second line to
export NO_KETSJI=true
Now, the last thing we need to do is correct the Makefile about where to look for all those include files and such. Most Linux systems have everything directly under /usr, but FreeBSD uses /usr/local. Find the following lines
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/
export NAN_OPENAL ?= /usr/
export NAN_JPEG ?= /usr/
export NAN_PNG ?= /usr/
export NAN_ZLIB ?= /usr/
export NAN_FREETYPE ?= /usr/
and add a local to the lines that need it, thus:
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr/local
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/local
export NAN_OPENAL ?= /usr/local
export NAN_JPEG ?= /usr/local
export NAN_PNG ?= /usr/local
export NAN_ZLIB ?= /usr/local
export NAN_FREETYPE ?= /usr/local
NAN_MESA shouldn't need to be altered, as Mesa installs in /usr/X11R6, just like on a Linux system.
Save the Makefile, and exit to the command line.
Hopefully, everything should now be ready. Type gmake (not make!) and sit back and wait.
Eventually, if nothing goes wrong, compiling should finish something like this:
...
/bin/rm /usr/home/me/Work/Blender/Tuhopuu/blender/obj//freebsd-4.8-i386/debug/buildinfo.o
****> Build 11:29:51 31-Jul-2003 - 11:31:27 31-Jul-2003
NAN_PYTHON_VERSION=2.2
gmake[2]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake[1]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender'
%
The compiled executable should be located at blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Launch it with the dot execute shortcut, cross your fingers, and have fun!
% ./blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Well, that's how I got it running. I doubt I'll be able to help much if people run into problems with this, but hopefully someone with a bit more savvy can jump in if needed.
Incidentally, bf-blender is even easier - there's a shellscript in the main directory specifically for FreeBSD compilation.
Good luck, and happy BSD Blending!
ÐÆ
Introduction: I recently managed (with almost no hiccups) to get the Tuhopuu CVS code compiled and running under FreeBSD 4.8.
Since the Downloads section has the FreeBSD version of Blender 2.8 listed as "Soon", I suspect there's other FreeBSD users out there who might like to try the same thing, but have been put off by the possible complexity of such a task. As I'm something of a neophyte myself, I've decided to write up How To Do It, because it's really not that hard at all. This is therefore mainly aimed at coding novices, so apologies if it's overly simplistic for you.
Preparation: First, of course, you're going to need to grab the Tuhopuu CVS sources. Create and enter the directory you want to work from (in my case, it's ~/Working/Blender/Tuhopuu/), and then follow the instructions for Anonymous CVS Access.
If you get an error about a missing or incorrect .cvspass file, you'll need to create one in your home directory and set the correct permissions.
Since there's only one module in the CVS Repository, the modulename we want is "blender".
So, our steps up to this point will look something like this:
% mkdirhier ~/Working/Blender/Tuhopuu; cd ~/Working/Blender/Tuhopuu
Create and move into directory we'll be working from
% ls ~/.cvspass
ls: /home/me/.cvspass: No such file or directory
% touch ~/.cvspass
% chmod 600 ~/.cvspass
Check for the existence of a .cvspass file - if it's not there, create it and set permissions
% cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu login
% cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu co blender
Checkout the CVS code as per the project page instructions
Well, that's going to take a while (depending on your connection, of course - sodding dialup) .
Whilst it's going, you can spend some profitable time checking to see if you've got all the necessary ports installed- the essential ones are as follows:
graphics/Mesa3
graphics/jpeg
graphics/png
audio/openal
lang/python
print/freetype
security/openssl
To check if you've got these, use pkg_info as follows:
% pkg_info|grep -i mesa
Mesa-3.4.2_2 A graphics library similar to SGI's OpenGL
Since they're all pretty popular as dependancies, you'll probably have most if not all of them already. If you're missing any, I'm assuming you know what to do (aren't ports wonderful?).
Compilation: Now, once the Tuhopuu CVS code has finished downloading, it's time to get it ready to compile. This is really hard - it took me at least a minute.

Go into the blender directory, and edit the Makefile there. For simple tasks like this, I tend to use FreeBSD's builtin ee editor.
% pwd
/home/me/Working/Blender/Tuhopuu
% cd blender
% ee Makefile
The first thing we have to change is the assumption that the make on our system is gnumake: Find the line
export GMAKE ?= make
and change it to
export GMAKE ?= gmake
Next, we'll disable the ketsji to speed things up - that's the new game engine, and if you're using this guide, you almost certainly don't want it. A few lines up from the line about GMAKE you'll find
# Not working on the ketsji? Why spend time compiling it?
# export NO_KETSJI=true
Change that second line to
export NO_KETSJI=true
Now, the last thing we need to do is correct the Makefile about where to look for all those include files and such. Most Linux systems have everything directly under /usr, but FreeBSD uses /usr/local. Find the following lines
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/
export NAN_OPENAL ?= /usr/
export NAN_JPEG ?= /usr/
export NAN_PNG ?= /usr/
export NAN_ZLIB ?= /usr/
export NAN_FREETYPE ?= /usr/
and add a local to the lines that need it, thus:
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr/local
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/local
export NAN_OPENAL ?= /usr/local
export NAN_JPEG ?= /usr/local
export NAN_PNG ?= /usr/local
export NAN_ZLIB ?= /usr/local
export NAN_FREETYPE ?= /usr/local
NAN_MESA shouldn't need to be altered, as Mesa installs in /usr/X11R6, just like on a Linux system.
Save the Makefile, and exit to the command line.
Hopefully, everything should now be ready. Type gmake (not make!) and sit back and wait.
Eventually, if nothing goes wrong, compiling should finish something like this:
...
/bin/rm /usr/home/me/Work/Blender/Tuhopuu/blender/obj//freebsd-4.8-i386/debug/buildinfo.o
****> Build 11:29:51 31-Jul-2003 - 11:31:27 31-Jul-2003
NAN_PYTHON_VERSION=2.2
gmake[2]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake[1]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender'
%
The compiled executable should be located at blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Launch it with the dot execute shortcut, cross your fingers, and have fun!
% ./blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Well, that's how I got it running. I doubt I'll be able to help much if people run into problems with this, but hopefully someone with a bit more savvy can jump in if needed.
Incidentally, bf-blender is even easier - there's a shellscript in the main directory specifically for FreeBSD compilation.
Good luck, and happy BSD Blending!
ÐÆ
Seriously, grab the CVS for bf-blender (which is Blender 2.28 ). You'll need to checkout both the blender and lib directories, but once you have, there's a shellscript called compileblender_freebsd-4.7-i386.sh in the blender directory (h_xnan, on the off-chance you read this, you rock).alt wrote:I have been waiting and waiting and still there's no 2.28 for FBSD. Now I can at least compile Tuhopuu when I get desperate enough
Run that*, and once it's finished, you should have a Blender 2.28 executable located at {whereever_you've_put_the_CVS_stuff}/blender/obj/freebsd-4.8-i386/bin/blender
*Note: I had to copy an include file from one place to another to get it to run, but now I can't remember what it was. If you do get errors you can't figure out, I might be able to help, but I ain't promising nuttin'.

I've been playing with both, but mainly with Tuhopuu, although it crashes somewhat more often than 2.28, as you'd expect.
Good luck!
...because I can!
I think this should be here:
http://www.blender.org/modules/document ... ource.html An intro to the blender source. Written by Kent Mein
I'm trying to compile blender for first time and was the one who helped me the most. Also was the last one I found
EDIT: I followed the file in the cvs for Windows under Cygwin
http://projects.blender.org/viewcvs/vie ... bf-blender
And could compile Blender using Cygwin quite easily.. follow every step carefully because one mistake I did had me crazy for one day...
http://www.blender.org/modules/document ... ource.html An intro to the blender source. Written by Kent Mein
I'm trying to compile blender for first time and was the one who helped me the most. Also was the last one I found

EDIT: I followed the file in the cvs for Windows under Cygwin
http://projects.blender.org/viewcvs/vie ... bf-blender
And could compile Blender using Cygwin quite easily.. follow every step carefully because one mistake I did had me crazy for one day...
-
- Posts: 6
- Joined: Thu May 01, 2003 9:13 pm
-
- Posts: 0
- Joined: Mon Sep 15, 2003 4:14 am
- Location: California SF Bay Area
- Contact:
Here's my page on building Blender on Windows:
http://home.pacbell.net/c_keith/project ... strap.html
It's got a little more detail about adding paths to VC++.
http://home.pacbell.net/c_keith/project ... strap.html
It's got a little more detail about adding paths to VC++.
-
- Posts: 6
- Joined: Sun Nov 03, 2002 6:58 am
I've just put up a guide for getting the game engine compiled on a Mandrake 9.2 system. (Using the NVIDIA drivers, but I don't think that matters that much.)
http://www.blender.org/modules.php?op=m ... pic&t=3002
http://www.blender.org/modules.php?op=m ... pic&t=3002
-
- Posts: 0
- Joined: Fri May 23, 2003 10:54 pm
- Contact:
BeOs, Zeta
Is there some help out for BeOs/Zeta as well?
For MS-2003
Visual C++ 2003 does not have a iostream.h header, thus
in the files:
source\gameengine\GameLogic\SCA_KeyboardManager.cpp
source\gameengine\GameLogic\SCA_IInputDevice.cpp
change the
to
in the files:
source\gameengine\GameLogic\SCA_KeyboardManager.cpp
source\gameengine\GameLogic\SCA_IInputDevice.cpp
change the
Code: Select all
#include <iostream.h>
Code: Select all
#if _MSC_VER >= 1300
#include <iostream>
using namespace std;
#else
#include <iostream.h>
#endif
-
- Posts: 0
- Joined: Sat Jul 17, 2004 10:31 pm
A few days ago I was looking around to find tutorials to build blender. I looked on this thread but it didnt help me much. Whilst chatting on IRC I was told instructions on how to compile blender...and 5 hours later I had my own distro. So I scrounged around my logs and thought to write my own tut.
http://www.theappleman.pwp.blueyonder.c ... letut.html
The tut is for windows FROM SCRATCH.
http://www.theappleman.pwp.blueyonder.c ... letut.html
The tut is for windows FROM SCRATCH.
-
- Posts: 0
- Joined: Sun May 25, 2003 9:22 pm
Thank you!!TheAppleMan wrote:A few days ago I was looking around to find tutorials to build blender. I looked on this thread but it didnt help me much. Whilst chatting on IRC I was told instructions on how to compile blender...and 5 hours later I had my own distro. So I scrounged around my logs and thought to write my own tut.
http://www.theappleman.pwp.blueyonder.c ... letut.html
The tut is for windows FROM SCRATCH.
Just what I've been looking for!

--
Brian