From BlenderWiki
< Dev:Doc
[edit] Compiling QuickStart
Operating System Specific Instructions for getting blender build in some short steps...
[edit] Blender 2.4x
- Building Blender 2.4x for Linux (needs other more distro's)
- Building Blender 2.4x for Mac (needs separation simple & advanced)
- Building Blender 2.4x for Windows (needs separation simple & advanced)
- Building Blender 2.4x for Solaris
[edit] Blender 2.5x
- Building Blender 2.5x for Linux
- Building Blender 2.5x for Mac
- Building Blender 2.5x for Windows
- Building Blender 2.5x for Solaris
[edit] General steps for building
The general steps for building follow, and this guide generally follows these steps.
- Choosing a Build Path.
- A "Build Path" includes the steps necessary for your target platform (OS/CPU architecture) along with your build system of choice, build dependencies, compiler, and related development tools.
- Install Development tools as per your Build Path.
- Download and install required dependencies.
- Satisfying the dependencies in advance (as much as possible) will greatly ease the pains of building blender. Sometimes the dependencies can be satisfied at the same time as downloading the source code.
- To build Blender, you must install the header files and libraries for each dependency.
- Download the source code (usually with a version control program such as CVS, Subversion, git, etc.) Blender development is currently using Subversion (svn)
- Try to build.
- Debug build failures.
- Most building problems are not actually errors in the tree--- although you can never fully rule that possibility out--- most likely, the problem is a missing dependency, or two, or five. You will find that tools allowing you to search the symbols of build products and libraries you need to link to, (buildtool (Win32), nm + ldd + grep + find (Unix), nm + otool + grep + find (Mac OS X)) will greatly aid your resolution of build troubles. Hopefully, however, this guide will help you skirt these problems altogether.
- Missing dependencies cause two types of compiler errors. No such file errors mean a header (.h) file is missing. Unresolved symbol errors mean a library is missing. Either a path is bad or something is not installed. Package managers often put the headers for a library in a separate package. The headers for library foo will be named something like foo-dev or foo-devel.
- Successful build!
- You built it! Now, run it and see what happens... Code on!
- Debug build failures.
[edit] Choosing a Build Path (2.4x)
Choosing a build path, means that you choose your target platform (OS/CPU architecture) along with your build system, compiler, and related development tools. Blender currently has three build systems. In order of appearance, those build systems are:
| Build System | Build Customization | Local Build Docs | Build Files | Output |
|---|---|---|---|---|
| GNU Make using the trusty NaN Makefiles. | Put build customizations in bf-blender/blender/user-def.mk. Look at bf-blender/blender/source/nan_definitions.mk and documentation for hints on how to customize the build. (The key Makefile is bf-blender/blender/source/Makefile) | bf-blender/blender/INSTALL |
Makefile blender/source/*.mk | Make places build products in bf-blender/blender/obj/<platform>/ and release make release products in bf-blender/blender/obj/<version>/. The executable is placed in bf-blender/blender/obj/<platform>/bin/ |
| Scons using the SConscript and SConstruct files. | Put build customizations in bf-blender/blender/user-config.py Look at bf-blender/blender/config/<platform>-config.py and documentation for customization hints. | bf-blender/blender/doc/blender-scons.txt |
bf-blender/SConscript bf-blender/blender/SConstruct bf-blender/blender/config/* bf-blender/blender/tools/* | SCons places build products in bf-blender/build/<platform>/, and release BF_INSTALLDIR=<dir> in bf-blender/install by default. The executable is placed in bf-blender/build/<platform>/bin/. SCons places build system intermediate files in blender/tools/*.pyc |
| CMake using the CMakeList.txt files. | Customize the build using ccmake, OR edit bf-blender/blender/CMakeCache.txt or specify them on the command line, (OR patch against CMakeLists.txt). You must CMake -G <generator> or ccmake in a directory other than bf-blender/blender. | bf-blender/blender/doc/blender-cmake.txt | CMakeLists.txt throughout the source tree. | CMake places build products in the project directory for the given generator (CMake -G <generator>) and places library archives in bf-blender/lib/<build configuration>. |







![[]](/skins/blender/open.png)
