Notes on how to build the pbrt system for a Linux system with gcc 2.95 ---------------------------------------------------------------------- Steven Bergner, sbergner@cs.sfu.ca, 16.08.2004 Assume CD contents are in $(PBRTCD). In my case this would be /gruvi/Data/People/Steven/physmod There is a readme.htm with general installation instructions. Read it carefully and follow all the steps. If you notice, you have to build the source yourself and the build as described doesn't work for you, then read on here. In the following I describe issues and solutions for installing PBRT in the GruviLab environment (gcc 2.95). Building PBRT from the source ----------------------------- Extract source $(PBRTCD)/unix/source.tgz to some directory. In the following we just call it [pbrtsrc]. Run 'make' in [pbrtsrc]. ERROR message like 'FLT_MAX undefined' - find the first occurence of CXXFLAGS in [pbrtsrc]/Makefile. Below it insert a line: CXXFLAGS += -DFLT_MAX=HUGE If that doesn't work try to be more explicit: CXXFLAGS += -DFLT_MAX="3.40282347e+38F" ERROR 'vasprintf implicit definition of function' go to the above definition of CXXFLAGS and insert another line below: CXXFLAGS += -D_GNU_SOURCE ERROR upon linking 'Imf::Header' etc. unresolved symbol REASON: linking agains OpenEXR library (for EXR image format support) broken. SOLUTION: See below 'rebuilding OpenEXR'. ERROR: unresolved symbol 'floor' when compiling/linking tools/ply2pbrt SOLUTION: in file [pbrtsrc]/tools/Makefile - make sure LDFLAGS contains -lm - append $(LDFLAGS) to the target build line following ply2pbrt: ... (third to last line of the file) Rebuilding OpenEXR ------------------ Get the source from www.openexr.com - download version OpenEXR-1.2.1.tar.gz Move the contents of directory [pbrtsrc]/OpenEXR into subdir [pbrtsrc]/OpenEXR/original. Extract OpenEXR-1.2.1.tar.gz to [pbrtsrc]/OpenEXR/OpenEXR-1.2.1 Go there with: cd [pbrtsrc]/OpenEXR/OpenEXR-1.2.1 Run the configure script. If you wish to install it into your local OpenEXR directory define the according directory prefix. ./configure --prefix=[pbrtsrc]/OpenEXR/ Compile using the following line: make Install everything to the directory defined as 'prefix' before. make install Rename the library directory mv [pbrtsrc]/OpenEXR/lib [pbrtsrc]/OpenEXR/lib-linux Append this directory to the shared library path, e.g. export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):[pbrtsrc]/OpenEXR/lib-linux or setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):[pbrtsrc]/OpenEXR/lib-linux Go back to the [pbrtsrc] directory to again try 'make'.