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 &quot;kdtree.h&quot; file which makes pbrt crash when rendering some scenes using the Photon Map integrator. To do this, you should go to the &quot;pbrt-1.03&quot; folder and then to the &quot;core&quot; subfolder. Open the file named &quot;kdtree.h&quot; 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(&amp;buildNodes[start], &amp;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);">           &amp;buildNodes[end], CompareNode&lt;NodeData&gt;(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&lt;NodeData&gt;(splitAxis));</span><br><br>and save the file. This fixes the problem.<br>

<br>Now you may go to the &quot;pbrt-1.03&quot; folder and type &quot;<b>make</b>&quot; on the console and all should work fine. ;-)<br><br>Then you may need a &quot;.pbrt&quot; 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: &quot;<b>pbrt test_scene.pbrt</b>&quot; And later, of course, &quot;<b>exrdisplay -u scene.exr</b>&quot;<br>

<br>You may also see and edit &quot;.exr&quot; 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">&lt;<a href="mailto:dosto.walla@gmail.com">dosto.walla@gmail.com</a>&gt;</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">&lt;<a href="mailto:slavomir.kaslev@gmail.com" target="_blank">slavomir.kaslev@gmail.com</a>&gt;</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 &lt;<a href="mailto:dosto.walla@gmail.com" target="_blank">dosto.walla@gmail.com</a>&gt; wrote:<br>
&gt; Hello forum,<br>
&gt;<br>
&gt; I believe that issue has already been posted. I have OpenEXR installed and i<br>
&gt; am running a ray tracer that can write to .exr format and i can view the<br>
&gt; image using exrdisplay.<br>
&gt;<br>
&gt; When i try to compile PBRT  the exrcheck fails.  In The Makefile i gave the<br>
&gt; directory where the include directory to look into as instructed.<br>
&gt;<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt;<br>
&gt; Regards<br>
&gt; Sajjad<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; pbrt-discuss mailing list<br>
&gt; <a href="mailto:pbrt-discuss@pbrt.org" target="_blank">pbrt-discuss@pbrt.org</a><br>
&gt; <a href="http://six.pairlist.net/mailman/listinfo/pbrt-discuss" target="_blank">http://six.pairlist.net/mailman/listinfo/pbrt-discuss</a><br>
&gt;<br>
&gt;<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>