Compilation HOWTO:

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

erydo
Posts: 8
Joined: Mon Oct 14, 2002 10:45 am

Compilation HOWTO:

Postby erydo » Mon Oct 14, 2002 11:53 am

UPDATED 10-15

Hello, everyone...it seems that nobody can get this thing to compile, but I've been able to get farther than most I've heard of so far, so I'll try to explain how to get at least to where I am.
Please note I'm doing this on Linux (RedHat 8), but the steps should hopefully help on other OS's as well.
This first thing to do is to extract your blender-source-2.25b.tar.gz file to your home directory:

Code: Select all

mv blender-source-2.25b.tar.gz ~
cd
tar xvfz blender-source-2.25b.tar.gz

The next thing to do, as the makefiles default to looking in a ~/develop directory rather than ~/blender, rather than mess with the makefiles as I did, rename the extracted directory to develop:

Code: Select all

mv ~/blender ~/develop

Now, if you go into ~/develop/source and type make, you get some errors about guessconfig being denied, so find it and give it executable permissions, and give the config file it writes to write permissions:

Code: Select all

cd ~/develop/source/tools/guess
chmod +x guessconfig
chmod +w config.guess
cd ~/develop/source

Now this takes us a bit further, but we still get errors when we type make. It says that it cannot find 'nan_compile.mk', when it goes into the 'creator' directory. This is a problem with almost all the source dirs, but you already have a copy of these files with you, just not in the right places, so we're going to symlink them to all the other source dirs so they can be accessed (on other OS's, you should be able to just move them), note I'm using bash scripting to accomplish this:

Code: Select all

cd ~/develop/source
for thesrcdir in `find -type d`; do
ln -sf $PWD/*.mk $thesrcdir/;
done;

Now, some successful compiling can happen...but not a lot.
There is still much to be done, I'm afraid.
If you try to 'make' now, something compiles, but then you get some errors about not being able to find two includes, MEM_guardedalloc.h and render.h.
MEM_guardedalloc.h is being looked for in ~/develop/lib/guardedalloc/include, but it is actually in ~/develop/intern/guardedalloc...this is going to happen a lot to different libraries, so do the following (thanks for everyone for suggestions about the environment vars and libs):

Code: Select all

export CC=gcc
export CCC=g++
export OPENGL_HEADERS=/usr/include/GL
export NAN_OPENSSL=/usr
export CFLAGS="-g -Wall -I/usr/include/python2.2 -I/usr/include/mozilla-1.0.1/nspr"
export CCFLAGS=$CFLAGS
export LDFLAGS="-L/usr/lib/python2.2/config -ldl"
export OS=linux

cd ~/develop/intern/guardedalloc
make
make install

cd ~/develop/intern/string
make
make install

cd ~/develop/intern/bmfont
make
make install

cd ~/develop/intern/container
make
make install

cd ~/develop/intern/memutil
make
make install

cd ~/develop/intern/moto
make
make install

cd ~/develop/intern/action
make
make install

cd ~/develop/intern/iksolver
make
make install

cd ~/develop/intern/ghost

Note at this point I had to manually comment out some lines in the intern/Makefile to have it recognize only Linux...

Code: Select all

make
make install

cd ~/develop/intern/keymaker
make
make install

Note that you may have to change where your OpenGL headers are found, as well as a few others; use your judgement...as you've probably figured out by now, this isn't for the faint of heart. These place the appropriate files in the ~/develop/lib directory, which is a GOOD THING: I'm rewriting pages and pages here, thanks to these tips.

Also, you should hopefully notice that I didn't cover all the intern directories, such as BSP,Decimation,Img, and Python...that's because I couldn't figure them out. If we're lucky, either
A) They'll turn out to be non-crucial (HAH), or
B) I'll come across a solution. Any help would be much appreciated.

Well, now that we have all the libs installed, why don't we give make a try in the source directory?

Code: Select all

cd ~/develop/source
make blendercreator


------------------------------------------------

Could anyone give advice as to how to compile those libraries?
That's all that needs doing, and it should work.
Last edited by erydo on Wed Oct 16, 2002 9:00 am, edited 2 times in total.

Darwin
Posts: 1
Joined: Wed Oct 16, 2002 12:12 am

Postby Darwin » Wed Oct 16, 2002 12:15 am

Thanks for the info. I just installed RedHad 8.0 (first linux ever) and were thinking about compiling Blender. I'll follow this thread and hope someone gives a good walkthrough. :D

/Darwin, back to blender..

Humphrey
Posts: 17
Joined: Wed Oct 16, 2002 12:18 am

Postby Humphrey » Wed Oct 16, 2002 12:24 am

That's about how far I got... well almost... Not a bad job considering that I haven't ever successfully compiled a program from source...

I'm using Mac OS X to use blender, but I don't have the delevopers tools, so I've been using yellow dog linux to try and compile it... But I gave up...

But when someone creates some binaries... then can they send them to me??

Please

erydo
Posts: 8
Joined: Mon Oct 14, 2002 10:45 am

A little more coming...

Postby erydo » Wed Oct 16, 2002 12:27 am

Well, I've actually gotten quite a bit further since this post, but I just got a tip that makes most of what I've written since irrelevent (not all, though)...I'll finish it up and then post it for you all :)

msph
Posts: 3
Joined: Tue Oct 15, 2002 11:46 pm

Postby msph » Wed Oct 16, 2002 12:28 am

Got the next step, though in an incredibly hacky way.

The problem, at least on my machine, seems to be rooted in the fact that guessconfig isn't working correctly. As in, it's not returning anything. Because of this, CC and CCC aren't getting set. The first symptom is when you're looking at the compile lines (as they flash past), and you see that every one of them is

cc -c -DNDEBUG ...

when it looks from the makefiles like it should be gcc -c -DNDEBUG ...

So, I fixed it by adding these two lines into nan_compile.mk:

Code: Select all

CC = gcc
CCC = g++


Note that I added these *outside* of any if blocks.

After adding this, compile goes on until the software starts complaining about BKE_global.h and BKE_main.h, like this:

Code: Select all

raddisplay.c:55: BKE_global.h: No such file or directory
raddisplay.c:56: BKE_main.h: No such file or directory


So, anyway, this gets it a bit farther. Could someone please post a better fix for this one, though?

Ack... and now I check the preview and discover that my post is already obsolete. Oh well. Here it is, just in case.

jochym
Posts: 14
Joined: Wed Oct 16, 2002 12:13 am

Successfull build (with running binaries)

Postby jochym » Wed Oct 16, 2002 12:45 am

Well. Using the info from

http://www.soylent-green.com/blend/NewCompInfo.txt

and some patience I was able to build a non-functional binaries of all importand packages (creator/publisher/player/plugin). All just bus-error/core-dump on startup trying to open initial window. But they go some way along to do it :)
The actual function is drawobject deep inside of the main initialization block.

I've had to change some minor things and install some additional libraries:

SDL, smpeg, vorbis, vorbisfile, openAL, openSSL, mesa

You have to go to the intern sub-directories and run make install there
to install some libraries in the ~/obj/ tree.

Remember that this is supposed to be run (probably) in the dedicated
account with source tree in ~/develop and target tree in ~/obj . Also all your make commands should include -I~/develop/source/ parameter
to include external *.mk files.

I've also tried to build debugging binary AND IT WORKS !!!!!

I was able to run it and render some image!
I do not think that the binary is of any use for anybody but I'll post it
at http://rozeta.com.pl/blender anyway. I'll also try to post my
tree there but not today. First I've to make a build script for it.

All was done under debian linux sid (devel distribution)

Have fun !

Pawel

msph
Posts: 3
Joined: Tue Oct 15, 2002 11:46 pm

Postby msph » Wed Oct 16, 2002 1:02 am

You RULE!

So, do the instructions in the original email still apply, or do these new instructions completely supercede them?

Humphrey
Posts: 17
Joined: Wed Oct 16, 2002 12:18 am

Postby Humphrey » Wed Oct 16, 2002 1:09 am

Coolness...
It sounds like you'r well on the way.

When you get it so that it compiles properly, you should post the fixed source so that others can compile it for there OS

kelk1
Posts: 2
Joined: Wed Oct 16, 2002 1:14 am

Postby kelk1 » Wed Oct 16, 2002 1:20 am

As msph pointed out, most problems come from the fact that guessconfig returns nothing (at least for me under linux).`

This is why the variable OS, CC, OPENGL_HEADERS, etc are not defined.

The first priority should be to make guess.config executable and fix guessconfig.

==
kk1

Humphrey
Posts: 17
Joined: Wed Oct 16, 2002 12:18 am

Postby Humphrey » Wed Oct 16, 2002 1:26 am

One Question....

How the heck did NaN compile this??[/list]

jochym
Posts: 14
Joined: Wed Oct 16, 2002 12:13 am

Build script

Postby jochym » Wed Oct 16, 2002 1:45 am

I'm working on build script right now. I'll post it as soon as I finish.

P.

Humphrey
Posts: 17
Joined: Wed Oct 16, 2002 12:18 am

Postby Humphrey » Wed Oct 16, 2002 1:55 am

SWEEET!!! :P

I can't wait!!

There shouldn't be any reasons why blender won't compile (with this script) on a ppc version of linux as opposed to x86?

jochym
Posts: 14
Joined: Wed Oct 16, 2002 12:13 am

Other arch

Postby jochym » Wed Oct 16, 2002 2:06 am

Well,

I think that it should be _DOABLE_, but not very easy. There are some
architectural differences, as far as I can tell. But anyway it would be
good starting point.

P.

kelk1
Posts: 2
Joined: Wed Oct 16, 2002 1:14 am

Postby kelk1 » Wed Oct 16, 2002 2:49 am

The build fails here on intern/decimation/intern/LOD_QSDecimator.cpp

LOD_QSDecimator.cpp: In member function `bool LOD_QSDecimator::CollapseEdge()':
LOD_QSDecimator.cpp:186: no matching function for call to `CTR_UHeap<LOD_Edge>::Remove(__gnu_cxx::__normal_iterator<LOD_Edge*, std::vector<LOD_Edge, std::allocator<LOD_Edge> > >, int)'
$HOME/develop/lib/linux-glibc2.2.5-i386/container/include/CTR_UHeap.h:149: candidates are: void CTR_UHeap<HeapType>::Remove(HeapType*, int) [with HeapType = LOD_Edge]

Five errors of the same style.

gcc-3.2 (GCC) 3.2 (Mandrake Linux 9.0 3.2-2mdk)

Ender
Posts: 24
Joined: Mon Oct 14, 2002 6:25 am

Postby Ender » Wed Oct 16, 2002 3:43 am

I was following the howto, but mine fails here... before I even get to the guardedalloc problem. :roll:

Code: Select all

****> Make all by @localhost at 21:39:06 15-Oct-2002 on
====> make all in source/creator
make[1]: *** No rule to make target `all'.  Stop.
make: *** [all] Error 1


Bah. I’m using Mac OS X 10.1.5, GCC 2.95.2, April 2002 Developer Tools beta


Return to “News & Chat”

Who is online

Users browsing this forum: No registered users and 0 guests