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

build failure on macos sierra #79

Closed icexin closed 7 years ago

icexin commented 7 years ago

go get -u github.com/svent/sift

It says # github.com/svent/sift Undefined symbols for architecture x86_64: "_bytes_to_lower", referenced from: __cgo_79a82a9469b9_Cfunc_bytes_to_lower in matching_cgo.cgo2.o (maybe you meant: __cgo_79a82a9469b9_Cfunc_bytes_to_lower) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

go version go1.7.1 darwin/amd64

svent commented 7 years ago

There seems to be a problem compiling the contained C code - you could try to compile a pure go build:

git clone https://github.com/svent/sift.git
cd sift
CGO_ENABLED=0 go build

That should work, but will come with a performance penalty for case insensitive searches or searches showing line numbers. The next version of sift will contain changes to get rid of the small C code parts and should not have these problems anymore.

icexin commented 7 years ago

It works. Thank you!

svent commented 7 years ago

Great, I will close this issue.