ziutek / ftdi

Go binding for libFTDI
Other
25 stars 14 forks source link

Fails to build on go 1.16 #17

Open ius opened 3 years ago

ius commented 3 years ago
$ go build
# github.com/ziutek/ftdi
./error.go:24:43: cannot use int32(e) (type int32) as type _Ctype_int in argument to _Cfunc_libusb_strerror

$ go version
go version go1.16.5 linux/amd64

https://github.com/ziutek/ftdi/blob/f54995ade86ebc5fa08d67f6fb3e3ac99f69c66c/error.go#L24

Reverting the last commit makes it build without error for me. That also fixes the deprecation warnings (which were fixed in #10 but reintroduced due to #14).

The build failures in #14 seem to occur because people aren't building against libftdi 1.5, which is over a year old now. It's a bit unfortunate that Ubuntu LTS (20.04) seems to be on 1.4 - most other distros should have picked it up by now.