Hi Sajjad,<br><br>I was able to build pbrt 1.03 in the Ubuntu 8.10 x64 environment performing the following steps. (I guess it should work for Ubuntu 9.04 x64 too).<br><br>First, you need to install some packages in order to fulfill the dependencies. You can install all at once by typing this command on the console:<br>
<br style="background-color: rgb(255, 255, 204);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 204);"><span style="font-family: courier new,monospace;">sudo apt-get install build-essential zlib1g zlib1g-dev flex bison libopenexr6 libopenexr-dev libilmbase6 libilmbase-dev exrtools openexr openexr-viewers</span></span><br>
<br>After that, you really should change lines 13 and 14 of the Makefile to:<br><br><span style="background-color: rgb(255, 255, 204);"><span style="font-family: courier new,monospace;">EXRINCLUDE=-I/usr/include/OpenEXR</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">EXRLIBDIR=-L/usr/lib</span></span><br><br>(You may go into these folders and check if the files are really there if you want to.)<br><br>You may also want to change the line 24 of the Makefile from:<br>
<br><span style="background-color: rgb(255, 255, 204);">OPT=-O2</span><br><br>to:<br><br><span style="background-color: rgb(255, 255, 204);">OPT=-O3 -msse3 -mfpmath=sse</span><br><br>if you have a processor that supports sse3. It does make the renderer a little quicker.<br>
<br>Now, assuming you are using a 64 bit OS, you SHOULD change line 29 of the Makefile from:<br>
<br><span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);">CXXFLAGS=$(OPT) $(INCLUDE) $(WARN)</span><br><br>to:<br><br><span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);">CXXFLAGS=$(OPT) $(INCLUDE) $(WARN) -fPIC</span><br>
<br>The PIC flag stands for Position Independent Code, which is needed in a 64 bit environment.<br><br>And also, if you have added any extra plugins to pbrt, you should add it to the appropriate list between the lines 46 and 65 of the Makefile.<br>
<br>You may also want to fix a little bug in the "kdtree.h" file which makes pbrt crash when rendering some scenes using the Photon Map integrator. To do this, you should go to the "pbrt-1.03" folder and then to the "core" subfolder. Open the file named "kdtree.h" for editing (first, check if you have write permission on it). Change lines 96 and 97 from:<br>
<br><span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);"> std::nth_element(&buildNodes[start], &buildNodes[splitPos],</span><br style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);">
<span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);"> &buildNodes[end], CompareNode<NodeData>(splitAxis));</span><br><br> to:<br><br style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);">
<span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);"> std::nth_element(buildNodes.begin() + start, buildNodes.begin() + splitPos,</span><br style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);">
<span style="font-family: courier new,monospace; background-color: rgb(255, 255, 204);"> buildNodes.begin() + end, CompareNode<NodeData>(splitAxis));</span><br><br>and save the file. This fixes the problem.<br>
<br>Now you may go to the "pbrt-1.03" folder and type "<b>make</b>" on the console and all should work fine. ;-)<br><br>Then you may need a ".pbrt" text scene description file to test the renderer. You may create it by hand or using an exporter. Then, all you need to type is: "<b>pbrt test_scene.pbrt</b>" And later, of course, "<b>exrdisplay -u scene.exr</b>"<br>
<br>You may also see and edit ".exr" images using other softwares, like Krita (available on the Ubuntu package repository) and Cinepaint.<br><br>Hope that helps.<br><br>Regards,<br><br>Joćo Vicente<br><br><br><br>
<br><br><br><br><br><div class="gmail_quote">On Fri, May 22, 2009 at 4:42 AM, Sajjad <span dir="ltr"><<a href="mailto:dosto.walla@gmail.com">dosto.walla@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I already did that.<br><br>i even did try as follows:<div class="im"><br><br>EXRINCLUDE=-I/usr/include/OpenEXR<br></div>EXRLIBDIR=-L/usr/lib64<br><br><br>Considering the fact that i am using a 64-bit OS<br><br><br>Any other hint?<br>
<br><br>Regards<br><font color="#888888">
Sajjad</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Fri, May 22, 2009 at 8:40 AM, Slavomir Kaslev <span dir="ltr"><<a href="mailto:slavomir.kaslev@gmail.com" target="_blank">slavomir.kaslev@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Fri, May 22, 2009 at 2:34 AM, Sajjad <<a href="mailto:dosto.walla@gmail.com" target="_blank">dosto.walla@gmail.com</a>> wrote:<br>
> Hello forum,<br>
><br>
> I believe that issue has already been posted. I have OpenEXR installed and i<br>
> am running a ray tracer that can write to .exr format and i can view the<br>
> image using exrdisplay.<br>
><br>
> When i try to compile PBRT the exrcheck fails. In The Makefile i gave the<br>
> directory where the include directory to look into as instructed.<br>
><br>
><br>
> Any suggestion to get around that problem?<br>
<br>
</div></div>Change in the Makefile<br>
<br>
EXRINCLUDE=-I/usr/local/include/OpenEXR<br>
EXRLIBDIR=-L/usr/local/lib<br>
<br>
to<br>
<br>
EXRINCLUDE=-I/usr/include/OpenEXR<br>
EXRLIBDIR=-L/usr/lib<br>
<br>
<br>
><br>
><br>
> Regards<br>
> Sajjad<br>
><br>
> _______________________________________________<br>
> pbrt-discuss mailing list<br>
> <a href="mailto:pbrt-discuss@pbrt.org" target="_blank">pbrt-discuss@pbrt.org</a><br>
> <a href="http://six.pairlist.net/mailman/listinfo/pbrt-discuss" target="_blank">http://six.pairlist.net/mailman/listinfo/pbrt-discuss</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Slavomir Kaslev<br>
_______________________________________________<br>
pbrt-discuss mailing list<br>
<a href="mailto:pbrt-discuss@pbrt.org" target="_blank">pbrt-discuss@pbrt.org</a><br>
<a href="http://six.pairlist.net/mailman/listinfo/pbrt-discuss" target="_blank">http://six.pairlist.net/mailman/listinfo/pbrt-discuss</a><br>
</font></blockquote></div><br>
</div></div><br>_______________________________________________<br>
pbrt-discuss mailing list<br>
<a href="mailto:pbrt-discuss@pbrt.org">pbrt-discuss@pbrt.org</a><br>
<a href="http://six.pairlist.net/mailman/listinfo/pbrt-discuss" target="_blank">http://six.pairlist.net/mailman/listinfo/pbrt-discuss</a><br>
<br></blockquote></div><br>