This repository was archived by the owner on Mar 28, 2018. It is now read-only.
This repository was 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
Description
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/".