From c3f663b5aba1c619138d703f130433b2863bf968 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Tue, 22 Aug 2023 08:30:34 -0700 Subject: [PATCH 1/2] Drop building 32-bit release binaries Depending on the upstream Cilium packages you import, you may transitively pull in the agent, which does not build on 32-bit OSes due to the following error, which also breaks the Hubble build: vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_linux.go:56:27: invalid operation: fst.Type == mntType (mismatched types int32 and int64) Signed-off-by: Chance Zibolski --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 916be8fb3..8594f54e9 100644 --- a/Makefile +++ b/Makefile @@ -53,10 +53,10 @@ local-release: clean ARCHS='amd64 arm64'; \ ;; \ linux) \ - ARCHS='386 amd64 arm arm64'; \ + ARCHS='amd64 arm64'; \ ;; \ windows) \ - ARCHS='386 amd64 arm64'; \ + ARCHS='amd64 arm64'; \ EXT=".exe"; \ ;; \ esac; \ From 298cf7077e56172967a0cfea69ef5b4500922bd0 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Tue, 22 Aug 2023 08:23:07 -0700 Subject: [PATCH 2/2] Makefile: Use hubble target to build release binaries Signed-off-by: Chance Zibolski Signed-off-by: Michi Mutsuzaki --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8594f54e9..2c229a6b8 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,8 @@ local-release: clean for ARCH in $$ARCHS; do \ echo Building release binary for $$OS/$$ARCH...; \ test -d release/$$OS/$$ARCH|| mkdir -p release/$$OS/$$ARCH; \ - env GOOS=$$OS GOARCH=$$ARCH $(GO_BUILD) $(if $(GO_TAGS),-tags $(GO_TAGS)) -ldflags "-w -s -X 'github.com/cilium/cilium/hubble/pkg.Version=${VERSION}'" -o release/$$OS/$$ARCH/$(TARGET)$$EXT; \ + GOOS=$$OS GOARCH=$$ARCH $(MAKE) hubble; \ + mv $(TARGET) release/$$OS/$$ARCH/$(TARGET)$$EXT; \ tar -czf release/$(TARGET)-$$OS-$$ARCH.tar.gz -C release/$$OS/$$ARCH $(TARGET)$$EXT; \ (cd release && sha256sum $(TARGET)-$$OS-$$ARCH.tar.gz > $(TARGET)-$$OS-$$ARCH.tar.gz.sha256sum); \ done; \