-
Notifications
You must be signed in to change notification settings - Fork 18k
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: Golang not detecting vendor folder #19919
Comments
For questions about Go, see https://golang.org/wiki/Questions. |
Hi @bradfitz I'm not asking a question, this is a bug report. |
Please start with the mailing list. This looks like user error instead of a clear bug report. If you have a problem with glide, please file a bug report against glide. |
#19916 also looks like a question instead of a bug report. |
How do I make it look like a bug report instead of a question? |
The mailing list can help solve your problem and/or help you file a bug report. But in general, we don't have the resources to help debug external tools. |
This is probably the same as #15628 since vendoring has never really worked with gccgo AFAIK. I just posted a CL in that issue to fix the problem when using the go tool built for gccgo (not golang yet). Another suggestion is for you to explicitly add the -I option(s) to your GCCGOFLAGS to identify the vendor paths of the missing packages. |
when has multi GOPATH, It can`t detect the vendor folder.
|
Hi @ajmichaels ,
Note "misc". |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.1 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/aaronmichaels/Developer/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hm/nb7xhr9961v06dsc9jsm95m80000gn/T/go-build516539570=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
I used the glide tool (
https://github.com/Masterminds/glide
) to install a dependency (github.com/appliedgo/perceptron/draw
) at/Users/aaronmichaels/Developer/go/src/github.com/ajmichaels/misc/appliedgo/perceptron.
Under this directory, I have a glide.yaml file, a glide.lock file, a main.go file, and a vendor/ folder. Within the main.go file, I have
"github.com/appliedgo/perceptron/draw"
imported. However, when I try to go build my main.go file, I get this error:main.go:8:2: cannot find package "github.com/appliedgo/perceptron/draw" in any of:
/usr/local/Cellar/go/1.8.1/libexec/src/github.com/appliedgo/perceptron/draw (from $GOROOT)
/Users/aaronmichaels/Developer/go/src/github.com/appliedgo/perceptron/draw (from $GOPATH)
My gopath is
/Users/aaronmichaels/Developer/go
, so the error is not related to not being within my gopath. Also, projects with dependencies installed viago get
work fine.What did you expect to see?
From what I've seen online, the go build command should have run with no errors.
What did you see instead?
The text was updated successfully, but these errors were encountered: