svent / sift

A fast and powerful alternative to grep
https://sift-tool.org
GNU General Public License v3.0
1.6k stars 108 forks source link

Sift breaks on macOS Monterey #120

Open reafian opened 3 years ago

reafian commented 3 years ago

Sift and macOS 12 do not get along:

user@hel Desktop % sift
fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x1ed7c0, 0x21)
    /opt/go-1.7.1/src/runtime/panic.go:566 +0x95 fp=0x7ff7bfeff8f0 sp=0x7ff7bfeff8d0
runtime.goenvs()
    /opt/go-1.7.1/src/runtime/os_darwin.go:88 +0xa0 fp=0x7ff7bfeff920 sp=0x7ff7bfeff8f0
runtime.schedinit()
    /opt/go-1.7.1/src/runtime/proc.go:450 +0x9c fp=0x7ff7bfeff960 sp=0x7ff7bfeff920
runtime.rt0_go(0x7ff7bfeff990, 0x1, 0x7ff7bfeff990, 0x1000, 0x1, 0x7ff7bfeffad8, 0x0, 0x7ff7bfeffadd, 0x7ff7bfeffb05, 0x7ff7bfeffb3e, ...)
    /opt/go-1.7.1/src/runtime/asm_amd64.s:145 +0x14f fp=0x7ff7bfeff968 sp=0x7ff7bfeff960
user@hel Desktop %

More than happy to provide whatever is necessary to help debug and test.

Sift 0.9.0 standalone download. Brew version seems to work fine.

CypressLo commented 2 years ago

I got this issue as well. the sift ran into segmentation fault.

Last login: Fri Jul 15 09:45:52 on ttys001 cypress@MacStudio ~ % sift --version zsh: segmentation fault sift --version cypress@MacStudio ~ % sift -version zsh: segmentation fault sift -version cypress@MacStudio ~ % sift -v zsh: segmentation fault sift -v cypress@MacStudio ~ %

reafian commented 2 years ago

So, I've got this working and I'm commenting in case anybody wants to get sift working again too. First off, I know nothing about Go or how to properly build Go applications so there may well be a better way of doing this but it worked for me.

$ go mod init github.com/svent/sift-tools $ go mod tidy $ go build -o sift

It works for me and sift it now back up and running again. It would be good to have the official binaries updated but, in the meantime, this appears to work.