usbarmory / interlock

INTERLOCK - file encryption and HSM front-end
Other
295 stars 46 forks source link

Build failure on 32bit x86 Linux #43

Closed vloup closed 5 years ago

vloup commented 5 years ago

Running latest version of go (PIE, 1.12.7), this is what I get when running make with signal support:

# github.com/inversepath/interlock/internal
internal/dcp.go:247:31: undefined: syscall.SYS_SETSOCKOPT
internal/dcp.go:259:30: undefined: unix.SYS_ACCEPT
make: *** [Makefile:15: build] Error 2

Indeed, those calls do not exist on 32 bits Linux: https://golang.org/src/syscall/zsysnum_linux_386.go https://github.com/golang/sys/blob/6ec70d6a5542cba804c6d16ebe8392601a0b7b60/unix/zsysnum_linux_386.go

abarisani commented 5 years ago

NXP HSMs make sense only on ARM anyway, I've restricted their compilation only on linux,arm and this should take care of the issue:

https://github.com/inversepath/interlock/commit/a9462de233f4f0a234f8f22f539884447fe88810