Building Blender with SCons
One of the ways to build Blender from source is to use the SCons build system. In most cases the system should satisfy all needs, both for developers and especially for occasional non-developer builders.
To compile Blender using SCons you’ll need only your favourite compiler and a proper Python 2.6.x installation.
Using our SCons system is very straightforward. If we’d assume that all dependencies, compilers and Pythons are installed, with everything needed in your path, you’d only have to do the following:
python scons\scons.py
Obviously we need to do a few more things before we can be in such a happy situation.
Hi jesterKing!
Thanks for your effort in helping others in building Blender (not to mention your work on Blender itself…).
But now I got some problems with building Blender 2.5 using Scons and “WITH_BF_COLLADA = True” as the only setting set in “user-config.py”. It always give me errors. I even tried to copy the Collada related settings from “win32-vc-config.py”:
BF_COLLADA = ‘#source/blender/collada’
BF_COLLADA_INC = ‘${BF_COLLADA}’
BF_COLLADA_LIB = ‘bf_collada’
BF_OPENCOLLADA = LIBDIR + ‘/opencollada’
BF_OPENCOLLADA_INC = ‘${BF_OPENCOLLADA}/include’
BF_OPENCOLLADA_LIB = ‘OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver xml2 pcre’
BF_OPENCOLLADA_LIBPATH = ‘${BF_OPENCOLLADA}/lib’
…into “user-config.py” and it proceeded further and gave me some errors later.
Is it possible to compile Collada support with Scons recently, or do you have an idea what could be wrong?
Thanks! Have a nice (Fri)day!
PS: And yes, I have “\Lib\Windows\…” in the right place.
It’s a bit hard to say without the actual error log
I compiled (and uploaded) r25125 today, with COLLADA support enabled, so it *should* build. Anyway, waiting for error log, so I can see what is actually happening.
Oh yes..
In first case (just set “WITH_BF_COLLADA = True”) it couldn’t find “COLLADASWAsset.h”:
…
Compiling ==> ‘DocumentExporter.cpp’
source\blender\collada\DocumentExporter.cpp:44:28: COLLADASWAsset.h: No such file or directory
…
and first error:
…
In file included from source\blender\collada\DocumentExporter.cpp:79:
source\blender\collada\collada_internal.h:10: error: `COLLADAFW’ has not been declared
…
and a lot of others
ending:
…
scons: *** [C:\Build\build\win32-mingw\source\blender\collada\DocumentExporter.o
] Error 1
scons: building terminated because of errors.
…
In the second case (when I added lines I stated in first message) the first error mention was:
…
C:/Build/lib/windows/opencollada/include/COLLADABaseUtils/include/COLLADABUStringUtils.h:156: error: `wstringstream’ is not a member of `std’
…
and a lot of others
Ending the same as in the first case.
And yeah… one more thing. I use MinGW…
Hrm, I haven’t had the time yet to look into MingW with COLLADA-support, and it will be a while before I can get to that. Adding those lines from the win32-vc config is a good thing, but I don’t know yet how to deal with the wstringstream issue. I *think* MingW GCC 3.4.x should be able to compile this, although I have yet to verify that.
OK. Thank you! I’ll check it out, but after weekend, since I’ll be out of reach of internet.
Have a nice weekend!
Ok, I’ve just verified that compiling with MingW GCC 3.4.2 compiles with COLLADA support. I did a commit that adds the proper settings to the win32-mingw-config.py defaults.
Ohh… still problems.
I’m not a real programmer, so I’m not sure I did the right thing (because MinGW seems to consists from many many optional components, wich has sometimes rather mysterious names and bind together in not simple ways).
I installed current MinGW from http://sourceforge.net/projects/mingw/files (the big green button). In the C:\MinGW\ dictionary I can see the file “gcc-core-3.4.5-20060117-1.tar.gz” now, so I presume I have GCC 3.4.5 installed. But compiling Blender give me the same error like before. If I turn WITH_BF_COLLADA off it compile without a problem.
Any clue, please?