[Bf-cycles] OSL problems in OSX

Dalai Felinto dfelinto at gmail.com
Sun Sep 9 09:44:50 CEST 2012


Hi Lukas,
I'm building with cmake (i.e., no rtti).

The latest test I was reporting was to build llvm, oiio and osl WITH rtti.
Though I don't know if Jens remembered to turn it on in cycles as well.

Dalai
On Sep 8, 2012 10:18 PM, "Lukas Tönne" <lukas.toenne at gmail.com> wrote:

> @Dalai:
>
> I don't know about RTTI in osl and llvm, but it has to be *dis*abled
> in the Blender submodule for osl kernels. In the cmake file the
> following CXX arguments are added (cycles/kernel/osl/CMakeLists.txt,
> by RTTI_DISABLE_FLAGS variable defined in the main cycles cmake file):
>
> "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID"
>
> These would have to be added in scons as well i guess.
>
> On Fri, Sep 7, 2012 at 9:35 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
> > Hi Brecht,
> >
> > Building llvm and osl with RTTI doesn't change anything (and is a pita ;)
> >
> > The class/struct inconsistency was fixed/committed, but doesn't do much
> > other than remove some warnings.
> >
> > Thanks,
> > Dalai
> >
> > On Sep 5, 2012 5:39 AM, "Jens Verwiebe" <info at jensverwiebe.de> wrote:
> >>
> >> I did some analysing and found ambiguos stuff:
> >> http://www.pasteall.org/34979
> >>
> >> Jens
> >>
> >> Am 05.09.2012 um 12:26 schrieb Brecht Van Lommel
> >> <brechtvanlommel at pandora.be>:
> >>
> >> Could this perhaps be related to RTTI? That can influence class size.
> >> It seems RTTI was disabled in CMake but not in SCons.
> >>
> >> Brecht.
> >>
> >> On Tue, Sep 4, 2012 at 11:43 PM, Dalai Felinto <dfelinto at gmail.com>
> wrote:
> >>
> >> Hi there,
> >>
> >> I'm helping Jens to get OSL 1.2 to work on OSX as well. OSL is
> >> building and Blender builds as well. However we are now stumbling into
> >> a strange problem.
> >>
> >> When rendering with OSL we get the errors:
> >> http://www.pasteall.org/34953
> >> * note, Parameter 1 is the first parameter of the array (index 0)
> >>
> >>
> >> The error comes from the register_closure() function in the OSL source
> >> code, see below:
> >>
> >> //OpenShadingLanguage/src/liboslexec/shadingsys.cpp :~507
> >> void ShadingSystemImpl::register_closure(...) {
> >>    for (int i = 0; params && params[i].type != TypeDesc(); ++i) {
> >>        if (params[i].key == NULL && params[i].type.size() !=
> >> (size_t)params[i].field_size) {
> >>            error ("Parameter %d of '%s' closure is assigned to a
> >> field of incompatible size", i + 1, name);
> >>
> >>
> >> This function is called from
> >> //intern/cycles/kernel/osl/osl_closures.cpp:62
> >>    ss->register_closure(name, id, params, prepare,
> >> generic_closure_setup, generic_closure_compare);
> >>
> >> A breakpoint to this line and found out that the value of params[0] is
> >> indeed problematic:
> >> Basically params[0].type.size() is zero, while params[0].field_size is
> 12:
> >> http://www.pasteall.org/34955
> >>
> >>
> >> In Linux this is working though. Does anyone has any clues on what is
> >> going wrong here?
> >> If someone has a Linux debug of Blender with OSL could you please:
> >>
> >> b osl_closures.cpp:62
> >> r
> >> [in blender, render something ... it will get back to the debugger]
> >> p params[0]
> >> p params[0].type.size()
> >> p params[0].field_size
> >>
> >> Thanks,
> >> Dalai
> >> _______________________________________________
> >> Bf-cycles mailing list
> >> Bf-cycles at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-cycles
> >>
> >> _______________________________________________
> >> Bf-cycles mailing list
> >> Bf-cycles at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-cycles
> >>
> >>
> >> _____________________________________
> >>
> >> Jens Verwiebe
> >> Allerskehre 44  -  22309 Hamburg
> >>
> >> Tel.: +49 40 68 78 50
> >> mobil: +49 172 400 49 07
> >> mailto: info at jensverwiebe.de
> >> web:  http://www.jensverwiebe.de
> >> _____________________________________
> >>
> >>
> >> _______________________________________________
> >> Bf-cycles mailing list
> >> Bf-cycles at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-cycles
> >>
> >
> > _______________________________________________
> > Bf-cycles mailing list
> > Bf-cycles at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-cycles
> >
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20120909/2715a429/attachment.htm 


More information about the Bf-cycles mailing list