svent/sift

build failure on macos sierra

icexin opened this issue · 3 comments

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

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.

It works. Thank you!

svent commented

Great, I will close this issue.