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

[go] mingw-w64-x86_64-go bad GOPATH default #8437

Open
nerdralph opened this issue Apr 20, 2021 · 6 comments
Open

[go] mingw-w64-x86_64-go bad GOPATH default #8437

nerdralph opened this issue Apr 20, 2021 · 6 comments
Labels

Comments

@nerdralph
Copy link

# go version
go: cannot find GOROOT directory: D:\a\_temp\msys\msys64\mingw64\lib\go

work around:
export GOROOT=/mingw64/lib/go

@lazka
Copy link
Member

lazka commented Apr 21, 2021

I can't reproduce. Do you have a "D:" drive by any chance? maybe that triggers it.

@naveen521kk
Copy link
Member

See #7844 and #421

@nerdralph
Copy link
Author

I can't reproduce. Do you have a "D:" drive by any chance? maybe that triggers it.

Yes, though @naveen521kk comments indicate this has been a long-running issue.

@1480c1
Copy link
Contributor

1480c1 commented Mar 2, 2023

I can still reproduce this when not loading any profiles (aka from not bash)

PS C:\Users\cddeg> C:\msys64\ucrt64\bin\go.exe install -v golang.org/x/tools/cmd/goimports@latest
go: cannot find GOROOT directory: D:\a\msys64\ucrt64\lib\go

@1480c1
Copy link
Contributor

1480c1 commented Mar 2, 2023

Perhaps the three issues should be consolidated? It seems to stem primarily from the fact that the GOROOT's default value is hardcoded at buildtime rather than run-time, perhaps something similar to pkg-config's relocation could be done

@Biswa96 Biswa96 added the bug label Mar 3, 2023
@RivenSkaye
Copy link

I see someone else mentioned 421 and 7844 already, should two of them be closed as a duplicate similar to #665?
As I commented on 421 when I stumbled across it, the issue persists still even from a loaded profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants