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: x/crypto: already exists and is not an empty directory. package golang.org/x/crypto: exit status 128 #31453

Closed
MostHated opened this issue Apr 13, 2019 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@MostHated
Copy link

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

$ go version go1.12.4 windows/amd64

Does this issue reproduce with the latest release?

Yes, it does

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\Me\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=U:\_sync\_files\dev\go
set GOPROXY=
set GORACE=
set GOROOT=U:\_sync\data\sdks\go
set GOTMPDIR=
set GOTOOLDIR=U:\_sync\data\sdks\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
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=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Me\AppData\Local\Temp\go-build871387110=/tmp/go-build -gno-record-gcc-switches

What did you do?

I entered go get -u golang.org/x/crypto

What did you expect to see?

I expected to see that it downloaded the crypto package in order for me to use bcrypt. The directory in which it is saying exists, does not exist and I am not sure why it is showing a flat path with no backslashes in the log.

What did you see instead?

# cd .; git clone https://go.googlesource.com/crypto U:\_sync\_files\dev\go\src\golang.org\x\crypto
fatal: destination path 'U:_sync_filesdevgosrcgolang.orgxcrypto' already exists and is not an empty directory.
package golang.org/x/crypto: exit status 128
@gopherbot gopherbot added this to the Unreleased milestone Apr 13, 2019
@MostHated MostHated changed the title x/crypto already exists and is not an empty directory. package golang.org/x/crypto: exit status 128 x/crypto: already exists and is not an empty directory. package golang.org/x/crypto: exit status 128 Apr 13, 2019
@MostHated
Copy link
Author

An update to this. It seems that anytime I try to go get, it downloads a file but ends up being named like this "U_sync_filesdevgosrcgolang.orgxcrypto" with a messed up path and backslashes. I found the following in my \bin for some reason.

@FiloSottile FiloSottile changed the title x/crypto: already exists and is not an empty directory. package golang.org/x/crypto: exit status 128 cmd/go: x/crypto: already exists and is not an empty directory. package golang.org/x/crypto: exit status 128 Apr 15, 2019
@bcmills
Copy link
Contributor

bcmills commented Apr 19, 2019

I wonder whether the leading underscore in the directory name is somehow causing a problem.

CC @alexbrainman for Windows expertise.

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 19, 2019
@alexbrainman
Copy link
Member

I am away from my windows computer for a week. I will try to reproduce this when I am back.

Alex

@alexbrainman
Copy link
Member

@MostHated I cannot reproduce your problem here. I can download the package without any problems.

U:\_sync\_files\dev\go>go version
go version go1.12.4 windows/amd64

U:\_sync\_files\dev\go>go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Alex\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=U:\_sync\_files\dev\go
set GOPROXY=
set GORACE=
set GOROOT=U:\_sync\data\sdks\go
set GOTMPDIR=
set GOTOOLDIR=U:\_sync\data\sdks\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
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=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Alex\AppData\Local\Temp\go-build567668102=/tmp/go-build -gno-record-gcc-switches

U:\_sync\_files\dev\go>go get -u golang.org/x/crypto
package golang.org/x/crypto: no Go files in U:\_sync\_files\dev\go\src\golang.org\x\crypto

U:\_sync\_files\dev\go>dir %GOPATH%\src\golang.org\x\crypto
 Volume in drive U is pub
 Volume Serial Number is D088-0C5C

 Directory of U:\_sync\_files\dev\go\src\golang.org\x\crypto

27/04/2019  06:25 PM    <DIR>          .
27/04/2019  06:25 PM    <DIR>          ..
27/04/2019  06:25 PM    <DIR>          acme
27/04/2019  06:25 PM    <DIR>          argon2
27/04/2019  06:25 PM               174 AUTHORS
27/04/2019  06:25 PM    <DIR>          bcrypt
27/04/2019  06:25 PM    <DIR>          blake2b
27/04/2019  06:25 PM    <DIR>          blake2s
27/04/2019  06:25 PM    <DIR>          blowfish
27/04/2019  06:25 PM    <DIR>          bn256
27/04/2019  06:25 PM    <DIR>          cast5
27/04/2019  06:25 PM    <DIR>          chacha20poly1305
27/04/2019  06:25 PM                21 codereview.cfg
27/04/2019  06:25 PM               913 CONTRIBUTING.md
27/04/2019  06:25 PM               171 CONTRIBUTORS
27/04/2019  06:25 PM    <DIR>          cryptobyte
27/04/2019  06:25 PM    <DIR>          curve25519
27/04/2019  06:25 PM    <DIR>          ed25519
27/04/2019  06:25 PM               146 go.mod
27/04/2019  06:25 PM               784 go.sum
27/04/2019  06:25 PM    <DIR>          hkdf
27/04/2019  06:25 PM    <DIR>          internal
27/04/2019  06:25 PM             1,479 LICENSE
27/04/2019  06:25 PM    <DIR>          md4
27/04/2019  06:25 PM    <DIR>          nacl
27/04/2019  06:25 PM    <DIR>          ocsp
27/04/2019  06:25 PM    <DIR>          openpgp
27/04/2019  06:25 PM    <DIR>          otr
27/04/2019  06:25 PM             1,303 PATENTS
27/04/2019  06:25 PM    <DIR>          pbkdf2
27/04/2019  06:25 PM    <DIR>          pkcs12
27/04/2019  06:25 PM    <DIR>          poly1305
27/04/2019  06:25 PM               787 README.md
27/04/2019  06:25 PM    <DIR>          ripemd160
27/04/2019  06:25 PM    <DIR>          salsa20
27/04/2019  06:25 PM    <DIR>          scrypt
27/04/2019  06:25 PM    <DIR>          sha3
27/04/2019  06:25 PM    <DIR>          ssh
27/04/2019  06:25 PM    <DIR>          tea
27/04/2019  06:25 PM    <DIR>          twofish
27/04/2019  06:25 PM    <DIR>          xtea
27/04/2019  06:25 PM    <DIR>          xts
               9 File(s)          5,778 bytes
              33 Dir(s)  38,758,252,544 bytes free

U:\_sync\_files\dev\go>

The only thing I am uncertain about is your TMP directory. Mine is C:\Users\Alex\AppData\Local\Temp. What is yours?

Alex

@MostHated
Copy link
Author

Hey there,
I do appreciate you getting back to me, I unfortunately have no way to know anymore. I got fed-up with Windows and converted completely to Linux now. On the plus side, everything now works perfectly, lol : D

Thanks,
-MH

@agnivade
Copy link
Contributor

agnivade commented May 4, 2019

I will go ahead and close this one since you are not able to reproduce anymore. Feel free to reopen if you see this again. Thanks.

@agnivade agnivade closed this as completed May 4, 2019
@golang golang locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants