xlab / c-for-go

Automatic C-Go Bindings Generator for Go Programming Language
https://c.for-go.com
MIT License
1.5k stars 119 forks source link

Update `modernc.org/cc/v4` to latest version #171

Closed sue445 closed 2 months ago

sue445 commented 2 months ago

I encountered the following error when executing c-for-go

$ c-for-go -ccincl /path/to/my-conf.yml
  processing /path/to/my-conf.yml ⠹[ERR] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:40:2: "Missing definition of size_t!"

content of _malloc.h is following.

#include <Availability.h>
#include <sys/cdefs.h>
#if __has_include(<sys/_types/_size_t.h>)
#include <sys/_types/_size_t.h>
#elif __has_include(<_liblibc/_size_t.h>)
#include <_liblibc/_size_t.h>
#else
#error "Missing definition of size_t!"
#endif

This problem was reported by https://gitlab.com/cznic/cc/-/issues/149 and has been fixed by https://gitlab.com/cznic/cc/-/commit/a8f3b8d4ff81c4d2c6b0ac1df378f41c3c7b34ab

So I updated modernc.org/cc/v4 to the latest version.

This is working fine locally for me.

$ c-for-go -ccincl /path/to/my-conf.yml
  processing /path/to/my-conf.yml done.
xlab commented 2 months ago

Good stuff!