kramphub / kiya

manage secrets for development and infrastructure deployment using Google Cloud Platform
Other
16 stars 7 forks source link

Running compiled binary on new macOS Monterey 12.0.1 fails #26

Closed rokjoana closed 2 years ago

rokjoana commented 3 years ago

I've found that running the compiled kiya binary in macOS Monterey 12.0.1, with go 1.17.2 is failing with the following error:

fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x1573b72, 0x21)
        /usr/local/go/src/runtime/panic.go:619 +0x81 fp=0x7ff7bfeff5b8 sp=0x7ff7bfeff598 pc=0x1029531
runtime.goenvs()
        /usr/local/go/src/runtime/os_darwin.go:129 +0x83 fp=0x7ff7bfeff5e8 sp=0x7ff7bfeff5b8 pc=0x10270b3
runtime.schedinit()
        /usr/local/go/src/runtime/proc.go:496 +0xa4 fp=0x7ff7bfeff640 sp=0x7ff7bfeff5e8 pc=0x102bdf4
runtime.rt0_go(0x7ff7bfeff670, 0x3, 0x7ff7bfeff670, 0x1000000, 0x3, 0x7ff7bfeff840, 0x7ff7bfeff845, 0x7ff7bfeff84c, 0x0, 0x7ff7bfeff851, ...)
        /usr/local/go/src/runtime/asm_amd64.s:252 +0x1f4 fp=0x7ff7bfeff648 sp=0x7ff7bfeff640 pc=0x1051ee4

I've checked the script to compile and package the binaries and by removing the setup of CGO_ENABLED=0 and the flag -installsuffix cgo that are only necessary for go versions under 1.10. The flags should be removed with the current go version in the go.mod file (and maybe the go version could be bumped up?).