Previous Thread  Next Thread

chat icon Compilation HOWTO:

erydo

Posted: Mon Oct 14, 2002 10:53 am
Joined: 14 Oct 2002
Posts: 8
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:

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:

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:

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:

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:

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:

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:

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 8:00 am; edited 2 times in total
Reply with quote


Darwin

Posted: Tue Oct 15, 2002 11:15 pm
Joined: 15 Oct 2002
Posts: 1
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. Very Happy

/Darwin, back to blender..
Reply with quote


Humphrey

Posted: Tue Oct 15, 2002 11:24 pm
Joined: 15 Oct 2002
Posts: 17
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
Reply with quote


erydo

Posted: Tue Oct 15, 2002 11:27 pm
Joined: 14 Oct 2002
Posts: 8
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 Smile
Reply with quote


msph

Posted: Tue Oct 15, 2002 11:28 pm
Joined: 15 Oct 2002
Posts: 3
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:

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:

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.
Reply with quote


jochym

Posted: Tue Oct 15, 2002 11:45 pm
Joined: 15 Oct 2002
Posts: 14
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 Smile
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
Reply with quote


msph

Posted: Wed Oct 16, 2002 12:02 am
Joined: 15 Oct 2002
Posts: 3
You RULE!

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


Humphrey

Posted: Wed Oct 16, 2002 12:09 am
Joined: 15 Oct 2002
Posts: 17
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
Reply with quote


kelk1

Posted: Wed Oct 16, 2002 12:20 am
Joined: 16 Oct 2002
Posts: 2
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
Reply with quote


Humphrey

Posted: Wed Oct 16, 2002 12:26 am
Joined: 15 Oct 2002
Posts: 17
One Question....

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


jochym

Posted: Wed Oct 16, 2002 12:45 am
Joined: 15 Oct 2002
Posts: 14
I'm working on build script right now. I'll post it as soon as I finish.

P.
Reply with quote


Humphrey

Posted: Wed Oct 16, 2002 12:55 am
Joined: 15 Oct 2002
Posts: 17
SWEEET!!! Razz

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?
Reply with quote


jochym

Posted: Wed Oct 16, 2002 1:06 am
Joined: 15 Oct 2002
Posts: 14
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.
Reply with quote


kelk1

Posted: Wed Oct 16, 2002 1:49 am
Joined: 16 Oct 2002
Posts: 2
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)
Reply with quote


Ender

Posted: Wed Oct 16, 2002 2:43 am
Joined: 14 Oct 2002
Posts: 24
I was following the howto, but mine fails here... before I even get to the guardedalloc problem. Rolling Eyes
Code:
****> 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
Reply with quote


Goto page 1, 2  Next
 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group