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

Install fails with go 1.18 on darwin-amd64 #596

Closed
eatonphil opened this issue Mar 16, 2022 · 8 comments · Fixed by #608
Closed

Install fails with go 1.18 on darwin-amd64 #596

eatonphil opened this issue Mar 16, 2022 · 8 comments · Fixed by #608

Comments

@eatonphil
Copy link

I believe you have an indirect dependency on an old version of x/sys that breaks when running go install with go 1.18. Noticed here.

sudo curl -LO https://go.dev/dl/go1.18.darwin-amd64.tar.gz

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/node@16/bin:$PATH"' >> /Users/runner/.bash_profile
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    74  100    74    0     0    433      0 --:--:-- --:--:-- --:--:--   445

 14  137M   14 19.2M    0     0  51.8M      0  0:00:02 --:--:--  0:00:02 51.8M
 86  137M   86  118M    0     0  86.7M      0  0:00:01  0:00:01 --:--:-- 99.7M
100  137M  100  137M    0     0  89.9M      0  0:00:01  0:00:01 --:--:--  102M
+ sudo rm -rf /usr/local/go
+ sudo tar -C /usr/local -xzf go1.18.darwin-amd64.tar.gz
+ sudo mv /usr/local/go/bin/go /usr/local/bin/go
+ sudo mv /usr/local/go/bin/gofmt /usr/local/bin/gofmt
+ go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go: downloading github.com/google/go-jsonnet v0.18.0
go: downloading github.com/fatih/color v1.10.0
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading gopkg.in/yaml.v2 v2.2.7
go: downloading golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae
# golang.org/x/sys/unix
../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20200223170610-d5e6a3e2c0ae/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20200223170610-d5e6a3e2c0ae/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20200223170610-d5e6a3e2c0ae/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/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-20200223170610-d5e6a3e2c0ae/unix/zsyscall_darwin_amd64.go:121:3: too many errors
@eatonphil eatonphil changed the title Install fails with go 1.18 Install fails with go 1.18 on darwin-amd64 Mar 16, 2022
@apptut
Copy link

apptut commented Mar 18, 2022

error +1

@soulteary
Copy link

@apptut @eatonphil try:

go get -u golang.org/x/sys

rel: golang/go#49219

abetomo added a commit to abetomo/dump_to_jsonl that referenced this issue Mar 21, 2022
felder added a commit to felder/go-jsonnet that referenced this issue Mar 30, 2022
andygrunwald added a commit to andygrunwald/go-jira that referenced this issue Apr 9, 2022
* GitHub Actions: Upgrade staticcheck action version to v1.2.0

* GitHub Actions: Fix go-version of setup-go

* Set version golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f

See google/go-jsonnet#596
and felder/go-jsonnet@7949745
@chandrareddyp
Copy link

i am using - go version go1.18.1 darwin/amd64, i did try go get -u golang.org/x/sys , still my build is failing with error - /go/pkg/mod/golang.org/x/sys@v0.0.0-20201112073958-5cba982894dd/unix/syscall_darwin.1_13.go:29:3: //go:linkname must refer to declared function or variable

@douglascamata
Copy link

Will this ever be fixed? The project isn't buildable with Go 1.18, which makes any automation on building & installing the binary break.

Also, what kind of workaround can be do to fix the binary build/install process in scripts?

@qizheng09
Copy link

Will this ever be fixed?

2 similar comments
@sincebyte
Copy link

Will this ever be fixed?

@ernesto-pm
Copy link

Will this ever be fixed?

@anzdaddy
Copy link

anzdaddy commented Sep 5, 2022

This broke again for 1.19. go get golang.org/x/sys@latest fixed it for me.

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

Successfully merging a pull request may close this issue.

9 participants