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/link: fail to build when using time/tzdata on ARM #44639

Closed
cherrymui opened this issue Feb 26, 2021 · 8 comments
Closed

cmd/link: fail to build when using time/tzdata on ARM #44639

cherrymui opened this issue Feb 26, 2021 · 8 comments
Labels
Milestone

Comments

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Feb 26, 2021

Branch out from #44073 (comment)

GOARCH=arm go build -tags timetzdata ./path/to/app
time/tzdata.init.0: unresolved inter-package jump to time.registerLoadFromEmbeddedTZData(time) from time/tzdata

This is fixed in CL https://golang.org/cl/292490 , but that didn't get into Go 1.16 release. Filing a separate issue so we can make a backport.

@cherrymui
Copy link
Contributor Author

@cherrymui cherrymui commented Feb 26, 2021

Fixed on tip already.

@cherrymui cherrymui closed this Feb 26, 2021
@cherrymui
Copy link
Contributor Author

@cherrymui cherrymui commented Feb 26, 2021

@gopherbot please backport this to Go 1.16. This causes programs fail to build without easy workaround.

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 26, 2021

Backport issue(s) opened: #44640 (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.

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 26, 2021

Change https://golang.org/cl/296909 mentions this issue: [release-branch.go1.16] cmd/link: generate trampoline for inter-dependent packages

@dmitshur dmitshur added this to the Go1.17 milestone Mar 1, 2021
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Mar 1, 2021

@cherrymui Does this issue also exist in Go 1.15, or only 1.16?

@cherrymui
Copy link
Contributor Author

@cherrymui cherrymui commented Mar 2, 2021

I'm not really sure. By the logic of the code it probably could happen, but I'm not sure if it could be triggered by simply using tzdata package (as of Go 1.16) or only with some contrived cases.

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 2, 2021

Change https://golang.org/cl/298030 mentions this issue: [release-branch.go1.15] cmd/link: generate trampoline for inter-dependent packages

@cherrymui
Copy link
Contributor Author

@cherrymui cherrymui commented Mar 2, 2021

@dmitshur I can reproduce with Go 1.15. Backport CL sent.

gopherbot pushed a commit that referenced this issue Mar 25, 2021
…dent packages

Currently, in the trampoline generation pass we expect packages
are laid out in dependency order, so a cross-package jump always
has a known target address so we can check if a trampoline is
needed. With linknames, there can be cycles in the package
dependency graph, making this algorithm no longer work. For them,
as the target address is unkown we conservatively generate a
trampoline. This may generate unnecessary trampolines (if the
packages turn out laid together), but package cycles are extremely
rare so this is fine.

Updates #44639.
Fixes #44640.

Change-Id: I2dc2998edacbda27d726fc79452313a21d07787a
Reviewed-on: https://go-review.googlesource.com/c/go/+/292490
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit 098504c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/296909
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Mar 25, 2021
…dent packages

Currently, in the trampoline generation pass we expect packages
are laid out in dependency order, so a cross-package jump always
has a known target address so we can check if a trampoline is
needed. With linknames, there can be cycles in the package
dependency graph, making this algorithm no longer work. For them,
as the target address is unkown we conservatively generate a
trampoline. This may generate unnecessary trampolines (if the
packages turn out laid together), but package cycles are extremely
rare so this is fine.

Updates #44639.
Fixes #44748.

Change-Id: I2dc2998edacbda27d726fc79452313a21d07787a
Reviewed-on: https://go-review.googlesource.com/c/go/+/292490
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit 098504c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/298030
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants