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

make build fails #360

Closed
tkashem opened this issue May 30, 2018 · 6 comments
Closed

make build fails #360

tkashem opened this issue May 30, 2018 · 6 comments

Comments

@tkashem
Copy link
Collaborator

tkashem commented May 30, 2018

make build command fails with an error
Steps to reproduce

  1. get latest from master branch
  2. make build

I am seeing the following error -

operator-framework/operator-lifecycle-manager (master) $ make build
if [ 1 = 1true ]; then \
	GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -o bin/alm -c -covermode=count -coverpkg ./pkg/... github.com/operator-framework/operator-lifecycle-manager/cmd/alm; \
else \
	GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/alm github.com/operator-framework/operator-lifecycle-manager/cmd/alm; \
fi
vendor/github.com/emicklei/go-restful/container.go:17:2: cannot find package "github.com/emicklei/go-restful/log" in any of:
	/{$GOPATH}/src/github.com/operator-framework/operator-lifecycle-manager/vendor/github.com/emicklei/go-restful/log (vendor tree)
	/usr/lib/golang/src/github.com/emicklei/go-restful/log (from $GOROOT)
	/{$GOPATH}/src/github.com/emicklei/go-restful/log (from $GOPATH)
make: *** [Makefile:40: bin/alm] Error 1

The sub package 'github.com/emicklei/go-restful/log' is missing from the vendor tree.
make vendor should fix it, but I am running into another issue - dep ensure -v -vendor-only seems to hang indefinitely on my local workstation.

@ecordell
Copy link
Member

Is operator-framework/operator-lifecycle-manager in your gopath? The dependency is checked into the repo so you shouldn't see different dependencies.

Check to see if this exists:
/{$GOPATH}/src/github.com/operator-framework/operator-lifecycle-manager/vendor/github.com/emicklei/go-restful/log

You also just double check that you checked out olm into /{$GOPATH}/src/github.com/operator-framework/operator-lifecycle-manager/

@tkashem
Copy link
Collaborator Author

tkashem commented May 30, 2018

Yes, operator-framework/operator-lifecycle-manager is in my GOPATH.
I have double checked - olm is checked out into the right path.

Looks like log sub-package is missing here - https://github.com/operator-framework/operator-lifecycle-manager/tree/master/vendor/github.com/emicklei/go-restful

Thanks for getting back to me.

@ecordell
Copy link
Member

Thanks for double checking! The log package does seem to be missing from vendor - sorry about that. I'll look into it and see if we can get it back into the repo.

As you said, dep ensure should add it even if it is missing from the repo.

@fiftoine
Copy link

Even with vendor directory commited, dep hangs on trying to fetch content from the private repo coreos-inc. And so, emicklei/go-restfulcan't be pulled...

A workaround (a ugly one) is to

  • cut/paste vendor/github.com/coreos-inc directory
  • comment references to coreos-inc in Gopkg.toml and Gopkg.lock
  • run make vendor
  • move the pasted folder back into the vendor/github.com
  • restore the references to coreos-inc in Gopkg files.

Then you have all the necessary dependencies.

@ecordell
Copy link
Member

Thanks for the writeup @fiftoine. I'm sorry that this is a pain right now, we'll remove the private dependency ASAP.

@ecordell
Copy link
Member

@fiftoine @tkashem the private dependency has been removed, please open a new issue if there are still issues with the build

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

3 participants