Guides for compiling Blender

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

JA-forreal
Posts: 187
Joined: Sat Mar 22, 2003 10:45 pm

Postby JA-forreal » Tue Mar 21, 2006 2:49 am

Hi folks, I haven't completed a Blender build in months. I just tried snows tips using Mingw with Scons in Windows. I have given up compiling the CVS Blender for now in Linux. I had to used the "BF_BUILDDIR=C:\build" setup to even attempt to compile it to get past the long path error. I still get the openexr errors.

One day I hope there will be a near failsafe method for building the Blender CVS checkouts for Linux, Windows and Mac. I am not up on the Wiki's for compiling or everything that is updated about Scons, Mingw, etc.

An up-to-date wiki tutorial on the most common paths to compling Blender would be great.

vizzy
Posts: 23
Joined: Tue Feb 28, 2006 12:36 am

Postby vizzy » Tue Mar 21, 2006 10:41 am

[quote="JA-forreal"I still get the openexr errors. .[/quote]

hi ,

so maybe you could edit config/win32-mingw-config.py and set WITH_BF_OPENEXR="false" if you havent installed the openexr library.

or get openexr and install it, but i dont know about exr and windows.
maybe you have to checkout the libs too, with cvs or release source, this is imho needed in both ways.

i never did that in windows, i always use linux and compiling the cvs there was quite easy.
(i do that twice a day)
just a bit tweaking and disable the gameengine with make because it wont compile.
scons builds fine for me in linux, i had to install openal and openexr first, but then it runs through the process and builds up a complete binary.

sorry for that bad english.
yours vizzy/verblendet

JA-forreal
Posts: 187
Joined: Sat Mar 22, 2003 10:45 pm

Postby JA-forreal » Wed Mar 22, 2006 6:13 am

Thanks for the tips vizzy. before I installed Scons and Mingw, I was using Cygwin. Cygwin was tool much of a hassle to set up to compile Blender. And I had to reformat my harddrive to get it off of my machine.

Do I have to compile the openexr lib? I installed the openexr .exe.

I'm new to Linux, Mandriva linux that is. I installed every listed blender cvs dependency via urpmi. I diabled the game engine in the Linux Scons install with a user-config.py setup. I don't know much about "make" etc. settings. I'm sitting there reading the Mingw and Scon docs which are not to clear to me in every area. I'm not a programmer, hehe. I see a small number of Blender users wizzing through cvs builds without much effort. I'm not there yet. Do you have to manually check usr/bin, etc to see what dependency is installed in linux? Maybe the sys config gui is missing something.

Are there any unlisted well known to coder prerequisites for building the Blender cvs? You know, "first you must be well versed with "make", "compiling dll's", etc?

Most of the tutorials that I read in the past for building Blender with Scons went smoothly. But now I am running into problem after problem with each cvs update. Scons used to output a config.opts file. Now there is no config.opts and I see tips for making a user-config.py file to option out features. One day it will all make sense to me, hehe.

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Wed Mar 22, 2006 12:18 pm

JA-forreal wrote:Most of the tutorials that I read in the past for building Blender with Scons went smoothly. But now I am running into problem after problem with each cvs update. Scons used to output a config.opts file. Now there is no config.opts and I see tips for making a user-config.py file to option out features. One day it will all make sense to me, hehe.


You can also read doc/blender-scons.txt for some info on how to use the new SCons system, also see the wiki page on the rewrite. I am aware that the system is still improvable - I have a break from it after the long and hard rewrite I did. But at some point I'll take up development of it again and make it more user-friendly :)

/Nathan

JA-forreal
Posts: 187
Joined: Sat Mar 22, 2003 10:45 pm

Postby JA-forreal » Wed Mar 22, 2006 5:13 pm

jesterKing wrote:
You can also read doc/blender-scons.txt for some info on how to use the new SCons system, also see the wiki page on the rewrite. I am aware that the system is still improvable - I have a break from it after the long and hard rewrite I did. But at some point I'll take up development of it again and make it more user-friendly :)

/Nathan


Thanks I will read this info. Hopefully I can get back to building Blender again. Thanks.

JA-forreal
Posts: 187
Joined: Sat Mar 22, 2003 10:45 pm

Postby JA-forreal » Wed Mar 22, 2006 6:10 pm

I read the scons tut. I triied a new build in windows with scons and it stopped due to this error-

Code: Select all

source/blender/python/api2_2x/Sys.c: In function `M_sys_expandpath':
source/blender/python/api2_2x/Sys.c:421: parse error before "BLI_strncpy"
scons: *** [C:\b\source\blender\python\api2_2x\Sys.o] Error 1".


Am I missing something python related?

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Wed Mar 22, 2006 11:07 pm

No, I think this is related to a commit done this week. I'll notify the committer.

/Nathan

dgonz
Posts: 1
Joined: Wed May 17, 2006 6:20 am

Postby dgonz » Wed May 17, 2006 6:31 am

Hello, Im new here my bad but some of the links aren't working, im a linux user, though even so im compiling now blender im not sure if i left some steps, and the linux guide link is dead.. :(

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Wed May 17, 2006 7:16 am

If you are having problems, you need to provide more specific information if you want help.

For linux users, I would personally recommend using the scons build system. There are two scons related files in the blender/doc directory.

leadhead
Posts: 3
Joined: Mon Jun 12, 2006 11:06 pm

Compiling Tutorial for OSX?

Postby leadhead » Tue Jun 13, 2006 4:39 pm

Looking for info on compiling on OSX ( currently looking more for compiling texture.c plugins ).

thanks!

lh

jdpf
Posts: 4
Joined: Thu May 18, 2006 7:31 pm
Contact:

Hints for building bf-blender on Mac OS X with scons

Postby jdpf » Sun Sep 24, 2006 9:32 am

For future reference, I have a few pointers for others trying to get bf-blender to build on OSX Tiger with scons:
  1. Use gcc_select to choose gcc-4.0.1 as the default compiler.
  2. Move or remove any installed SDL libs in the /usr/local/ tree. For some mysterious reason, the linker would always see these libs and ignore the libsdl versions lukep put into the ../lib tree. If you get conflicts with OpenAL, you'll know the linker is not seeing the ../lib path. One could argue that, ideally, the install script would test for such an install--- and avoid it--- but i gave up my experiments with that (and hacking sdl-config) because the linker would never see the proper path, even when hardcoded into user-config.py. <sigh> When i moved the SDL libs aside, it all worked as expected. :D
  3. Download, build, and install openexr (in the default location of /usr/local/) directly from openexr.org.
  4. Don't try to use ports or fink to install other dependencies, use the ../lib dependency tree.
  5. And after it builds, find the Xcode project in blender/make/xc_blender/xc_blender.xcodeproj

have a nice day.yad
jdpf

89ers
Posts: 17
Joined: Mon Feb 09, 2004 12:42 am
Location: Annecy, French Alps
Contact:

Postby 89ers » Mon Sep 25, 2006 12:10 am

Hi !

I've tried to compile Blender on my MacBookPro, under Tiger using the CVS from the 24/09/2006, and i get a lot of warnings and errors ! :oops:

I'm trying to figure how i can "bypass" some of the errors by setting on 'false' a lot of calls to the external libraries... (BTW, it seems that the darwin-config.py is for PowerPC only...)

But my problem is that, even when it seems to compile near the end, it tells me that my libjeg, libpng and so on are "out of date" ?? :shock:

I really don't understand, because they are from the CVS !

What am i doing wrong ?

And, eventually, do anyone know why there are so few libraries in the darwin.8.x.i386 folder ?

Thanks a lot for your answer, as i really would like to know how to compile Blender ! (i really need to be able to do 'tweaks' to some settings...)

Regards,
Laurent aka Tartiflette :D

psyborgue
Posts: 25
Joined: Thu Sep 28, 2006 8:18 am

out of date errors

Postby psyborgue » Thu Sep 28, 2006 8:21 am

I get the exact same problem with the libs being "out of date". I'm on ppc Tiger.

etr9j
Posts: 35
Joined: Fri Mar 10, 2006 2:40 am

Compiling Blender on MS Visual C++ 2005 Express

Postby etr9j » Tue Oct 03, 2006 3:28 pm

I'm unsure if posting on this thread will be useful since the post will be all the way at the bottom of page 3, but this is the Compiling Blender Guides thread, so I will post it here (but I am sure people will search for it if they need it). I've done the wiki guide on building with MS Visual C++ 2005 Express (VC 8 ) at:

http://mediawiki.blender.org/index.php/ ... l_Studio_8

I also have this on my own site:

http://www.geneome.net/index.php/blende ... -with-msvc

I only mention my site since I have posted replacement project files (replacing the already present VC7 files) so you could skip most of the set up/optimization steps in MSVC 8.

I've been keeping both up to date since new challenges seem to arise (such as the verse project build order), but all these hurdles are documented.

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Wed Oct 04, 2006 12:19 pm

etr9j, nice docs :) One note on your document: you can set flags for vc also in the scons config files. It should be obvious that creating a user-config.py (a copy from ie. win32-vc-config.py) and then tweaking CCFLAGS should give you also considerable performance gains.

It is up to platform maintainers to add any optimisations that will be also used for release. Other than that, it is a normal setting tweak process.

If you can add this to your document, it would reflect the reality a bit better.

Should you find that doing so doesn't work as expected you should report it as a bug in the bug tracker :)

/Nathan


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 0 guests