Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable CGO for supervisor and agent builds #1972

Open
wants to merge 2 commits into
base: release/v2.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,35 +85,35 @@ build-windows: build-windows-amd64

.PHONY: build-linux-ppc64
build-linux-ppc64:
GOOS=linux GOARCH=ppc64 $(MAKE) build-binaries -j2
GOOS=linux GOARCH=ppc64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-linux-ppc64le
build-linux-ppc64le:
GOOS=linux GOARCH=ppc64le $(MAKE) build-binaries -j2
GOOS=linux GOARCH=ppc64le CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-linux-amd64
build-linux-amd64:
GOOS=linux GOARCH=amd64 $(MAKE) build-binaries -j2
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-linux-arm64
build-linux-arm64:
GOOS=linux GOARCH=arm64 $(MAKE) build-binaries -j2
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-linux-arm
build-linux-arm:
GOOS=linux GOARCH=arm $(MAKE) build-binaries -j2
GOOS=linux GOARCH=arm CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-darwin-amd64
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 $(MAKE) build-binaries -j2
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-darwin-arm64
build-darwin-arm64:
GOOS=darwin GOARCH=arm64 $(MAKE) build-binaries -j2
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

.PHONY: build-windows-amd64
build-windows-amd64:
GOOS=windows GOARCH=amd64 $(MAKE) build-binaries -j2
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 $(MAKE) build-binaries -j2

# tool-related commands
.PHONY: install-tools
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/download-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ for PLATFORM in "${PLATFORMS[@]}"; do
EXT=""
fi
echo "Building supervisor for $GOOS/$GOARCH"
GOOS="$GOOS" GOARCH="$GOARCH" go build -o $PROJECT_BASE/$DOWNLOAD_DIR/supervisor_bin/opampsupervisor_${GOOS}_${GOARCH}${EXT} .
GOOS="$GOOS" GOARCH="$GOARCH" CGO_ENABLED=0 go build -o $PROJECT_BASE/$DOWNLOAD_DIR/supervisor_bin/opampsupervisor_${GOOS}_${GOARCH}${EXT} .
done
$(cd $PROJECT_BASE/$DOWNLOAD_DIR && rm -rf opentelemetry-collector-contrib)
Loading