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

cmd/go: say 'path outside GOPATH' #3500

Closed
bradfitz opened this issue Apr 8, 2012 · 7 comments
Closed

cmd/go: say 'path outside GOPATH' #3500

bradfitz opened this issue Apr 8, 2012 · 7 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Apr 8, 2012

go build has a useful error message.
go install has a very confusing error message.

parallels@ubuntu:/media/psf/Home/src/camlistore.org/third_party/github.com/mattn/go-sqlite3$
go build
# pkg-config --cflags sqlite3
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sqlite3' found
exit status 1

parallels@ubuntu:/media/psf/Home/src/camlistore.org/third_party/github.com/mattn/go-sqlite3$
go install
go install: no install location for
_/media/psf/Home/src/camlistore.org/third_party/github.com/mattn/go-sqlite3
@rsc
Copy link
Contributor

rsc commented Apr 9, 2012

Comment 1:

These are two different errors.
go build tries to build the package and runs into a pkg-config problem.
go install tries to figure out where to install the package (you must
be outside $GOPATH) and explains that it doesn't know, if it were to
build it, where to put the result.  If you'd been in a $GOPATH then
presumably go install would proceed, try to build it, and hit the
pkg-config problem.
The 'go install' error could be made to say 'code outside GOPATH' or
something like that.

@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 9, 2012

Comment 2:

Oh, indeed, my GOPATH had an errant "/src" at the end.

@ianlancetaylor
Copy link
Contributor

Comment 3:

Labels changed: added priority-later, removed priority-triage.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 5:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 6:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 7:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 8:

This issue was closed by revision 8b6534b.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants