sane
sane copied to clipboard
go build for arm failed: github.com/tjgq/sane/frame.go:14:15: undefined: Format
Hello,
i want to compile my code for raspberry pi on manjaro but i got this error
env GOOS=linux GOARCH=arm GOARM=7 go build
# github.com/tjgq/sane
../../github.com/tjgq/sane/frame.go:14:15: undefined: Format
I think this happens because Format is defined in sane.go, which uses cgo, and cgo is disabled by default when cross-compiling. You need to set the CGO_ENABLED and CC environment variables. (Search for "cross-compiling" in https://golang.org/cmd/cgo/).
Alternatively, you can avoid cross-compilation by building directly on your Raspberry PI.
thanks i compilied it on the raspberry it works now but i got weird scan result on the pi. scanimage works fine and the scan results are ok
need more time to debug
[edit] raspberry pi 3+ => nice scan results raspberry zero w => weird scan results