Guides for compiling Blender
Moderators: jesterKing, stiv
I recently decided to build blender off of cvs so I could get blender 2.35 early. I made a little script that builds blender from cvs using scons, and they notifys you when it's done. I also made a kde crystal-svg style blender-cvs icon for those of us who like to keep both the stable and the cvs versions arround.
anyway, here it is, tell me if you like it:
http://www.praiseworthybooks.com/jasons ... vs.tar.bz2
http://www.praiseworthybooks.com/jasons ... cvs.tar.gz
anyway, here it is, tell me if you like it:
http://www.praiseworthybooks.com/jasons ... vs.tar.bz2
http://www.praiseworthybooks.com/jasons ... cvs.tar.gz
-
- Posts: 0
- Joined: Sat Jul 17, 2004 10:31 pm
sorry bout that moved it to http://www.southanuk.co.uk/~theappleman/index.htmlSamAdam wrote:theappleman's tut is gone.
does anyone have a copy of it?
[EDIT]Redirects to blender.html[/EDIT]
Last edited by TheAppleMan on Wed Feb 02, 2005 10:08 pm, edited 1 time in total.
Compiling blender 2.36 under windows (not cygwin)
HI i have compiled blender2.36 for windows using sconsand vc++ 6, i found some problems:
* Many void* implicit casting that should be replaced for explicit type* casting.
*Some variables and their respective types have the same name ( ie: foo foo;) so when correcting castings u have some problems.
* I used openAl lib from creative (the new one) and found some windows functions changes its arguments, so you need to cast and change some callings, others openal libs doesnt work for me.
* the quicktime lib path could not be changed from the config.opts file so you need to change the sconstruct main file.
* Have to rename some lib from gnuwin32, like ftgl , some because sufixes like MTD or SDT were not in their names.
Some of the problems could be fixed changing the code under the respective #def WIN32 like OpenAl function calling, i compile blender 2.36 with the newest libraries for windows, and really spend many time on it because was my first blender compilation.
Hope this could be helpfull for ppl trying to compiled for windows and for source code and scons script fixing.
excuse me for my english, im not very good with it.
* Many void* implicit casting that should be replaced for explicit type* casting.
*Some variables and their respective types have the same name ( ie: foo foo;) so when correcting castings u have some problems.
* I used openAl lib from creative (the new one) and found some windows functions changes its arguments, so you need to cast and change some callings, others openal libs doesnt work for me.
* the quicktime lib path could not be changed from the config.opts file so you need to change the sconstruct main file.
* Have to rename some lib from gnuwin32, like ftgl , some because sufixes like MTD or SDT were not in their names.
Some of the problems could be fixed changing the code under the respective #def WIN32 like OpenAl function calling, i compile blender 2.36 with the newest libraries for windows, and really spend many time on it because was my first blender compilation.
Hope this could be helpfull for ppl trying to compiled for windows and for source code and scons script fixing.
excuse me for my english, im not very good with it.

-
- Posts: 0
- Joined: Thu Mar 10, 2005 11:27 pm
Compiling Blender using MSVC .NET 2003
Hi, i got blender to compile first time on my house mates computer.
here's what you do (until i get around to fixing the sln files properly for 2003, will release it when complete)
1 - download current version from CVS using batch file
FILENAME:blender.bat
@echo off
cls
echo creating directories
c:\
md develop
cd develop
md unstable
cd unstable
echo downloading BLENDER
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co blender
echo downloading BLENDER LIBS
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co lib
2 - copy the blender and lib directory to develop directory
3 - build the intern.sln, extern.sln then blender.sln
4 - you will have errors with blender.sln but this will be sorted by simply placing the directory location in the tools menu/options/projects/ in VC2003
i will release the new project files for vc.net 2003 in the next few days, so all you will have to do is simply download from cvs the blender and lib modules then unzip the my files into the blender directory. Or if anyone from the blender team reads this i'll send it to them instead so it can be added to the cvs
hope this helps
Gordon
here's what you do (until i get around to fixing the sln files properly for 2003, will release it when complete)
1 - download current version from CVS using batch file
FILENAME:blender.bat
@echo off
cls
echo creating directories
c:\
md develop
cd develop
md unstable
cd unstable
echo downloading BLENDER
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co blender
echo downloading BLENDER LIBS
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co lib
2 - copy the blender and lib directory to develop directory
3 - build the intern.sln, extern.sln then blender.sln
4 - you will have errors with blender.sln but this will be sorted by simply placing the directory location in the tools menu/options/projects/ in VC2003
i will release the new project files for vc.net 2003 in the next few days, so all you will have to do is simply download from cvs the blender and lib modules then unzip the my files into the blender directory. Or if anyone from the blender team reads this i'll send it to them instead so it can be added to the cvs
hope this helps
Gordon
Compiling blender on Ubuntu 5.04 Hoary for newbies
(no game engine...)
first, you need to install the following packages.
-cvs
-libsdl1.2-dev
-gcc
-g++
-ftgl-dev
-libopenal-dev
-libpng3-dev
-libjpeg62-dev
-libnspr-dev
-mozilla-dev
-libglut3-dev
-python 2.3-dev
-libxmu-dev
-libarts1-dev
-libsmpeg-dev
-arts
then, you create a directory where you'll put your cvs version of blender.
let's create "cvs-blender" in /home/username/
Open a console
type the following commands :
cd cvs-blender
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
*** Password is "anonymous"****
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co blender
cd blender
gedit SConstruct
= > find the following code :
replace it by
Save & exit gedit (not the console)
type the following command
scons
(...wait...)
if everything is fine you should see
./blender -w
If it doesn't work, and you have an error like
"can't find shared file xyz-lib.so"
search synaptic or google for xyz-lib and install the missing library, and post it here to complete the list
if you want to apply a patch, called "UberPatch.patch"
put it in your /cvs-blender/blender/ directory
then open a console and type :
cd cvs-blender/blender/
patch -p0 < UberPatch.patch
(you may need to install "patch" from synaptic)
for tuhopuu it's quite the same thing, except that you replace the cvs commands by
and there is no password (just enter)
Good luck
(no game engine...)
first, you need to install the following packages.
-cvs
-libsdl1.2-dev
-gcc
-g++
-ftgl-dev
-libopenal-dev
-libpng3-dev
-libjpeg62-dev
-libnspr-dev
-mozilla-dev
-libglut3-dev
-python 2.3-dev
-libxmu-dev
-libarts1-dev
-libsmpeg-dev
-arts
then, you create a directory where you'll put your cvs version of blender.
let's create "cvs-blender" in /home/username/
Open a console
type the following commands :
cd cvs-blender
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
*** Password is "anonymous"****
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co blender
cd blender
gedit SConstruct
= > find the following code :
Code: Select all
if sys.platform == 'linux2' or sys.platform == 'linux-i386':
use_international = 'true'
use_gameengine = 'true'
use_openal = 'false'
(...)
build_blender_dynamic = 'true'
build_blender_static = 'false'
build_blender_player = 'true'
build_blender_plugin = 'false'
Code: Select all
if sys.platform == 'linux2' or sys.platform == 'linux-i386':
use_international = 'true'
use_gameengine = 'false' //Disable game engine
use_openal = 'false'
(...)
build_blender_dynamic = 'true'
build_blender_static = 'false'
build_blender_player = 'false' //Disable game engine player
build_blender_plugin = 'false'
type the following command
scons
(...wait...)
if everything is fine you should see
then you can launch blender withscons: Nothing to be done for `default'.
scons: done building targets.
./blender -w
If it doesn't work, and you have an error like
"can't find shared file xyz-lib.so"
search synaptic or google for xyz-lib and install the missing library, and post it here to complete the list

if you want to apply a patch, called "UberPatch.patch"
put it in your /cvs-blender/blender/ directory
then open a console and type :
cd cvs-blender/blender/
patch -p0 < UberPatch.patch
(you may need to install "patch" from synaptic)
for tuhopuu it's quite the same thing, except that you replace the cvs commands by
Code: Select all
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu co tuhopuu3
Good luck

My Portfolio :: www.mentalwarp.com/~fred/
Fool-proof guide for building Blender with scons/mingw in Windows
It's now dead easy to compile Blender with scons and mingw. When you're finally fed up with msvc, try this.
Here's the steps:
1. Download the tools
You need mingw and scons. Get them here:
mingw: http://www.mingw.org/
scons: http://www.scons.org/
You also need a cvs tool. E.g. Any one of these should do:
wincvs: http://www.wincvs.org/
cvsnt: http://www.cvsnt.org/wiki/
tortoisecvs: http://www.tortoisecvs.org/
2. Get the blender sources and libraries from CVS:
Create a directory in for blender and type these commands into the console.
To get the sources:
To get the libraries:
3. Build blender
Go into the blender subdirectory and type
4. Copy the dlls
You need to copy all the necessary dlls into the install/win32-mingw directory (where you'll find blender.exe etc). This is easy just look at the error messages and find them in the lib directory.
Here's a list for you lazy people:
gnu_gettext.dll, libpng.dll, SDL.dll, zlib.dll
________________________________________________________________
Additional Notes
+ At the CVS password prompt you can just press enter. (Because this is anonamous CVS)
+ Step 4 might not be necessary very soon: JesterKing mentions that these will be copied automatically in the future.
+ Quicktime is not a dependency in this build (I think it's either impossible or extremely difficult to link with mingw)
+ Don't forget your essential scons guides (thanks to JesterKing): Scons Documentation, Scons Developer Documentation
________________________________________________________________
Troubleshooting
+ If you get a building error, the first thing to do is rebuild with BF_QUIET=0 added to the build command in order to get more information on what went wrong.
+ If you get the error Command line is too long, this means that the directory path you downloaded blender sources into is too long. The fix is pretty simple: Copy the blender and lib directories to a shorter path. (E.g. c:\B). (Yes I know - this is annoying
)
Alternatively add BF_BUILDDIR=C:\build to the build command (Thank you Inktvlek!
)
Also, a sudden stopping compile with no clear error (esp. when linking libsrc.a) is a sign of a too deep directory structure.
The only correct fix is to use BF_BUILDDIR, as it will ensure proper recompile on next run (you'll have to specify it always on command-line, or set it in user-config.py - a copy from config/win32-mingw-config.py in the same dir where SConstruct is) (Thank you jesterKing!
)
+ I had Blender crash on me when I added an OpenEXR background to the world... I have a nasty suspicion this might be due to the gcc openexr libraries??? I'm not sure.
It's now dead easy to compile Blender with scons and mingw. When you're finally fed up with msvc, try this.

Here's the steps:
1. Download the tools
You need mingw and scons. Get them here:
mingw: http://www.mingw.org/
scons: http://www.scons.org/
You also need a cvs tool. E.g. Any one of these should do:
wincvs: http://www.wincvs.org/
cvsnt: http://www.cvsnt.org/wiki/
tortoisecvs: http://www.tortoisecvs.org/
2. Get the blender sources and libraries from CVS:
Create a directory in for blender and type these commands into the console.
To get the sources:
Code: Select all
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co blender
Code: Select all
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender co lib
Go into the blender subdirectory and type
Code: Select all
scons BF_TOOLSET=mingw
You need to copy all the necessary dlls into the install/win32-mingw directory (where you'll find blender.exe etc). This is easy just look at the error messages and find them in the lib directory.
Here's a list for you lazy people:

gnu_gettext.dll, libpng.dll, SDL.dll, zlib.dll
________________________________________________________________
Additional Notes
+ At the CVS password prompt you can just press enter. (Because this is anonamous CVS)
+ Step 4 might not be necessary very soon: JesterKing mentions that these will be copied automatically in the future.
+ Quicktime is not a dependency in this build (I think it's either impossible or extremely difficult to link with mingw)
+ Don't forget your essential scons guides (thanks to JesterKing): Scons Documentation, Scons Developer Documentation
________________________________________________________________
Troubleshooting
+ If you get a building error, the first thing to do is rebuild with BF_QUIET=0 added to the build command in order to get more information on what went wrong.
+ If you get the error Command line is too long, this means that the directory path you downloaded blender sources into is too long. The fix is pretty simple: Copy the blender and lib directories to a shorter path. (E.g. c:\B). (Yes I know - this is annoying

Alternatively add BF_BUILDDIR=C:\build to the build command (Thank you Inktvlek!

Also, a sudden stopping compile with no clear error (esp. when linking libsrc.a) is a sign of a too deep directory structure.
The only correct fix is to use BF_BUILDDIR, as it will ensure proper recompile on next run (you'll have to specify it always on command-line, or set it in user-config.py - a copy from config/win32-mingw-config.py in the same dir where SConstruct is) (Thank you jesterKing!

+ I had Blender crash on me when I added an OpenEXR background to the world... I have a nasty suspicion this might be due to the gcc openexr libraries??? I'm not sure.

Last edited by snow on Fri Feb 24, 2006 7:19 pm, edited 6 times in total.
Snow first of all, thanks for this nice guide! Togheter with this and jesterKing's help I was able to build Blender without any problems!
You can also add "BF_BUILDDIR=C:\build", which is easier than moving all the stuff.snow wrote:+ If you get an error Command line is too long, this means that the directory path you downloaded blender sources into is too long. The fix is pretty simple: Copy the blender and lib directories to a shorter path. (E.g. c:\B). (Yes I know - this is annoying)
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
A nice tute snow!snow wrote: + If you get an error Command line is too long, this means that the directory path you downloaded blender sources into is too long. The fix is pretty simple: Copy the blender and lib directories to a shorter path. (E.g. c:\B). (Yes I know - this is annoying)
Alternatively add BF_BUILDDIR=C:\build to the build command (Thank you Inktvlek!)
Also, a sudden stopping compile with no clear error (esp. when linking libsrc.a) is a sign of a too deep directory structure.
The only correct fix is to use BF_BUILDDIR, as it will ensure proper recompile on next run (you'll have to specify it always on command-line, or set it in user-config.py - a copy from config/win32-mingw-config.py in the same dir where SConstruct is)
/Nathan
yacs, yet another comile script........
so today is my posting day... :))
here you can find a small description and a script to completely checkout blender from cvs (and yafray too) and compile. maybe someone finds it useful:
http://www.vizzy.de/index.php?p=&l=de&i ... rayfromcvs
(you dont need yafray if you dont use it, i actually have problems with yaf release version+blender-cvs, see notes on the site)
yours vizzy
alias verblendet
here you can find a small description and a script to completely checkout blender from cvs (and yafray too) and compile. maybe someone finds it useful:
http://www.vizzy.de/index.php?p=&l=de&i ... rayfromcvs
(you dont need yafray if you dont use it, i actually have problems with yaf release version+blender-cvs, see notes on the site)
yours vizzy
alias verblendet
Attempt a tutorial that outlines some of these steps in greater detail.
Please edit. - Apart of the idea of the tutprial is not to incluce all options.
Rather the quickest way to get blender to compile.
http://mediawiki.blender.org/index.php/ ... 2_tutorial
Please edit. - Apart of the idea of the tutprial is not to incluce all options.
Rather the quickest way to get blender to compile.
http://mediawiki.blender.org/index.php/ ... 2_tutorial