First you'd need to find where in the code that happens. It's due to a
specific use of va_arg, so grepping for that should help. Then replacing
that with a similar C construct should help, as we do support most va_arg,
just not va_arg on a struct or other complex things.

- Alon



On Wed, Sep 3, 2014 at 12:39 PM, Arve Knudsen <[email protected]>
wrote:

> Thanks for the input, Alon. I'm kind of a stranger to ChucK's source code,
> although I've read through some of it. Do you have any advice as to how the
> problematic code can be re-written with Emscripten in mind?
>
> Arve
>
>
>
> On Tue, Sep 2, 2014 at 8:50 PM, Alon Zakai <[email protected]> wrote:
>
>> Looks like issue #2238
>>
>> Until that's fixed, might be able to work around it in the source.
>>
>> - Alon
>>
>>
>>
>> On Tue, Sep 2, 2014 at 4:19 AM, Bruce Mitchener <
>> [email protected]> wrote:
>>
>>> Arve,
>>>
>>> emscripten imposes limits on what can be passed through a va_arg.  Alon
>>> will have to help further on this as I don't know what the rules are.
>>>
>>>  - Bruce
>>>
>>>
>>>
>>> On Tue, Sep 2, 2014 at 5:48 PM, Arve Knudsen <[email protected]>
>>> wrote:
>>>
>>>> Bruce, do you know if there's a solution for the below compilation
>>>> issue though?
>>>>
>>>>     lo/message.c:160:11: error: cannot compile this aggregate va_arg
>>>> expression yet
>>>>                 tt = va_arg(ap, lo_timetag);
>>>>
>>>> Thanks,
>>>> Arve
>>>>
>>>>
>>>> On Tue, Sep 2, 2014 at 12:24 PM, Arve Knudsen <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Bruce, thanks for your swift reply
>>>>>
>>>>> I'm not building with Xcode, but with a Makefile for OS X
>>>>> (makefile.osx). I'm guessing the latter somehow defines __MACOSX_CORE__, 
>>>>> so
>>>>> I figure I need to create a Makefile tailored for Emscripten.
>>>>>
>>>>> Thanks,
>>>>> Arve
>>>>>
>>>>>
>>>>> On Tue, Sep 2, 2014 at 3:59 AM, Bruce Mitchener <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Arve,
>>>>>>
>>>>>> You'll notice in the code that that is wrapped with:
>>>>>>
>>>>>> #if defined(__MACOSX_CORE__)
>>>>>> #include <AvailabilityMacros.h>
>>>>>> #endif
>>>>>>
>>>>>> In emscripten, __MACOSX_CORE__ shouldn't be defined.
>>>>>>
>>>>>> We check to see what emcc / em++ is defining, with this:
>>>>>>
>>>>>>   emcc -dM -E -x c /dev/null
>>>>>>
>>>>>> It isn't defining __MACOSX_CORE__ ... so something else in your build
>>>>>> environment must be. (It is worth noting that clang doesn't set that
>>>>>> either, so this is something coming from ChucK probably.
>>>>>>
>>>>>> Doing a quick search shows that the Xcode project is the one setting
>>>>>> that define ... are you still trying to build with Xcode?
>>>>>>
>>>>>> (And it requires that one of the right platforms be set up and it
>>>>>> doesn't look like someone has done that yet for emscripten, so I assume
>>>>>> that's your end goal here?)
>>>>>>
>>>>>>  - Bruce
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Sep 2, 2014 at 3:42 AM, Arve Knudsen <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I'm trying to port the ChucK C++ project (
>>>>>>> https://github.com/ccrma/chuck) to JS with Emscripten (1.22.0), but
>>>>>>> after substituting emcc for clang and clang++, building on OS X fails 
>>>>>>> due
>>>>>>> to AvailabilityMacros.h not being found:
>>>>>>>
>>>>>>>     ./chuck_dl.h:661:10: fatal error: 'AvailabilityMacros.h' file
>>>>>>> not found
>>>>>>>
>>>>>>> Is this a known problem? From googling, it appears to be an OS X
>>>>>>> system header.
>>>>>>>
>>>>>>> If I only substitute the C compiler, the build breaks due to another
>>>>>>> issue:
>>>>>>>
>>>>>>>     lo/message.c:160:11: error: cannot compile this aggregate va_arg
>>>>>>> expression yet
>>>>>>>                 tt = va_arg(ap, lo_timetag);
>>>>>>>
>>>>>>> Is there any solution at this point for this last problem?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Arve
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "emscripten-discuss" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "emscripten-discuss" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to