Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master can't compile without CGO_ENABLED=1 (zstd) #1081

Closed
akhenakh opened this issue Oct 15, 2019 · 4 comments
Closed

master can't compile without CGO_ENABLED=1 (zstd) #1081

akhenakh opened this issue Oct 15, 2019 · 4 comments

Comments

@akhenakh
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.13.1 darwin/amd64

What version of Badger are you using?

master v1.6.1-0.20191012010444-dbe1cb90c815

Does this issue reproduce with the latest master?

yes

What are the hardware specifications of the machine (RAM, OS, Disk)?

macbook pro

What did you do?

updated badger from 1.6.0 to master

What did you expect to see?

compilation working without CGO_ENABLED=1

What did you see instead?

 go build github.com/DataDog/zstd: build constraints exclude all Go files in /Users/xxx/dev/go/pkg/mod/github.com/!data!dog/zstd@v1.4.1  

Enabling cgo solved the issue (related to zstd), is it by choice or a bug, badger v2 will require cgo ?

@jarifibrahim
Copy link
Contributor

@akhenakh Its by choice. ZSTD requires CGO. I'll update the README to reflect this https://github.com/dgraph-io/badger/#comparisons .

@akhenakh
Copy link
Author

akhenakh commented Oct 15, 2019

FIY Sarama just replaced datadog/ztsd by https://github.com/klauspost/compress

IBM/sarama#1477

Not being full native is a huge change, a stopper for some, especially for a library ...

@amurchick
Copy link

amurchick commented Oct 21, 2019

@akhenakh Its by choice. ZSTD requires CGO. I'll update the README to reflect this https://github.com/dgraph-io/badger/#comparisons .

@jarifibrahim - Is I am understand correctly - the badger will now never can be build without CGO?

Or is there a plan to return the build without a CGO?

@jarifibrahim
Copy link
Contributor

@akhenakh @amurchick https://github.com/klauspost/compress is not in stable state https://github.com/klauspost/compress/tree/master/zstd#status . We might switch to https://github.com/klauspost/compress once it is more stable.

@jarifibrahim - Is I am understand correctly - the badger will now never can be build without CGO?

No. CGO will be optional once #1094 is merged. Badger can be build with or without CGO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants