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: vendoredImportPath invalid on windows #11409

Closed
chai2010 opened this issue Jun 26, 2015 · 4 comments
Closed

cmd/go: vendoredImportPath invalid on windows #11409

chai2010 opened this issue Jun 26, 2015 · 4 comments
Milestone

Comments

@chai2010
Copy link
Contributor

go run hello.go
invalid vendoredImportPath: dir="D:\\apps\\go\\gopkg\\src\\mydev\\hello\\a" root="d:\\apps\\go\\gopkg" separator="\\"

// dir="D:\\...", root="d:\\..."

go version
go version devel +3cab476 Sun Jun 21 03:11:01 2015 +0000 windows/amd64

go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=d:\apps\go\gopkg
set GORACE=
set GOROOT=d:\apps\Go\gotip
set GOTOOLDIR=d:\apps\Go\gotip\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
@chai2010
Copy link
Contributor Author

This is patch will fix the issue:
https://go-review.googlesource.com/#/c/11316/

@gopherbot
Copy link

CL https://golang.org/cl/11316 mentions this issue.

@chai2010
Copy link
Contributor Author

go get github.com\chai2010\tiff
cd github.com\chai2010\tiff\testdata\issues
go run issues-10596.go

invalid vendoredImportPath: dir="C:\\go\\gopkg.stable\\src\\github.com\\chai2010\\tiff\\testdata\\issues" root="." separator="\\"

@pragmat1c
Copy link

Leaving this here for anyone else who comes across this issue.

I had to set this in system.env:

GO15VENDOREXPERIMENT=1

Commenting that line and saving system.env however produces this output:

C:/Go/bin/go.exe env [C:\Go]
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=c:\work\code\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GO15VENDOREXPERIMENT=1
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
Command exited with code 0.

Notice that
set GO15VENDOREXPERIMENT=1
is still set.

You have to change the line in system.env:

GO15VENDOREXPERIMENT=0

This fixes the problem for me on Windows 10.

@golang golang locked and limited conversation to collaborators Jun 27, 2017
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