Open athirn opened 8 years ago
I have some more information. for some reason the file /usr/local/go//src/net/http/h2_bundle.go has an include for golang_org/x/net/http2/hpack
. Not sure why is golang_org rather golang.org.
I believe it has something to do with this bug https://github.com/golang/go/issues/16333.
Still don't understand why building the code normally works but it fails with godebug
OK, I found where the golang_org directory is. It's vendor in go 1.7 (/usr/local/go/src/vendor/golang_org/).
So the issues is that when I use godebug, it's not supporting the vendoring directory. If you look at the top of the original error, you can see its checking 3 directories for the golang_org/x/route package. But the list does not contain the vendor subdir
@athirn sorry I still don't know how to fix this My problem is the same as yours. Could you show me how you fix this?
@athirn thank you. I found a way to fix this. cp -R golang_org $GOPATH/src
Thanks go2run for the above comment For those who are new to this like me, cp -R copies all files in golang_or.
what I did was
cd $GOPATH/src
then
cp -R /usr/local/go/src/vendor/golang_org .
I just symlinked em for now
ln -s golang.org golang_org
so does there any way to fix this issue without do like @jennylia or @jsonperl does?
For those of us on Windows the golang_org
folder can be found at C:\Go\src\vendor
I symlinked and I still get errors like usr/local/Cellar/go/1.8/libexec/src/crypto/tls/key_agreement.go:20:2: could not import golang_org/x/crypto/curve25519 (cannot find package "golang_org/x/crypto/curve25519" in any of: /usr/local/Cellar/go/1.8/libexec/src/golang_org/x/crypto/curve25519 (from $GOROOT)
whenever I import
net/http
, I get all sorts of errors when I try and rungodebug
. The same code works fine when I build and run it with go directly.Here is a simple example app and the output of go debug....