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

fix(release): create static builds for linux amd64 #18805

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

jsternberg
Copy link
Contributor

Fixes #17675.

@jsternberg jsternberg requested review from a team and wolffcm and removed request for a team June 30, 2020 20:29
Copy link

@wolffcm wolffcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never had to deal with goreleaser at all, but this seems plausible to me.

env:
- GO111MODULE=on
- CGO_ENABLED=1
- CC=xcc
- PKG_CONFIG=$GOPATH/bin/pkg-config
- MACOSX_DEPLOYMENT_TARGET=10.11
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} {{if and (eq .Os "linux") (eq .Arch "amd64")}}-extldflags "-fno-PIC -static -Wl,-z,stack-size=8388608"{{end}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, why do you need to set stack-size here, is that related to the issue Adrian fixed where we were blowing out the stacks in Rust code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That's how to reset the stack size for musl back to the 8 MB.

@jsternberg jsternberg merged commit 540d5d3 into master Jul 1, 2020
@jsternberg jsternberg deleted the fix/goreleaser-static-linux-amd64-builds branch July 1, 2020 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build Linux Static binaries for InfluxDB 2.0
2 participants