Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Make build fail with clear error message if not run from $GOPATH #1029

Open
jodh-intel opened this issue Jul 4, 2017 · 0 comments
Open

Make build fail with clear error message if not run from $GOPATH #1029

jodh-intel opened this issue Jul 4, 2017 · 0 comments
Labels

Comments

@jodh-intel
Copy link
Contributor

If the user runs make from a directory outside their $GOPATH, they get a very confusing error message:

$ make
proxy/vm.go:25:2: cannot find package "github.com/containers/virtcontainers/hyperstart" in any of:
        /usr/local/go/src/github.com/containers/virtcontainers/hyperstart (from $GOROOT)
        /home/james/go/src/github.com/containers/virtcontainers/hyperstart (from $GOPATH)
Makefile:5300: recipe for target 'cc-proxy' failed
make[1]: *** [cc-proxy] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/james/git/cc-oci-runtime'
Makefile:1686: recipe for target 'all' failed
make: *** [all] Error 2

We should find a way to make the build (and maybe even the configure stage) fail with a sane message along the lines of:

ERROR: You are attempting to build outside of $GOPATH.
ERROR: The build should be run from "$GOPATH/src/github.com/01org/cc-oci-runtime/".
@egernst egernst added the CC 2.1 label Jul 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants