Compiling PBRT 1.03 under Ubuntu 8.04 (hardy)

84 views
Skip to first unread message

Marcos Hack

unread,
May 15, 2008, 9:17:19 PM5/15/08
to pbrt
Hello all,

Follow the steps to compile PBRT 1.03 under Ubuntu 8.04:

install necessary packages

sudo apt-get install libopenexr-dev libopenexr2ldbl libilmbase6
build-essential flex bison zlib1g zlib1g-dev


edit PBRT Makefile and change the variables EXRINCLUDE and EXRLIBDIR
as follow

EXRINCLUDE=-I/usr/include/OpenEXR
EXRLIBDIR=-L/usr/lib


and finally

make


all binaries will be in the "bin" directory.


Regards,
Marcos Hack.

Jesper de Jong

unread,
May 16, 2008, 4:04:58 PM5/16/08
to pbrt
Thanks. One addition if you are running 64-bit Ubuntu: The -fPIC
compiler option needs to be added to the Makefile. Find the following
line in the Makefile:

CXXFLAGS=$(OPT) $(INCLUDE) $(WARN)

And change it to this:

CXXFLAGS=$(OPT) $(INCLUDE) $(WARN) -fPIC

Also, you can compile pbrt with some extra optimizations, for example
if you have a newer processor which supports SSE3 instructions, change
the line beginning with OPT= to the following:

OPT=-O2 -msse3 -mfpmath=sse

regards,
Jesper
Reply all
Reply to author
Forward
Message has been deleted
0 new messages