From 0308abe49c0220ff59b79c4396661d2bd4ee667b Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Wed, 8 Nov 2023 22:39:15 +0000 Subject: [PATCH] Build w/ CGO_ENABLED=0 The CircleCI go build images' toolchain depends on a version of GLIBC that is higher than the version that ships on Ubuntu 20.04. This means users trying to install the released binaries on Ubuntu 20.04 will see: ``` $ gptcli gptcli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by gptcli) gptcli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by gptcli) ``` This commit attempts to mitigate the problem by building w/ CGO_ENABLED=0 as suggested by: https://github.com/golang/go/issues/57328 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 01f2753..db7ddb6 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ export GOFLAGS=-mod=vendor build: cmd/gptcli cmd/gptcli: vendor FORCE - go build -o gptcli cmd/gptcli/*.go + CGO_ENABLED=0 go build -o gptcli cmd/gptcli/*.go vendor: go.mod go mod download