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

update go 1.18 - no goversion found #57

Open
Pretexts opened this issue Mar 21, 2022 · 9 comments
Open

update go 1.18 - no goversion found #57

Pretexts opened this issue Mar 21, 2022 · 9 comments

Comments

@Pretexts
Copy link

2022/03/21 14:58:13 Error when extracting compiler information: no goversion found

@shrinidhi111
Copy link

Same error encountered in GitHub Actions.

I had to downgrade to go 1.17.x for it to work

@josephspurrier
Copy link
Owner

Interesting - I see the error message on only a few other projects. Can you provide more details on how to reproduce please?

@josephspurrier
Copy link
Owner

@brushknight Ah, it may be related to this change in the Go language: https://go.dev/doc/go-get-install-deprecation. Can you change this line to go install? https://github.com/newrelic/infrastructure-agent/blob/master/build/windows/build.ps1#L41

@KempWatson
Copy link

Same issue here, on Go 1.19.2:
exec: "goversioninfo": executable file not found in $PATH

@josephspurrier
Copy link
Owner

Same issue here, on Go 1.19.2: exec: "goversioninfo": executable file not found in $PATH

Can you try the fix in: #57 (comment)?

@KempWatson
Copy link

That worked for Windows, but not for cross-compilation...so looks like it's just the instruction page perhaps that needs updating for Windows. Cross-compilation, at least on an M1 Mac, can't find the goversioninfo executable it seems.

@josephspurrier
Copy link
Owner

That worked for Windows, but not for cross-compilation...so looks like it's just the instruction page perhaps that needs updating for Windows. Cross-compilation, at least on an M1 Mac, can't find the goversioninfo executable it seems.

Are you able to post examples? Cross-compilation has its own challenges (different PATH variables, different Go versions, etc.) so I want to make sure it doesn't confuse the initial problem that Go changed how it works in newer versions which is not a bug with goversioninfo.

@shenke-adsk
Copy link

To add to the discussion, we recently encountered the same problem in our project which uses cross-compile to build a Windows binary on Linux. goversioninfo was not found in PATH for Go version 1.18 and up. We finally fixed it with go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest command. This is what we are doing:

fhcat@ECS-053990d6:~/garasign/repos/garasign$ go_img='docker.io/golang:1.19.3-buster'
fhcat@ECS-053990d6:~/garasign/repos/garasign$ docker run -v $HOME/garasign/repos/garasign2:/garasign -t ${go_img} /bin/bash -c 'cd /garasign; go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest; which goversioninfo'
go: downloading github.com/josephspurrier/goversioninfo v1.4.0
go: downloading github.com/akavel/rsrc v0.10.2
/go/bin/goversioninfo

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

No branches or pull requests

6 participants