-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/go/analysis, syscall: ptrace redeclared in this block #44459
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
Comments
I'm able to create a reproducible example without the IDE. with go1.16: $ go run .
-----------------
exit status 1
-----------------
/home/ldez/.gvm/gos/go1.16/src/syscall/zsyscall_linux_amd64.go:178:6: ptrace redeclared in this block
/home/ldez/.gvm/gos/go1.16/src/syscall/ptrace_ios.go:10:6: other declaration of ptrace
--- FAIL: TestBug (0.78s)
analysistest.go:294: error analyzing ptrace-bug@a: analysis skipped due to errors in package
FAIL
FAIL github.com/golangci/sandbox 0.784s
FAIL with go1.15: go run .
-----------------
<nil>
-----------------
ok github.com/golangci/sandbox 0.436s |
Change https://golang.org/cl/294634 mentions this issue: |
@gopherbot Please open backport to 1.16. The 1.16 release can't be analyzed by tools built with earlier versions of Go, because those earlier releases don't recognize that "ios" is now a valid GOOS value. The fix is to use an explicit build tag. We should backport that fix to the 1.16 release branch. |
Backport issue(s) opened: #44462 (for 1.16). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/294635 mentions this issue: |
This permits analysis of the syscall package by tools built with older versions of Go that do not recognize ios as a GOOS. For #44459 Fixes #44462 Change-Id: I79cec2ffe0dbcbc2dc45a385e556dc9e62033125 Reviewed-on: https://go-review.googlesource.com/c/go/+/294634 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Go Bot <gobot@golang.org> (cherry picked from commit 03d36d8) Reviewed-on: https://go-review.googlesource.com/c/go/+/294635 Reviewed-by: Cherry Zhang <cherryyz@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Currently, I'm only able to reproduce inside my IDE (goland).
I'm still trying to reproduce outside of goland.
I'm thinking that the build tag is missing in
syscall/ptrace_ios.go
I created a minimal reproducible (inside goland) project:
foo_test.go:
a.go:
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: