andrewkroh / gvm

Go Version Manager (written in Go for cross-platform usability)
Apache License 2.0
195 stars 24 forks source link

Cannot build gvm with go 1.18 #46

Closed mikemadden42 closed 2 years ago

mikemadden42 commented 2 years ago

I cannot build gvm with go 1.18.

$ go version
go version go1.18 darwin/amd64

$ sw_vers
ProductName:    macOS
ProductVersion: 12.3
BuildVersion:   21E230

I get the following errors:

$ go install github.com/andrewkroh/gvm/cmd/gvm@latest
# golang.org/x/sys/unix
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:136:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:151:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:166:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:166:3: too many errors
andrewkroh commented 2 years ago

I updated golang.org/x/sys/unix and now the project builds under Go 1.18.

mikemadden42 commented 2 years ago

Thanks for the update @andrewkroh . The following works fine.

$ go install github.com/andrewkroh/gvm/cmd/gvm@main
go: downloading github.com/andrewkroh/gvm v0.4.1-0.20220316153644-32716574337f
go: downloading golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86

I'm still having issues if I specify latest.

$ go install github.com/andrewkroh/gvm/cmd/gvm@latest
# golang.org/x/sys/unix
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:136:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:151:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:166:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/sys@v0.0.0-20190422165155-953cdadca894/unix/zsyscall_darwin_amd64.go:166:3: too many errors
andrewkroh commented 2 years ago

The latest query, which selects the highest available release version, won't be fixed until there is a new release. I'll probably do that relatively soon. At the moment GH actions are having issues and that's part of the release process.

andrewkroh commented 2 years ago

v0.4.1 is released.