On Sat, Oct 6, 2012 at 4:05 PM, Dalai Felinto <dfeli
...@gmail.com> wrote:
> Hi Lukas,
> Did you run into this problem in Linux as well?
> For OSX the problem fixed itself when Jens got osl to build static osl with
> oiio and llvm static as well (and using forceload on CMake).
> Cheers,
> Dalai
> On Oct 6, 2012 5:35 AM, "Lukas Tönne" <lukas.toe...@gmail.com> wrote:
>> This seems to be some sort of "static initialization fiasco". Luckily it
>> is quite simple to fix:
>> https://github.com/DingTo/OpenShadingLanguage/commit/f37366ad2ed5b53f...
>> The "blender-fixes" branch is used to collect all the little solutions for
>> issues we're coming across during static OSL compile for Blender. I hope
>> these can eventually be merged upstream (will make a proper pull request
>> when everything is sorted out).
>> Regards,
>> Lukas
>> Am Dienstag, 18. September 2012 09:39:57 UTC+2 schrieb Dalai Felinto:
>>> Some followup:
>>> If I re-set the values of the Symbols of the global table it builds fine:
>>> http://www.pasteall.org/35356/diff
>>> This is a terrible hack though. And it doesn't solve my real problem that
>>> is to link osl with Blender (the problem there seems to also be related to
>>> TypeDesc). So I would really appreciate any helps towards finding what may
>>> be wrong with the linking in osx.
>>> Thanks,
>>> Dalai
>>> On Sunday, 16 September 2012 18:32:02 UTC-7, Dalai Felinto wrote:
>>>> Hello there,
>>>> As the topic says, I'm trying to build OSL with static oiio.
>>>> Although the building goes fine, when it gets to compile the shaders
>>>> it fails due to unknown data struct:
>>>> "../shaders/stdosl.h:493: error: No matching function call to 'area
>>>> (unknown)'"
>>>> The is related to the symtab. If I run $:oslc -d glass.osl I get:
>>>> Symbol table:
>>>> P : unknown
>>>> I : unknown
>>>> N : unknown
>>>> Ng : unknown
>>>> u : unknown
>>>> v : unknown
>>>> dPdu : unknown
>>>> dPdv : unknown
>>>> Ps : unknown
>>>> Ci : closure color
>>>> time : unknown
>>>> dtime : unknown
>>>> dPdtime : unknown
>>>> (. . .)
>>>> While with dynamic linking I get:
>>>> Symbol table:
>>>> P : point
>>>> I : vector
>>>> N : normal
>>>> Ng : normal
>>>> u : float
>>>> v : float
>>>> dPdu : vector
>>>> dPdv : vector
>>>> Ps : point
>>>> Ci : closure color
>>>> time : float
>>>> dtime : float
>>>> dPdtime : vector
>>>> (. . . )
>>>> There is a chance the problem is Mac exclusive. I'm trying to use
>>>> either osl (with oiio dynamic or static) to compile Blender. While the
>>>> osl with dynamic oiio works fine as a standalone (e.g., going through
>>>> the test suite files), it fails when used to compile Blender shaders
>>>> while building it. The error also seems related to the 'globals', but
>>>> it should be easy to address the error outside Blender first.
>>>> Thanks,
>>>> Dalai
>>>> Reference Links/Full error messages:
>>>> * output of oslc -d with static oiio:
>>>> http://www.pasteall.org/35294
>>>> * output of oslc -d with static oiio:
>>>> http://www.pasteall.org/35295
>>>> * git diff of my osl base code (using a patch from Jens Verwiebe for
>>>> the static linking, plus a patch to quite bison warning and other
>>>> small things)
>>>> http://www.pasteall.org/35301/diff
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OSL Developers" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/osl-dev/-/PrbPT57AzCIJ.
>> To post to this group, send email to osl-dev@googlegroups.com.
>> To unsubscribe from this group, send email to
>> osl-dev+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/osl-dev?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "OSL Developers" group.
> To post to this group, send email to osl-dev@googlegroups.com.
> To unsubscribe from this group, send email to
> osl-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/osl-dev?hl=en.