From 4b8acea919c3de48a2c824d9c88ca2774894cc37 Mon Sep 17 00:00:00 2001 From: Wyatt Alt Date: Wed, 27 Sep 2023 10:27:50 -0700 Subject: [PATCH] Build CLI with -tags 'netgo' (#128) By default we are relying on cgo for DNS resolution, which causes binaries built on ubuntu 22.04 to break on ubuntu 20.04 due to some changes in glibc. See https://github.com/golang/go/issues/57328 This changes us to not rely on that, which causes builds to succeed. --- foxglove/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foxglove/Makefile b/foxglove/Makefile index 48534f1..330c647 100644 --- a/foxglove/Makefile +++ b/foxglove/Makefile @@ -15,11 +15,11 @@ version: @echo VERSION=$(VERSION) build: version - go build -ldflags "-X main.Version=$(VERSION)" + go build -tags 'netgo' -ldflags '-X main.Version=$(VERSION)' build-release: version mkdir -p bin - go build -ldflags "-X main.Version=$(VERSION)" -o bin/$(BINARY_NAME) + go build -tags 'netgo' -ldflags '-X main.Version=$(VERSION)' -o bin/$(BINARY_NAME) install: version - go install -ldflags "-X main.Version=$(VERSION)" + go install -tags 'netgo' -ldflags '-X main.Version=$(VERSION)'