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

cmd/go: Duplicate symbols with more than one main package in -coverpkg [1.13 backport] #34223

Closed
gopherbot opened this issue Sep 10, 2019 · 7 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@FiloSottile requested issue #34114 to be considered for backport to the next 1.13 minor release.

@gopherbot please open a backport issue for Go 1.13, this looks like a possible regression without a workaround.

/cc @bcmills @jayconrod

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Sep 10, 2019
@gopherbot gopherbot added this to the Go1.13.1 milestone Sep 10, 2019
@jayconrod
Copy link
Contributor

This issue has a similar root cause to #30907, but this affects GOPATH builds. The fix for #30907 (cherry-picked to 1.12) was too narrow and didn't cover GOPATH builds. There is no simple workaround, and the fix is low risk.

@gopherbot
Copy link
Author

Change https://golang.org/cl/195281 mentions this issue: [release-branch.go1.13] cmd/go: fix link error for -coverpkg in GOPATH mode

@FiloSottile FiloSottile added the CherryPickApproved Used during the release process for point releases label Sep 13, 2019
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Sep 13, 2019
@FiloSottile
Copy link
Contributor

@jayconrod Does this also affect Go 1.12?

@jayconrod
Copy link
Contributor

No, I don't think so. The original repro steps don't work on 1.12, and the modified test passes without the fix.

I believe there were some changes to the linker in 1.13 that made it stricter about this kind of thing. The root cause of this issue is present in 1.12, but it doesn't seem to cause an error. So probably not worth cherry-picking there.

@abraithwaite
Copy link
Contributor

We just hit this as well trying to upgrade our CI infrastructure for Go1.13.

I'm guessing 1.13.1 is still a ways out based on this?
https://github.com/golang/go/milestone/113

@jayconrod
Copy link
Contributor

@abraithwaite CL 195281 and CL 197064 are the proposed cherry picks for this issue.

I'm not in charge of the release branch, but I believe Go 1.13.1 (scheduled for tomorrow) will be a security-only update and will not contain these fixes. Go 1.13.2 probably will contain these, and that should be out in early October.

@gopherbot
Copy link
Author

Closed by merging 613adc6 to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Sep 25, 2019
…H mode

If a generated test main package transitively depends on a main
package, the main package will now always be rebuilt as a library and
will not be compiled with '-p main'.

This expands the fix for #30907, which only applied to packages with
the BuildInfo set (main packages built in module mode). Linking
multiple packages with BuildInfo caused link errors, but it appears
these errors apply to some symbols in GOPATH mode.

Fixes #34223

Change-Id: Ic1e53437942269a950dd7e45d163707922c92edd
Reviewed-on: https://go-review.googlesource.com/c/go/+/195279
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 24781a1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/195281
@bcmills bcmills modified the milestones: Go1.13.1, Go1.13.2 Sep 25, 2019
@katiehockman katiehockman modified the milestones: Go1.13.2, Go1.13.3 Oct 17, 2019
@golang golang locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

6 participants