Guides for compiling Blender

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

dotty
Posts: 2
Joined: Sun Feb 17, 2008 11:03 am

Re: compiling on linux ia64

Postby dotty » Thu Feb 21, 2008 9:53 am

thank you for your quick answers! i tried it, but i have problems with resolving the dependencies. fortunately i have managed to compile blender on one of the ia64 machines. now i am using this binary on all ia64 machines and the performance is very nice.
sarah

rivendell
Posts: 2
Joined: Sun Jul 06, 2008 3:16 pm

Postby rivendell » Sun Jul 06, 2008 3:29 pm

I'm trying to compile Blender SVN under Ubuntu 8.04 64 bit using Scons witht the guide at this link:
http://wiki.blender.org/index.php/Blender_3D:_ActionBook/Blender_Compiling

I'm getting a compile/link errors due to undefined references. How do I fix this?

Code: Select all

Linking library ==> 'libbf_kernel.a'
Compiling ==> 'creator.c'
Linking library ==> 'libblender_creator.a'
Compiling ==> 'buildinfo.c'
Linking program ==> 'blender'
/home/me/compile/build/linux2/lib/libextern_redcode.a(codec.o): In function `redcode_decode_video_float':
codec.c:(.text+0xe9): undefined reference to `opj_image_destroy'
/home/me/compile/build/linux2/lib/libextern_redcode.a(codec.o): In function `redcode_decode_video_raw':
codec.c:(.text+0x1a4): undefined reference to `opj_set_default_decoder_parameters'
codec.c:(.text+0x1d4): undefined reference to `opj_create_decompress'
codec.c:(.text+0x1ec): undefined reference to `opj_set_event_mgr'
codec.c:(.text+0x1f7): undefined reference to `opj_setup_decoder'
codec.c:(.text+0x20d): undefined reference to `opj_cio_open'
codec.c:(.text+0x21b): undefined reference to `opj_decode'
codec.c:(.text+0x22f): undefined reference to `opj_cio_close'
codec.c:(.text+0x23c): undefined reference to `opj_destroy_decompress'
codec.c:(.text+0x2f1): undefined reference to `opj_image_destroy'
codec.c:(.text+0x316): undefined reference to `opj_destroy_decompress'
codec.c:(.text+0x31e): undefined reference to `opj_cio_close'
collect2: ld returned 1 exit status
scons: *** [/home/me/compile/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.
me@upc:~/compile/blender$

frank_me
Posts: 6
Joined: Tue Jul 08, 2008 9:23 am
Location: North Carolina USA

Postby frank_me » Tue Jul 08, 2008 9:42 am

rivendell wrote:I'm trying to compile Blender SVN under Ubuntu 8.04 64 bit using Scons witht the guide at this link:
http://wiki.blender.org/index.php/Blender_3D:_ActionBook/Blender_Compiling

I'm getting a compile/link errors due to undefined references. How do I fix this?

Code: Select all

Linking library ==> 'libbf_kernel.a'
Compiling ==> 'creator.c'
Linking library ==> 'libblender_creator.a'
Compiling ==> 'buildinfo.c'
Linking program ==> 'blender'
/home/me/compile/build/linux2/lib/libextern_redcode.a(codec.o): In function `redcode_decode_video_float':
codec.c:(.text+0xe9): undefined reference to `opj_image_destroy'
/home/me/compile/build/linux2/lib/libextern_redcode.a(codec.o): In function `redcode_decode_video_raw':
codec.c:(.text+0x1a4): undefined reference to `opj_set_default_decoder_parameters'
codec.c:(.text+0x1d4): undefined reference to `opj_create_decompress'
codec.c:(.text+0x1ec): undefined reference to `opj_set_event_mgr'
codec.c:(.text+0x1f7): undefined reference to `opj_setup_decoder'
codec.c:(.text+0x20d): undefined reference to `opj_cio_open'
codec.c:(.text+0x21b): undefined reference to `opj_decode'
codec.c:(.text+0x22f): undefined reference to `opj_cio_close'
codec.c:(.text+0x23c): undefined reference to `opj_destroy_decompress'
codec.c:(.text+0x2f1): undefined reference to `opj_image_destroy'
codec.c:(.text+0x316): undefined reference to `opj_destroy_decompress'
codec.c:(.text+0x31e): undefined reference to `opj_cio_close'
collect2: ld returned 1 exit status
scons: *** [/home/me/compile/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.
me@upc:~/compile/blender$


I haven't moved up to 64bit yet, but this error indicates that your libopenjpeg
library didn't build (?). As a quick check, does ./build/linux2/extern/libopenjpeg/openjpeg.o exist ??

rivendell
Posts: 2
Joined: Sun Jul 06, 2008 3:16 pm

Postby rivendell » Wed Jul 09, 2008 12:56 am

[code] As a quick check, does ./build/linux2/extern/libopenjpeg/openjpeg.o exist ??[/quote]

Thanks frank_me. This file does not exist on my machine. What should I do now?

frank_me
Posts: 6
Joined: Tue Jul 08, 2008 9:23 am
Location: North Carolina USA

Postby frank_me » Wed Jul 09, 2008 7:47 am

First thing is to try building without openjpeg.

Add the flag WITH_BF_OPENJPEG=0 to other flags you're passing on the command line, i.e. scons <other flags...> WITH_BF_OPENJPEG=0

(As an aside, typing scons -h will give you a list of Blender build flags,
along with their default and actual values. On my system, default value is
false, but actual is true for openjpeg, and I don't remember setting that anywhere

Give that a shot, see if the build gets further, then decide if you need
the openjpeg lib

farkasd
Posts: 1
Joined: Wed Sep 17, 2008 1:07 pm

Postby farkasd » Wed Sep 24, 2008 4:48 pm

Hello!

I would like to use Blender in a Desktop Grid for rendering, so first I have to compile it somehow to be able to run in any linux distribution without any library dependencies. How can I compile Blender statically to not use any dynamic libraries?

Arathos
Posts: 2
Joined: Tue Mar 17, 2009 11:56 am

Postby Arathos » Tue Mar 17, 2009 12:40 pm

hello all!
@rivendell: I could compile and run blender easily and - most important - succesfully with the following link: http://wiki.blender.org/index.php/Blend ... nder/Linux
In the first step all required dependancies are listed, maybe it helps when you install them.

Now to my question: Was anyone able to build Blender with Eclipse and Ubuntu?
When I build blender with scons as a build tool in eclipse I get this error message:
ImportError: No module named Variables:
File "/media/daten/Informatik/Java/blender2/SConstruct", line 42:
import tools.btools
File "/media/daten/Informatik/Java/blender2/tools/btools.py", line 6:
import SCons.Variables
Could anyone fix that problem? Or should I use makefiles instead of scons?
Thanks for every reply - and sorry for my English, it still has room for improvement :roll: !

Stefan[/i]

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

Postby jesterKing » Tue Mar 17, 2009 3:24 pm

Set eclipse to use a custom tool for building. Then as custom building command do python ./scons/scons.py (make sure you use the scons that comes with the SVN sources).

/Nathan

Arathos
Posts: 2
Joined: Tue Mar 17, 2009 11:56 am

Postby Arathos » Tue Mar 17, 2009 4:03 pm

Thank you for the advice, it works! But the problem is, that this scons.py puts the binaries into a folder on the same level as the Eclipse-Project. Another place would be better but I don't know how to change the output folder.
But anyway, it works for me now with makefiles, finally I can start with coding - I hope I won't be frustrated too much :)

Stefan

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

Postby jesterKing » Tue Mar 17, 2009 9:53 pm

You can set output dirs by specifying BF_INSTALLDIR and BF_BUILDDIR

/Nathan

manis
Posts: 1
Joined: Mon Mar 02, 2009 11:42 am

blender scons on win xp and msvc 9

Postby manis » Wed Jun 03, 2009 12:51 pm

SOLVED see the update.

I have problem building with scons+vc9 on win xp but I can build with CMake so
its ok if you ignore me but I'm going insane!!!!
Here is the build log.

http://www.pasteall.org/5886

if its silly to add a pasteall link in here I have a short description:

scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'SND_DummyDevice.cpp'
SND_DummyDevice.cpp
D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\exception(83) : error C2144: syntax error : 'size_t' should be preceded by ';'

and the errors goes on and on !!!

The fun/crazy part is that if I run lines 98 through 111 (which is cl.exe with
its arguments) in cmd the SND_DummyDevice.obj file is created with no
problem!!! what is it?!

I heard there must be no space in path of applications that are compiling
under linux and you are trying to compile on windows so there is no space.
And without any luck once I copied the whole source tree to c:\blender to
see if any magic happens. I digested every single bit of information from
doc and google about scons but I can't figure out what the problem is.


BestRegards
Mani

Update: I was running scons in VC9 environment variables. (2008 CMD)
that was not right , for a proper installation read this :

http://wiki.blender.org/index.php/Dev:D ... er/Windows

You can set python environment variables generally then if you want an
easy way to add SDK6 include files you can run SDK6 command prompt
and append lib and libpath with set command from what you see in VC9
environment variables.

It seems you need SDK6 include files and VC9 libs. if you don't set the lib
path you will get the famous:

IlmThread.lib(IlmThreadPool.obj) : error LNK2019: unresolved external symbol

that was mentioned in forum several times and thought to be OPENEXR problem.
Last edited by manis on Fri Jun 05, 2009 1:56 am, edited 2 times in total.

Evgenij_M
Posts: 5
Joined: Fri Feb 06, 2009 2:53 pm

Postby Evgenij_M » Sun Jun 28, 2009 8:39 pm

Using Kubuntu Jaunty amd64.

I tried to compile blender 2.5 (completely new to this) by following blender wiki:
Installed all dependencies for 2.49a, because I didn't find dependencies list for 2.5.

svn checkout https://svn.blender.org/svnroot/bf-blen ... blender2.5
cd ~/blender2.5/blender/
scons

and by the end of the process I get the following error:


Code: Select all

.
.
(*It seems that up to this point it goes without any errors*)
Compiling ==> 'buildinfo.c'
Linking program ==> 'blender'
Linking program ==> 'blenderplayer'
/home/evgenij/blender2.5/build/linux2/lib/libgp_ghost.a(GPG_ghost.o): In function `load_game_data(char*, char*, char*)':
GPG_ghost.cpp:(.text+0x87): undefined reference to `BKE_reports_init'
.
.
(*A couple of thousands "undefined reference" messages.*)
.
.
BLO_readblenfile.c:(.text+0x196): undefined reference to `BKE_report'
collect2: выполнение ld завершилось с кодом возврата 1
scons: *** [/home/evgenij/blender2.5/build/linux2/bin/blenderplayer] Error 1
scons: building terminated because of errors.
evgenij@evg-dsk:~/blender2.5/blender$


How do I fix this?

btw: I did manage to compile 2.49a by that method, without any problems.

Update:
I managed to build blender 2.5 by disabling blenderplayer. Add this to your user-config.py - WITH_BF_PLAYER = 'false' if you have the same problem.

psy-fi
Posts: 8
Joined: Thu Sep 17, 2009 5:04 am

Postby psy-fi » Thu Sep 17, 2009 5:13 am

Succesful 2.50 build with MinGW-Scons, gcc 4.4.0 (revision 23297). However had to set OpenEXR to false. If anyone can do the build with this setup straight without problem and including openEXRplease notify.

dsavi
Posts: 7
Joined: Wed Jan 07, 2009 2:33 pm
Location: Finland

Postby dsavi » Fri Sep 25, 2009 6:08 pm

I can't find the development files for Python 3.1.1 in Ubuntu Jaunty 32bit. Does somebody know where I can find them? Or how to build Blender 2.5 with Python 2.6?

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

Postby stiv » Fri Sep 25, 2009 7:13 pm

dsavi wrote:I can't find the development files for Python 3.1.1 in Ubuntu Jaunty 32bit. Does somebody know where I can find them? Or how to build Blender 2.5 with Python 2.6?


Linux distros usually put the headers and such in a *-dev or *-devel package. Your other alternative is to compile and install Python from the source, a relatively simple process.

You will need Python 3.1 to build Blender 2.50. Note that running scons requires also that you have 2.x series Python since scons has not been ported yet.


Return to “Coding Blender”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests