-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add build flags to make CGO optional #1094
Conversation
The ZSTD library requires CGO. This commit adds build flags to ignore ZSTD if CGO is disabled. To build badger with ZSTD (and CGO) set CGO_ENABLED=1 To build badger without ZSTD (and CGO) set CGO_ENABLED=0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ A review job has been created and sent to the PullRequest network.
@jarifibrahim you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 4 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @jarifibrahim, @manishrjain, and @pullrequest[bot])
table/zstd_nocgo.go, line 25 at r2 (raw file):
) var errZstdCgo = errors.New("zstd compression requires building with cgo enabled")
"zstd compression requires building badger with cgo enabled"
Add a mention of badger, otherwise users of other software that has badger as a dependency might be confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @manishrjain, @martinmr, and @pullrequest[bot])
table/zstd_nocgo.go, line 25 at r2 (raw file):
Previously, martinmr (Martin Martinez Rivera) wrote…
"zstd compression requires building badger with cgo enabled"
Add a mention of badger, otherwise users of other software that has badger as a dependency might be confused.
Thanks! I've changed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @martinmr, and @pullrequest[bot])
Unfortunately go get still fails as a result of the gcc dependency. I can't build what I don't have... |
Oh, right. |
The ZSTD library requires CGO. This commit adds build flags to ignore
ZSTD if CGO is disabled.
To build badger with ZSTD (and CGO) set CGO_ENABLED=1
To build badger without ZSTD (and CGO) set CGO_ENABLED=0
This change is