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

Cross compile linux on Windows gives Access Denied #39047

Closed
ddhawal opened this issue May 13, 2020 · 2 comments
Closed

Cross compile linux on Windows gives Access Denied #39047

ddhawal opened this issue May 13, 2020 · 2 comments

Comments

@ddhawal
Copy link

@ddhawal ddhawal commented May 13, 2020

What version of Go are you using (go version)?

$ go version
go version go1.12.9 windows/amd64

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ddhawal\AppData\Local\go-build
set GOEXE=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=linux
set GOPATH=c:\checkout\gitlab
set GOPROXY=direct
set GORACE=
set GOROOT=c:\go
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\checkout\internal\go.mod
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
set GOGCCFLAGS=-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=C:\Users\dd\AppData\Local\Temp\go-build526978046=/tmp/go-build -gno-record-gcc-switches

What did you do?

go build ./...

This is working fine when I change GOOS=windows

What did you expect to see?

Successful compilation

What did you see instead?

build github.com/dd/v3/cmd/hvs: cannot load golang.org/x/sys/unix: rename c:\checkout\gitlab\pkg\mod\golang.org\x\sys@v0.0.0-20190412213103-97732733099d.tmp-837266893 c:\checkout\gitlab\pkg\mod\golang.org\x\sys@v0.0.0-20190412213103-97732733099d: Access is denied.

@networkimprov
Copy link

@networkimprov networkimprov commented May 14, 2020

Dup of #36568?

@bcmills
Copy link
Member

@bcmills bcmills commented May 14, 2020

Duplicate of #36568

@bcmills bcmills marked this as a duplicate of #36568 May 14, 2020
@bcmills bcmills closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.