Skip to content

Commit

Permalink
Build CLI with CGO_ENABLED=0
Browse files Browse the repository at this point in the history
Due to golang/go#57328, binaries built on
Github's "ubuntu-latest" don't run on Ubuntu 20.04. Setting
CGO_ENABLED=0 at build fixes this. Since we don't rely on CGO in this
repo, this seems like the easiest fix.
  • Loading branch information
Wyatt Alt committed Sep 27, 2023
1 parent d8c6c75 commit 02d77b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions foxglove/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ version:
@echo VERSION=$(VERSION)

build: version
go build -ldflags "-X main.Version=$(VERSION)"
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(VERSION)"

build-release: version
mkdir -p bin
go build -ldflags "-X main.Version=$(VERSION)" -o bin/$(BINARY_NAME)
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(VERSION)" -o bin/$(BINARY_NAME)

install: version
go install -ldflags "-X main.Version=$(VERSION)"
CGO_ENABLED=0 go install -ldflags "-X main.Version=$(VERSION)"

0 comments on commit 02d77b4

Please sign in to comment.