goburrow / serial

Go (golang) serial library for modbus
https://github.com/goburrow/modbus
MIT License
191 stars 90 forks source link

No longer compiles under macOS due to dependency problem #16

Closed maddie closed 4 years ago

maddie commented 4 years ago

Since golang.org/x/sys/unix was being updated regularly, the following error occurs when compiling under macOS:

zsyscall_darwin.go:16:27: undefined: unix.SYS_IOCTL

This is due to golang/sys@6fcdbc0 removing all the SYS_* constants, the reason being that direct syscalls under Darwin are no longer supported.

Is there a fix for this?

EDIT: The temporary workaround for this problem is adding this line to the project's go.mod to use an older version of golang.org/x/sys/unix:

replace golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6

But this is not a long-term solution.

maddie commented 4 years ago

Sorry, wrong project, was getting confused 😂