Skip to content

Commit 907b5a2

Browse files
committed
fix: disable CGO for cross-compiled builds to avoid glibc mismatch
Produces static binaries that run on older Linux distros (e.g. Debian Bullseye with glibc 2.31) without requiring glibc 2.32+. Closes #64
1 parent 96d18c3 commit 907b5a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ all: pre clean
1515
@for goos in $(PLATFORMS); do \
1616
for goarch in $(ARCHITECTURES); do \
1717
echo "Building $$goos/$$goarch..."; \
18-
GOOS=$$goos GOARCH=$$goarch $(GO) -o $(BINARY)_$${goos}_$${goarch} || exit 1; \
18+
CGO_ENABLED=0 GOOS=$$goos GOARCH=$$goarch $(GO) -o $(BINARY)_$${goos}_$${goarch} || exit 1; \
1919
done; \
2020
done
2121

@@ -64,7 +64,7 @@ check-version:
6464
@if [ -z "$(VERSION)" ]; then echo "VERSION is required. Usage: make release VERSION=1.2"; exit 1; fi
6565

6666
upload:
67-
GOOS=linux GOARCH=amd64 go build -tags=influx -o $(BINARY)_linux_amd64
67+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags=influx -o $(BINARY)_linux_amd64
6868
aws s3 cp $(BINARY)_linux_amd64 s3://presto-deploy-infra-and-cluster-a9d5d14
6969

7070
sync:

0 commit comments

Comments
 (0)