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: main package in GoPath/src/ runs "go install" fail. #22863
Labels
Comments
vipally
changed the title
cmd/go: "go install" of main package in GoPath/src doesn't work.
cmd/go: main package in GoPath/src/ runs "go install" fail.
Nov 24, 2017
Try removing the semicolon at the end of your %GOPATH% (mostly a guess)
… On 24 Nov 2017, at 13:40, Ally Dale ***@***.***> wrote:
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
Go1.9
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\gocode;
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\dai
zejun\AppData\Local\Temp\go-build824272051=/tmp/go-build -gno-record-gcc-switche
s
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
What did you do?
Create a hello world main package in GoPath/src.And run "go install"
package main
func main(){
println("hello world!")
}
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
"go install" runs well, and install in GoPath/bin.
What did you see instead?
go install: no install location for directory E:\gocode\src outside GOPATH
For more details see: 'go help gopath'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
For |
vipally
added a commit
to vipally/go
that referenced
this issue
Nov 24, 2017
I have made a patch to fix this case: |
vipally
added a commit
to vipally/go
that referenced
this issue
Nov 24, 2017
fix issue golang#22863: cmd/go: main package in GoPath/src/ runs "go install" fail.
This is working as intended. Its name can't be inferred if it's at the root of $GOPATH/src. It needs a directory under that to get a name. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Go1.9
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\gocode
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\dai
zejun\AppData\Local\Temp\go-build824272051=/tmp/go-build -gno-record-gcc-switche
s
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
What did you do?
Create a hello world main package in GoPath/src.And run "go install"
package main
func main(){
println("hello world!")
}
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
"go install" runs well, and install in GoPath/bin.
What did you see instead?
go install: no install location for directory E:\gocode\src outside GOPATH
For more details see: 'go help gopath'
The text was updated successfully, but these errors were encountered: