[chuck-dev] Porting ChucK to OpenBSD

Will Maier willmaier at ml1.net
Mon Sep 29 11:05:01 EDT 2008

Hi Stephen-

On Mon, Sep 29, 2008 at 09:50:26AM -0400, Stephen Sinclair wrote:
> The error is on the declaration of the Stk::swap16 function.  Is
> it possible this word swap16 is a macro somewhere in the BSD
> headers?  It seems to be perhaps replacing the word swap16 with
> __swap16md_x, but I have no idea why.
> What do you see with "grep -r swap16 /usr/include" ?

Quite a bit, actually (now that I'm all hopped up on tea and
thinking clearly). We define several swap* macros that interfere
here. Thanks for the nudge in the right direction!

> The unterminated #if errors don't make much sense to me.

Once I undef swap{16,32,64}, those go away.

With a few patches[0], I can get most of ChucK to compile. It looks,
though, like src/util_hid.cpp is going to take quite a bit more
work. Neither the Linux or OS X implementations there will work on
OpenBSD (we don't provide input.h, and our joystick.h doesn't seem
to have everything needed). If any developers would be interested in
working on util_hid portability, I'd be happy to provide access to
an i386 OpenBSD box. How much of this interface needs to actually be
implemented? I've been reading the code, and it seems that at least
some of it could simply remain unsupported while still making ChucK
at least somewhat usable.

Thanks again!

[0] http://www.lfod.us/~will/chuck-openbsd.diff


[Will Maier]-----------------[willmaier at ml1.net|http://www.lfod.us/]

More information about the chuck-dev mailing list