Previous Thread  Next Thread

chat icon Building Blender with Cycles in Ubuntu 11.10 (with CMake)

marunowskia

Posted: Mon Apr 16, 2012 11:09 pm
Joined: 16 Apr 2012
Posts: 1
I had a heck of a time getting blender 2.62 ...(r45704)... to build in Ubuntu, and figured I would post the steps I took to finally get it working.

Again, these steps are targeted at users who want to build blender with gpu the new rendering engine.

These steps are basically a combination of
1)http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Building
2)http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Ubuntu/CMake

As following the steps in order on each page individually resulted in build failure.


Before you get started, if you want CUDA support, be sure to download the latest CUDA drivers from NVidia's CUDA webpage. To test that you have installed the drivers correctly, go ahead and download the CUDA SDK, and verify that you can compile and run some of the CUDA SDK samples. (If you don't want CUDA, or don't have an NVidia card, just ignore this paragraph)


Steps:

---------------------------
sudo apt-get update; sudo apt-get install subversion build-essential gettext \
libxi-dev libsndfile1-dev \
libpng12-dev libfftw3-dev \
libopenexr-dev libopenjpeg-dev \
libopenal-dev libalut-dev libvorbis-dev \
libglu1-mesa-dev libsdl1.2-dev libfreetype6-dev \
libtiff4-dev libavdevice-dev \
libavformat-dev libavutil-dev libavcodec-dev libjack-dev \
libswscale-dev libx264-dev libmp3lame-dev python3.2-dev \
libspnav-dev


sudo apt-get install git-core

cd ~

mkdir blender-cycles
cd blender-cycles
mkdir boost
cd boost
------------------------------

download http://sourceforge.net/projects/boost/files/boost/1.47.0/boost_1_47_0.tar.gz/download to your ~/boost directory

Note that several of the following commands can require super-user access. If you get a permission denied error, just prefix the command with "sudo ".


(More steps)
---------------------
cd ~
cd boost
tar xzf boost_1_47_0.tar.gz
cd boost_1_47_0/
./bootstrap.sh
sudo ./bjam -j4 variant=release link=static threading=multi --with-filesystem --with-thread --with-regex --with-system --with-date_time stage install --prefix=../

cd ~
cd blender-cycles
sudo git clone git://github.com/OpenImageIO/oiio.git
cd oiio
sudo git checkout RB-0.10
mkdir -p build/linux
cd build/linux
sudo cmake ../../src/ -DBUILDSTATIC=1 -DBOOST_CUSTOM=1 -DBoost_INCLUDE_DIRS=`pwd`/../../../boost/include/ -DBoost_LIBRARY_DIRS=`pwd`/../../../boost/lib -DBoost_LIBRARIES="boost_date_time;boost_filesystem;boost_thread;boost_regex;boost_system" -DCMAKE_INSTALL_PREFIX=`pwd`/../../dist/linux
sudo make -j4 install
----------------

Here's where I had the most problems. One of the times I tried running the command "svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender/ blender", I ended up with a blender directory that was seemingly incomplete, and was missing many of the CMakeLists.txt files. For whatever reason, when i tried just plain old "svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender" it worked correctly. Therefore, that's what I'm suggesting you to do here.

If you find cmake is complaining that it can't find the CMakeLists.txt files, try downloading the blender source again, that helped for me.

(Last steps)

-------------------
svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender/ blender
mkdir build

cd build

sudo cmake ../blender -DOPENIMAGEIO_ROOT_DIR=../oiio/dist/linux -DBOOST_ROOT=../boost -DBOOST_CUSTOM=1 -DBoost_INCLUDE_DIRS=`pwd`/../boost/include/ -DBoost_LIBRARY_DIRS=`pwd`/../boost/lib -DBoost_LIBRARIES="`pwd`/../boost/lib/libboost_date_time.a;`pwd`/../boost/lib/libboost_filesystem.a;`pwd`/../boost/lib/libboost_thread.a;`pwd`/../boost/lib/libboost_regex.a;`pwd`/../boost/lib/libboost_system.a"

sudo make -j4 install
---------------------

You should now be able to run blender by running the following command:
~/blender-cycles/build/bin/blender;


I can't guarantee that this is the simplest series of steps needed to build blender 2.62 with cycles, but I can tell you... " It works on my machine Smile "

Hope this helped.

Keep up the awesome.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group