Skip to content

goinstall fails with Access denied error #1270

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

Closed
the42 opened this issue Nov 14, 2010 · 6 comments
Closed

goinstall fails with Access denied error #1270

the42 opened this issue Nov 14, 2010 · 6 comments

Comments

@the42
Copy link

the42 commented Nov 14, 2010

What steps will reproduce the problem?
1. A Windows box (here Windows XP)
2. goinstall "go-idn.googlecode.com/hg/src/idna"

What is the expected output?
installation and build of go-idn.googlecode.com/hg/src/idna

What do you see instead?
C:\>goinstall -v "go-idn.googlecode.com/hg/src/idna"
go-idn.googlecode.com/hg/src/idna
goinstall: /; C:\Programme\Mercurial\\hg.exe "clone"
"https://go-idn.googlecode.
com/hg" "C:\Programme\go/src/pkg/go-idn.googlecode.com/hg"
goinstall: go-idn.googlecode.com/hg/src/idna: wait: Zugriff verweigert

(Which means "access denied")

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?
Windows  XP

Which revision are you using?  (hg identify)
8g version 6745 release.2010-11-10 release

Please provide any additional information below.
@alexbrainman
Copy link
Member

Comment 1:

I can't reproduce your problem on my computer. My source is at:
changeset:   6764:03404c0155f6                
tag:         tip                              
user:        Robert Griesemer <[email protected]>
date:        Fri Nov 12 16:39:33 2010 -0800   
summary:     token/position: implemented Pos  
Perhaps goinstall can't overwrite some files it is trying to install, because they are
in use by another program or read only or something. I suggest, you could just put
couple of fmt.Printf() statements to see which file / dir is at fault, or, perhaps,
there is a bug we need to fix. Goinstall is not a big program, so it shouldn't be hard
at all. Thank you.
Alex

Labels changed: added os-windows.

Owner changed to @alexbrainman.

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor

Comment 2 by theseeker:

I've also had no luck with goinstall. (past execution of git)
I wonder if this could be be related to issues I have with godag and gobuild.  even
though 8g is executed properly, runs fine given the command lines passed, and exits with
code 0, those build tools implode with 'access denied' (exit with code 1) before running
8l if I do not run from within a cygwin sh environment.
I'm guessing this must have to do with use of linux-specific os features (pipes?), since
ProcMon[1] doesn't show any attempted file activity failing at the time of program
termination.
Alex, are you using a VM, Cygwin, msys, unix services for windows, or some other interop
software that you'd like to share about for reliably working with go on windows?  Is
there a tutorial for proper environment setup that I missed somewhere?
[1] http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

@alexbrainman
Copy link
Member

Comment 3:

goinstall is not working, as far as I'm concerned, on Windows yet - it needs some bits
of unix environment outside of Go (make and others), I don't think we can expect all
Windows developer to have those.
On the other hand, if you're prepared to install some unix utils (I use mingw + msys)
you should be able to make goinstall work one way or the other. For example, I run:
goinstall -v "go-idn.googlecode.com/hg/src/idna"
at msys prompt, and it managed to download the package, but failed to execute gomake.
Sure enough current gomake doesn't have .exe or .bat extension (see windows version of
exec.LookPath() for details), so I have created new file $GOROOT/bin/gomake.bat with
this inside:
c:\msys\1.0\bin\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
as being suggested by someone earlier (I don't remember who, probably Wei). Now if I run
goinstall, it will run to successful completion.
On the other hand, if I run goinstall right from windows prompt, it downloads the
package, starts building and fails with
/bin/sh: uname: command not found
/bin/sh: tr: command not found
/bin/sh: sed: command not found
/bin/sh: uname: command not found
/bin/sh: sed: command not found
and others, which could, probably, be solved by setting my PATH right. That's where
things are with goinstall.
On the other hand, I don't see any "access denied" messages, so, perhaps, there is
something else wrong in there, but I can't reproduce it.
Answering your last question: I use linux/386 (real PC, not VM) to develop: I build
linux/386 version of all tools and packages, then build windows/386 version of packages,
then I can just build linux or windows version of my program. Of course I need Windows
to run it. Rarely I use mingw + msys on Windows just to make sure that all Go code still
builds there. I find native linux environment much faster (then mingw + msys), also it
comes with everything I can think of, not just bare minimum.
Alex

@alexbrainman
Copy link
Member

Comment 4:

Can you, please, check if this change (http://golang.org/cl/3299041/) fixes
your problem. Thank you.
Alex

Labels changed: added packagebug.

Status changed to Accepted.

@alexbrainman
Copy link
Member

Comment 5:

Issue #1296 has been merged into this issue.

@alexbrainman
Copy link
Member

Comment 6:

This issue was closed by revision 1e28764.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

3 participants