go-face icon indicating copy to clipboard operation
go-face copied to clipboard

SIGILL: illegal instruction

Open agorman opened this issue 1 year ago • 5 comments

I'm having an issue where when build the binary inside a docker container and then try to run it on another machine I get SIGILL: illegal instruction. If I build and run it on the same machine then it works fine. I'm thinking it may be due to differing CPU capabilities. It's being built on a system with an AMD processor and it's being run on a system with an Intel processor.

I've tried building with CGO_CXXFLAGS="-std=c++1z -Wall -DNDEBUG -march=x86-64 -mtune=generic" but it doesn't seem to help.

Any ideas on how I can get the binary to run on any x86_64 machine?

SIGILL: illegal instruction
PC=0xdf7133 m=8 sigcode=2
signal arrived during cgo execution
instruction bytes: 0xc4 0xe3 0xd1 0x6b 0xc9 0x50 0x48 0x39 0xd8 0x7c 0xea 0xc5 0xfb 0x10 0xad 0x90

goroutine 26 [syscall]:
runtime.cgocall(0xdc2ff0, 0xc0000afbd0)
	/usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0000afba8 sp=0xc0000afb70 pc=0x478e3c
github.com/Kagami/go-face._Cfunc_facerec_init(0x7fc58c000b60)
	_cgo_gotypes.go:176 +0x49 fp=0xc0000afbd0 sp=0xc0000afba8 pc=0xd8abe9
github.com/Kagami/go-face.NewRecognizer({0x1169d9c?, 0xc000110270?})
	/root/go/pkg/mod/github.com/!kagami/[email protected]/face.go:68 +0x67 fp=0xc0000afc38 sp=0xc0000afbd0 pc=0xd8b107
github.com/Kagami/go-face.NewRecognizerWithConfig({0x1169d9c?, 0xc0000afcb8?}, 0x482a67?, 0x3e800000, 0x0)
	/root/go/pkg/mod/github.com/!kagami/[email protected]/face.go:82 +0x3b fp=0xc0000afc88 sp=0xc0000afc38 pc=0xd8b55b

agorman avatar Jan 31 '23 21:01 agorman