Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile with Go 1.21 on macOS #162

Closed
aykevl opened this issue Jul 8, 2023 · 2 comments · Fixed by #163
Closed

Doesn't compile with Go 1.21 on macOS #162

aykevl opened this issue Jul 8, 2023 · 2 comments · Fixed by #163

Comments

@aykevl
Copy link

aykevl commented Jul 8, 2023

I found that go-serial doesn't compile with Go 1.21-rc2 on darwin:

# go.bug.st/serial/enumerator
../go-serial/enumerator/usb_darwin.go:142:11: cannot define new methods on non-local type C.CFStringRef
../go-serial/enumerator/usb_darwin.go:148:11: cannot define new methods on non-local type C.CFTypeRef
../go-serial/enumerator/usb_darwin.go:154:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go-serial/enumerator/usb_darwin.go:165:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go-serial/enumerator/usb_darwin.go:175:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go-serial/enumerator/usb_darwin.go:194:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go-serial/enumerator/usb_darwin.go:214:11: cannot define new methods on non-local type *C.io_iterator_t
../go-serial/enumerator/usb_darwin.go:218:11: cannot define new methods on non-local type *C.io_iterator_t
../go-serial/enumerator/usb_darwin.go:222:11: cannot define new methods on non-local type *C.io_iterator_t
../go-serial/enumerator/usb_darwin.go:229:11: cannot define new methods on non-local type *C.io_object_t
../go-serial/enumerator/usb_darwin.go:233:11: cannot define new methods on non-local type *C.io_object_t

This is with the latest commit, e381f2c.

@deadprogram
Copy link
Contributor

Please see https://tip.golang.org/doc/go1.21#cgo for why this is now failing.

@deadprogram
Copy link
Contributor

Pull request #163 should address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants