yggdrasil-network / yggdrasil-go

An experiment in scalable routing as an encrypted IPv6 overlay network
https://yggdrasil-network.github.io
Other
3.47k stars 238 forks source link

Cgo multicast doesn't build on macOS 13 #953

Closed rex4539 closed 11 months ago

rex4539 commented 1 year ago
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:794:2: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'?
        uuid_string_t   ext_jnl_uuid;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/device/device_types.h:89:33: note: 'io_string_t' declared here
typedef char                    io_string_t[512];
                                ^

...

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:796:20: error: use of undeclared identifier 'uuid_string_t'
        char            reserved[JIB_RESERVED_SIZE];
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:787:61: note: expanded from macro 'JIB_RESERVED_SIZE'
#define JIB_RESERVED_SIZE  ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)
                                                            ^
neilalexander commented 1 year ago

You will need to provide more details than that.

Which version of macOS, which version of Xcode and which version of Go?

rex4539 commented 1 year ago

macOS 13.0 (22A5358e) Xcode 14.1 beta 3 (14B5033e) go version go1.19.1 darwin/amd6

neilalexander commented 1 year ago

I'm wondering if this is something to do with the macOS multicast code, can you try building with CGO_ENABLED=0?

Failing that, it looks like there's something in the macOS SDK, so would recommend you try with a release version like Xcode 14.0.1.

rex4539 commented 1 year ago

I'm wondering if this is something to do with the macOS multicast code, can you try building with CGO_ENABLED=0?

This worked.

neilalexander commented 1 year ago

OK, glad to hear it. Will keep this issue open and rename it.

neilalexander commented 11 months ago

Closing as out-of-date.

rex4539 commented 11 months ago

Nope. It's still up to date.

neilalexander commented 11 months ago

I can't reproduce on three different systems — either there is something wrong with your Xcode/SDKs install, or you have out-of-date binaries in your Go toolchain. Try updating to the most recent Go version and then reinstalling gomobile afterwards.