-
Notifications
You must be signed in to change notification settings - Fork 93
failed to finish build-cross.sh on mac pro (yosemite) #386
Description
the issue seems to be "but available 0G < threshold 11G" and "/usr/src/go/pkg/tool/linux_amd64/6l: running gcc failed: Cannot allocate memory". this is with the code i checked out just last night
sudo ./build/run.sh hack/build-cross.sh
Password:
+++ [0229 21:52:03] Verifying Prerequisites....
+++ [0229 21:52:03] No docker host is set. Checking options for setting one...
+++ [0229 21:52:03] docker-machine was found.
Machine "kube-dev" is already running.
./build/../build/common.sh: line 211: DOCKER_MACHINE_NAME: readonly variable
+++ [0229 21:52:03] A Docker host using docker-machine named 'kube-dev' is ready to go!
+++ [0229 21:52:07] Building Docker image kube-build:build-05b5ba7299.
+++ [0229 21:52:14] Running build command....
+++ [0301 05:52:15] Multiple platforms requested, but available 0G < threshold 11G, building platforms in serial
+++ [0301 05:52:15] Building go targets for linux/amd64:
cmd/kube-proxy
cmd/kube-apiserver
cmd/kube-controller-manager
cmd/kubelet
cmd/kubemark
cmd/hyperkube
cmd/linkcheck
plugin/cmd/kube-scheduler
k8s.io/kubernetes/cmd/hyperkube
/usr/src/go/pkg/tool/linux_amd64/6l: running gcc failed: Cannot allocate memory
!!! Error in /go/src/k8s.io/kubernetes/hack/lib/golang.sh:433
'go install "${goflags[@]:+${goflags[@]}}" -ldflags "${goldflags}" "${nonstatics[@]:+${nonstatics[@]}}"' exited with status 2
Call stack:
1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:433 kube::golang::build_binaries_for_platform(...)
2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:575 kube::golang::build_binaries(...)
3: hack/build-cross.sh:28 main(...)
Exiting with status 1
!!! Error in /go/src/k8s.io/kubernetes/hack/lib/golang.sh:496
'( kube::golang::setup_env; local host_platform; host_platform=$(kube::golang::host_platform); local goflags goldflags; eval "goflags=(${KUBE_GOFLAGS:-})"; goldflags="${KUBE_GOLDFLAGS:-}
do
if [[ "${arg}" == "--use_go_build" ]]; then
use_go_build=true;
else
if [[ "${arg}" == -* ]]; then
goflags+=("${arg}");
else
targets+=("${arg}");
fi;
fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}"); if [[ ${#platforms[@]} -eq 0 ]]; then
platforms=("${host_platform}");
fi; local binaries; binaries=(
local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -ge ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
kube::log::status "Multiple platforms requested and available ${gigs}G >= threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
else
kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
fi;
fi; if [[ "${parallel}" == "true" ]]; then
kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
do
( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform////}.build" &
done; local fails=0; for job in $(jobs -p);
do
wait ${job} || let "fails+=1";
done; for platform in "${platforms[@]}";
do
cat "/tmp//${platform////}.build";
done; exit ${fails};
else
for platform in "${platforms[@]}";
do
kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
done;
fi )' exited with status 1
Call stack:
1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:496 kube::golang::build_binaries(...)
2: hack/build-cross.sh:28 main(...)
Exiting with status 1
!!! Error in ./build/../build/common.sh:567
'"${docker_cmd[@]}" "$@"' exited with status 1
Call stack:
1: ./build/../build/common.sh:567 kube::build::run_build_command(...)
2: ./build/run.sh:30 main(...)
Exiting with status 1
bash-3.2$