<p>Hi Brecht,</p>
<p>Building llvm and osl with RTTI doesn&#39;t change anything (and is a pita ;)</p>
<p>The class/struct inconsistency was fixed/committed, but doesn&#39;t do much other than remove some warnings.</p>
<p>Thanks,<br>
Dalai<br>
</p>
<div class="gmail_quote">On Sep 5, 2012 5:39 AM, &quot;Jens Verwiebe&quot; &lt;<a href="mailto:info@jensverwiebe.de">info@jensverwiebe.de</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">I did some analysing and found ambiguos stuff:<div><a href="http://www.pasteall.org/34979" target="_blank">http://www.pasteall.org/34979</a></div><div><br></div><div>Jens</div><div><br><div>
<div>Am 05.09.2012 um 12:26 schrieb Brecht Van Lommel &lt;<a href="mailto:brechtvanlommel@pandora.be" target="_blank">brechtvanlommel@pandora.be</a>&gt;:</div><br><blockquote type="cite">Could this perhaps be related to RTTI? That can influence class size.<br>
It seems RTTI was disabled in CMake but not in SCons.<br><br>Brecht.<br><br>On Tue, Sep 4, 2012 at 11:43 PM, Dalai Felinto &lt;<a href="mailto:dfelinto@gmail.com" target="_blank">dfelinto@gmail.com</a>&gt; wrote:<br><blockquote type="cite">
Hi there,<br><br>I&#39;m helping Jens to get OSL 1.2 to work on OSX as well. OSL is<br>building and Blender builds as well. However we are now stumbling into<br>a strange problem.<br><br>When rendering with OSL we get the errors:<br>
<a href="http://www.pasteall.org/34953" target="_blank">http://www.pasteall.org/34953</a><br>* note, Parameter 1 is the first parameter of the array (index 0)<br><br><br>The error comes from the register_closure() function in the OSL source<br>
code, see below:<br><br>//OpenShadingLanguage/src/liboslexec/shadingsys.cpp :~507<br>void ShadingSystemImpl::register_closure(...) {<br>    for (int i = 0; params &amp;&amp; params[i].type != TypeDesc(); ++i) {<br>        if (params[i].key == NULL &amp;&amp; params[i].type.size() !=<br>
(size_t)params[i].field_size) {<br>            error (&quot;Parameter %d of &#39;%s&#39; closure is assigned to a<br>field of incompatible size&quot;, i + 1, name);<br><br><br>This function is called from //intern/cycles/kernel/osl/osl_closures.cpp:62<br>
    ss-&gt;register_closure(name, id, params, prepare,<br>generic_closure_setup, generic_closure_compare);<br><br>A breakpoint to this line and found out that the value of params[0] is<br>indeed problematic:<br>Basically params[0].type.size() is zero, while params[0].field_size is 12:<br>
<a href="http://www.pasteall.org/34955" target="_blank">http://www.pasteall.org/34955</a><br><br><br>In Linux this is working though. Does anyone has any clues on what is<br>going wrong here?<br>If someone has a Linux debug of Blender with OSL could you please:<br>
<br>b osl_closures.cpp:62<br>r<br>[in blender, render something ... it will get back to the debugger]<br>p params[0]<br>p params[0].type.size()<br>p params[0].field_size<br><br>Thanks,<br>Dalai<br>_______________________________________________<br>
Bf-cycles mailing list<br><a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br><a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</blockquote>_______________________________________________<br>Bf-cycles mailing list<br><a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br><a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</blockquote></div><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div><span style="font-size:12px">_____________________________________</span></div><div><span style="font-size:12px"><div><br></div><div style="text-align:left">
Jens Verwiebe</div><div style="text-align:left">Allerskehre 44  -  22309 Hamburg</div><div style="text-align:left"><br></div><div style="text-align:left">Tel.: <a href="tel:%2B49%2040%2068%2078%2050" value="+4940687850" target="_blank">+49 40 68 78 50</a></div>
<div style="text-align:left">mobil: <a href="tel:%2B49%20172%20400%2049%2007" value="+491724004907" target="_blank">+49 172 400 49 07</a></div><div>mailto: <a href="mailto:info@jensverwiebe.de" target="_blank"><span style="color:rgb(0,0,238)">info@jensverwiebe.de</span></a></div>
<div>web:  <a href="http://www.jensverwiebe.de/" target="_blank"><span style="color:rgb(0,0,238)">http://www.jensverwiebe.de</span></a></div><div style="text-align:left">_____________________________________</div></span></div>
</span>
</div>
<br></div></div><br>_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
<br></blockquote></div>