LibUSB import in go-dvote
Go-dvote imports usb
, which should not be necessary. Likely through go-ethereum.
The following is a symptom of this issue which has been fixed but might be interesting: Compiling the Explorer (imports go-dvote) on Docker using Alpine Linux, this import cannot be compiled:
# github.com/karalabe/usb
In file included from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20191104083709-911d15fe12a9/libusb/libusb/os/linux_usbfs.c:43,
from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20191104083709-911d15fe12a9/libs.go:46:
/go/pkg/mod/github.com/karalabe/usb@v0.0.0-20191104083709-911d15fe12a9/libusb/libusb/os/linux_usbfs.h:24:10: fatal error: linux/types.h: No such file or directory
24 | #include <linux/types.h>
| ^~~~~~~~~~~~~~~
This was fixed by adding the linux-headers apk to dockerfile.
Edited by Nate Williams