Building Luxrays on Ubuntu - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Building Luxrays on Ubuntu

Personal tools

From LuxRender Wiki

Jump to: navigation, search

Contents

1 INSTALL DEPENDENCIES

First create a folder where to work.

mkdir ~/dev

sudo apt-get install build-essential mercurial subversion cmake flex bison

sudo apt-get install libbz2-dev zlib1g-dev

Follow Dougal's tutorial to download and install python3.2 and boost (chapters 2 and 5: http://www.luxrender.net/forum/viewtopic.php?f=22&t=5750)


2 DOWNLOAD AND INSTALL FREEGLUT

Download the latest stable freeglut release from here http://freeglut.sourceforge.net/index.php#download

Unpack the archive into ~/dev and rename the unpacked folder into freeglut Open a Terminal.

cd ~/dev/freeglut

./configure

make all

sudo make install

3 DOWNLOAD AND BUILD OPENCL SDK

Download AMD APP SKD from amd's site. http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx

Download Linux32 if you want to build 32bit or linux64 for 64bit version.

Unpack the archive. It should contain another targz archive. Unpack it into ~/dev and rename the unpacked folder to appsdk.

Open a Terminal.

cd ~/dev/appsdk

make

if make returns an error code, just retry.


4 DOWNLOAD AND COMPILE LUXRAYS SOURCE

Open your browser to http://src.luxrender.net/ Click on the gz button of luxrays to download.

Unpack the gz archive into ~/dev and rename the unpacked folder to luxrays Now we'll configure the make configuration files for luxrays. Open ~/dev/luxrays folder and open Configuration.cmake

In lines 56-58 you have to define the paths to boost, opencl and freeglut. This is what it should be like after edited:

Building-luxrays-boost.jpg

Open a Terminal.

cd ~/dev/luxrays

cmake .


If cmake doesn't return any error code skip "Fixing cmake errors" and go to "Making"

Fixing cmake errors

cmake will return an error. Now we'll fix the error by editing CMakeCache.txt file. This could be different for every user.

Ctrl+F to open Find panel. Look for 'boost'.

Change Boost_INCLUDE_DIR:PATH to /usr/include/boost (only edit the part after '=', not the entire line).

Change Boost_LIBRARY_DIRS:FILEPATH to /usr/lib

Building-luxrays-boost2.png

Now open Find panel to look for 'opencl'. Make the three lines be something like this:

Building-luxrays-opencl.JPG

Notice that in the example the linked libOpenCL.so is the x86 version. Some users may need to use the x64 version.

Save and close.

Open Terminal

cd ~/dev/luxrays

cmake .

now you shouldn't get any error. If an error occurs, read carefully the console output and try to fix it in CMakeCache.txt like we have done for boost and opencl.


Making

make

Luxrays is built! You'll find the executables in ~/dev/luxrays/bin directory.