Open devinrsmith opened 5 years ago
I changed GOARCH
in the build.sh script:
diff --git a/hack/lib/build.sh b/hack/lib/build.sh
index 9b2e314..69faafe 100644
--- a/hack/lib/build.sh
+++ b/hack/lib/build.sh
@@ -2,5 +2,5 @@ function go_build {
echo "building "${1}"..."
# We’re disabling cgo which gives us a static binary.
# This is needed for building minimal container based on alpine image.
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $GO_BUILD_FLAGS -o ${bin_dir}/etcd-${1} -installsuffix cgo -ldflags "$go_ldflags" ./cmd/${1}/
+ GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go build $GO_BUILD_FLAGS -o ${bin_dir}/etcd-${1} -installsuffix cgo -ldflags "$go_ldflags" ./cmd/${1}/
then tried to build but got the following error:
# ./hack/build/operator/build
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+ source hack/lib/build.sh
+ which go
++ git rev-parse --short HEAD
+ GIT_SHA=8347d27
++ pwd
+ bin_dir=/root/go/src/github.com/coreos/etcd-operator/_output/bin
+ mkdir -p /root/go/src/github.com/coreos/etcd-operator/_output/bin
+ gitHash=github.com/coreos/etcd-operator/version.GitSHA=8347d27
+ go_ldflags='-X github.com/coreos/etcd-operator/version.GitSHA=8347d27'
+ GO_BUILD_FLAGS=
+ go_build operator
+ echo 'building operator...'
building operator...
+ GOOS=linux
+ GOARCH=arm
+ GOARM=7
+ CGO_ENABLED=0
+ go build -o /root/go/src/github.com/coreos/etcd-operator/_output/bin/etcd-operator -installsuffix cgo -ldflags '-X github.com/coreos/etcd-operator/version.GitSHA=8347d27' ./cmd/operator/
# github.com/coreos/etcd-operator/pkg/cluster
pkg/cluster/cluster.go:497:17: constant 9223372036854775807 overflows int
It seems like the etcd-operator image is not compatible with arm. Any plans for arm support?