Sunday, July 5, 2009

Compile Blender+Yafaray for Turion64x2

hello! long time no post..

i encountered a problem recently on compiling blender+yafaray using the sevenblend script. It gives me this error:

Compiling ==> 'SND_DummyDevice.cpp'
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
intern/SoundSystem/dummy/SND_DummyDevice.cpp:1: error: bad value (nocona -O2 -pipe) for -march= switch
intern/SoundSystem/dummy/SND_DummyDevice.cpp:1: error: bad value (nocona -O2 -pipe) for -mtune= switch
Compiling ==> 'SND_DeviceManager.cpp'
scons: *** [/home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/build/linux2/intern/SoundSystem/dummy/SND_DummyDevice.o] Error 1
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
intern/SoundSystem/intern/SND_DeviceManager.cpp:1: error: bad value (nocona -O2 -pipe) for -march= switch
intern/SoundSystem/intern/SND_DeviceManager.cpp:1: error: bad value (nocona -O2 -pipe) for -mtune= switch
scons: *** [/home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/build/linux2/intern/SoundSystem/intern/SND_DeviceManager.o] Error 1
scons: building terminated because of errors.
17:31:09 [WARN] *** ********** Check all logs in /home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/logs/compile_blender.log **********

By the way, am using a 64-bit ubuntu 9.04. I'm using the 2.6.30 kernel optimized for my processor (turion64x2).

Thanks to jensverwiebe for helping me out..

First, am using the WITH_OPTIM option, so i needed to change the user-config.py. It is supposed to compile an optimized blender+yafaray for your processor. so instead of simply typing ./sevenblend, i type this:
./sevenblend WITH_OPTIM
Go to the user-config directory, and rename user-config.py to user-config.py.bak for backup purposes.

Rename AMD64_user-config.py to user-config.py. This user configuration file is for a 64-bit AMD processor. If you'll be compiling an optimized build of blender+yafaray (using ./sevenblend WITH_OPTIM command), you may want to check out your processor and choose which config file to use. If you have a Core 2 processor, rename CORE2DUO_user-config.py into user-config.py.

Now we'll be editing our user-config.py (formerly AMD64_user-config.py). The error i posted above was due to the fact that my processor need a different flag, it should use k8 rather than nocona. My processor is part of the k8 processor family. Edit this line:
CFLAGS="-march=nocona -O2 -pipe"
and change it into
CFLAGS="-march=k8 -O2 -pipe"
Save the file.

Now, we'll be editing another file named linux2-config.py. It is located at .sources/blender/config. This will only be present if you've already attempted to use the sevenblend script. It will download the source code of blender and everything you need to compile. Look for the following lines:
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
and change them into
REL_CFLAGS = ['-O2','-march=k8']
REL_CCFLAGS = ['-O2','-march=k8']
Save the file and then compile. All should be well after doing this.. :)

1 comment:

  1. I agree utterly beside your conclusions and believe you’ve created some wonderful points. Also, I like style of the positioning and additionally the straightforward navigation. I’ve bookmarked your web site all of which can come back often!
    lost pst file

    ReplyDelete