Skip to content

Disable cgo: allow execution on machines without glibc (alpine and openwrt use musl-libc)#537

Open
madejackson wants to merge 17 commits intoazukaar:unstablefrom
aseracorp:disable-cgo
Open

Disable cgo: allow execution on machines without glibc (alpine and openwrt use musl-libc)#537
madejackson wants to merge 17 commits intoazukaar:unstablefrom
aseracorp:disable-cgo

Conversation

@madejackson
Copy link
Copy Markdown
Contributor

There was a go build issue where the final binary made use of a shared glibc library on x86_64. This lead to an issue where the binary could not be run on a machine without glibc (alpine and openwrt use musl-libc).

This commits add CGO_ENABLED=0 in front of go build commands to force go build to only use go libraries. This avoids this issue altogether while having a more predictable outcome.

There are two commits. The first commit disables cgo only where I encountered the error.
The second commit disables cgo for every go build command.

@cla-bot cla-bot bot added the cla-signed label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants