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

Comments

@MostHated
Copy link

@MostHated MostHated commented Apr 13, 2019

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

This comment has been minimized.

Copy link
Author

@MostHated MostHated commented Apr 13, 2019

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

This comment has been minimized.

Copy link
Member

@bcmills 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.

@alexbrainman

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Apr 20, 2019

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

Alex

@alexbrainman

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Apr 27, 2019

@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

This comment has been minimized.

Copy link
Author

@MostHated MostHated commented Apr 27, 2019

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

This comment has been minimized.

Copy link
Contributor

@agnivade 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 May 4, 2019
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
5 participants
You can’t perform that action at this time.