I'm trying to generate bindings for wlroots, but encountered lots of issues parsing headers.
Trying to break it down into manageable chunks and I'm currently trying to just parse wayland-server-core.h which is the main dependency of wlroots.
c-for-go fails with the following message:
/usr/include/wayland-server-core.h:458:2: undefined: __typeof__
/usr/include/wayland-server-core.h:458:2: undefined: __typeof__
/usr/include/wayland-server-core.h:458:2: undefined: __builtin_offsetof
/usr/include/wayland-server-core.h:458:2: called object is not a function or function pointer (have '<undefined>')
/usr/include/wayland-server-core.h:458:46: undefined: link
/usr/include/wayland-server-core.h:458:2: called object is not a function or function pointer (have '<undefined>')
/usr/include/wayland-server-core.h:458:2: called object is not a function or function pointer (have '<undefined>')
/usr/include/wayland-server-core.h:458:2: called object is not a function or function pointer (have '<undefined>')
/usr/include/wayland-server-core.h:458:2: assignment from incompatible type ('struct wl_listener*' = '<undefined>')
/usr/include/wayland-server-core.h:458:2: undefined: __typeof__
too many errors
When I use "--ccdefs", I get the following
[ERR] /usr/include/bits/byteswap.h:37:10: called object is not a function or function pointer (have '<undefined>') (and 6 more errors)
Not sure if with that flag it fails at an earlier or later point in parsing.
Anyways, in an attempt to just push through, I also included a stub file with the functions missing in byteswap.h:
static inline unsigned short __builtin_bswap16(unsigned short a)
{
return (a<<8)|(a>>8);
}
static inline unsigned short __builtin_bswap32(unsigned short a)
{
return (a<<16)|(a>>16);
}
static inline unsigned short __builtin_bswap64(unsigned short a)
{
return (a<<32)|(a>>32);
}
I'm trying to generate bindings for wlroots, but encountered lots of issues parsing headers.
Trying to break it down into manageable chunks and I'm currently trying to just parse wayland-server-core.h which is the main dependency of wlroots.
c-for-go fails with the following message:
When I use "--ccdefs", I get the following
Not sure if with that flag it fails at an earlier or later point in parsing. Anyways, in an attempt to just push through, I also included a stub file with the functions missing in byteswap.h:
after which I get the following:
So something seems very messed up here. Anything obvious I'm doing wrong? Is wlroots possibly too complex for c-for-go?