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

Error during building binary for Openshift Origin #7802

Closed
enlinxu opened this issue Mar 4, 2016 · 2 comments
Closed

Error during building binary for Openshift Origin #7802

enlinxu opened this issue Mar 4, 2016 · 2 comments

Comments

@enlinxu
Copy link

enlinxu commented Mar 4, 2016

I cloned the repository from github and followed the instruction. I was able to build once and start openshift origin in my ubuntu vm. But then it stopped building again for me. I started to get the following errors every time I try to do make clean build.

root@ubuntu:/home/enlin/vmturbo/goProtoBuff/src/github.com/openshift/origin# make clean build
rm -rf _output Godeps/_workspace/pkg
hack/build-go.sh
++ Building go targets for linux/amd64: cmd/openshift cmd/oc

github.com/openshift/origin/pkg/router/controller/factory

pkg/router/controller/factory/factory.go:116: undefined: wait.Until
pkg/router/controller/factory/factory.go:123: undefined: wait.NeverStop
pkg/router/controller/factory/factory.go:124: undefined: wait.Until
pkg/router/controller/factory/factory.go:131: undefined: wait.NeverStop

github.com/openshift/origin/pkg/image/registry/imagestreammapping

pkg/image/registry/imagestreammapping/rest.go:105: undefined: wait.ExponentialBackoff
pkg/image/registry/imagestreammapping/rest.go:105: undefined: wait.Backoff

github.com/openshift/origin/pkg/project/auth

pkg/project/auth/cache.go:172: undefined: wait.Forever

github.com/openshift/origin/pkg/security/controller

pkg/security/controller/repair.go:45: undefined: wait.Until
!!! Error in hack/../hack/common.sh:206
'go install "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${nonstatics[@]}"' exited with status 2
Call stack:
1: hack/../hack/common.sh:206 os::build::build_binaries(...)
2: hack/build-go.sh:31 main(...)
Exiting with status 1
!!! Error in hack/../hack/common.sh:167
'( os::build::setup_env; local version_ldflags; version_ldflags=$(os::build::ldflags); local goflags; eval "goflags=(${OS_GOFLAGS:-})"; local arg; for arg in "$@";
do
if [[ "${arg}" == -* ]]; then
goflags+=("${arg}");
fi;
done; os::build::export_targets "$@"; local -a nonstatics=(); local -a tests=(); for binary in "${binaries[@]}";
do
if [[ "${binary}" =~ ".test"$ ]]; then
tests+=($binary);
else
nonstatics+=($binary);
fi;
done; local platform; for platform in "${platforms[@]}";
do
os::build::set_platform_envs "${platform}"; echo "++ Building go targets for ${platform}:" "${targets[@]}"; if [[ ${#nonstatics[@]} -gt 0 ]]; then
go install "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${nonstatics[@]}";
fi; for test in "${tests[@]:+${tests[@]}}";
do
mkdir -p "${GOBIN}/${platform}"; local outfile="${GOBIN}/${platform}/$(basename ${test})"; go test -c -o "${outfile}" "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "$(dirname ${test})";
done; os::build::unset_platform_envs "${platform}";
done )' exited with status 1
Call stack:
1: hack/../hack/common.sh:167 os::build::build_binaries(...)
2: hack/build-go.sh:31 main(...)
Exiting with status 1
make: *** [build] Error 1

Any help is appreciated.

@liggitt
Copy link
Contributor

liggitt commented Mar 4, 2016

You might be hitting http://lists.openshift.redhat.com/openshift-archives/dev/2016-February/msg00084.html:

golang/go#10509 was a bug in Go 1.4 - if you are building OpenShift, run a checkout to another branch, and then get package errors, you're getting this.

You can upgrade to Go 1.5 (and thus get slow builds) or stay on 1.4 and remember to clean $GOPATH/pkg when changing branches.

@enlinxu
Copy link
Author

enlinxu commented Mar 4, 2016

@liggitt Thanks a lot, I updated to 1.6 and it also solved the issue. Closing now.

@enlinxu enlinxu closed this as completed Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants