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

Set CGO_ENABLED=0 when we build #1089

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Set CGO_ENABLED=0 when we build #1089

merged 1 commit into from
Apr 6, 2023

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Apr 6, 2023

This forces the Go compile tools to produce a statically linked binary. In Go 1.20, the default changed to producing a binary that is dynamically linked against libc. We could use that, but it can create compatibility issues if the build system has a newer libc version than on the stacks we support.

Presently, that happens because the buildsystems are on Jammy and we have to support the Bionic stack for a bit longer.

This forces the Go compile tools to produce a statically linked binary. In Go 1.20, the default changed to producing a binary that is dynamically linked against libc. We could use that, but it can create compatibility issues if the build system has a newer libc version than on the stacks we support.

Presently, that happens because the buildsystems are on Jammy and we have to support the Bionic stack for a bit longer.

Signed-off-by: Daniel Mikusa <dan@mikusa.com>
@dmikusa dmikusa added type:bug A general bug semver:patch A change requiring a patch version bump labels Apr 6, 2023
@dmikusa dmikusa requested a review from a team as a code owner April 6, 2023 16:11
@dmikusa dmikusa merged commit 9c605dd into main Apr 6, 2023
@dmikusa dmikusa deleted the cgo-fix branch April 6, 2023 16:23
This was referenced Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants