-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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: issues with Xcode 16 beta [freeze exception] #68088
Comments
Change https://go.dev/cl/593659 mentions this issue: |
Change https://go.dev/cl/593660 mentions this issue: |
To work around #59026, where dsymutil may not clean up its temp directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp directory. The problem is that in Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH directory even if it is not empty. In particular, that's where our DWARF file (the output of dsymutil) locates. That causes all the DWARF missing failures. When the linker is invoked with CL 593659 fixes this, by giving dsymutil a subdirectory. This makes all.bash pass with Xcode 16 beta on both Intel and ARM64. The code sign failure is also related. As dsymutil deletes the directory, which contains its own output DWARF file, which makes the Go linker not be able to find the file and exit too early. With the fix, this should not happen. But even if this happens (dsymutil didn't generate an output), we should not skip code sign. CL 593660 addresses this. |
@golang/release I'm requesting a freeze exception for this. Xcode 16 beta doesn't work well with Go currently, with the most significant problem being the code sign error on ARM64, which makes almost all cgo binaries fail to run. This is caused by dsymutil unexpectedly (but arguable) deleting the temp directory (details above). Xcode 16 is still in beta, and Apple might change this before the final release, or not. Xcode 16 will probably be released later this year, well before Go 1.24. Instead of waiting for Apple to fix, we can do a simple workaround in Go 1.23. This ensures Go 1.23 works well when Xcode 16 is released, and also make users who want to use Apple's beta toolchain happy. The fix is simple and low risk, just changing the temp directory to pass to dsymutil. Thanks. (This doesn't need to block RC.) |
@gopherbot please backport this to Go 1.22. Thanks. Reason is similar to the freeze exception above. Xcode 16 will probably be released while Go 1.22 is still in support. |
Backport issue(s) opened: #68198 (for 1.22). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
@cherrymui approved. |
Thanks! |
To work around #59026, where dsymutil may not clean up its temp directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp directory so it uses that, and we can delete it at the end. In Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH directory even if it is not empty. We still need our tmpdir at the point, so give a subdirectory to dsymutil instead. For #68088. Change-Id: I18759cc39512819bbd0511793ce917eae72245d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/593659 Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Even if dsymutil didn't generate a file (which should not happen with the Apple toolchain with the correct setup), we should not skip next steps, e.g. code sign. A return statement makes it exit too early. Updates #68088. Change-Id: Ic1271ed1b7fe5bdee5a25cc5d669a105173b389e Reviewed-on: https://go-review.googlesource.com/c/go/+/593660 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
Fixed by the CLs above. |
Change https://go.dev/cl/596455 mentions this issue: |
To work around golang#59026, where dsymutil may not clean up its temp directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp directory so it uses that, and we can delete it at the end. In Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH directory even if it is not empty. We still need our tmpdir at the point, so give a subdirectory to dsymutil instead. For golang#68088. Change-Id: I18759cc39512819bbd0511793ce917eae72245d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/593659 Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Even if dsymutil didn't generate a file (which should not happen with the Apple toolchain with the correct setup), we should not skip next steps, e.g. code sign. A return statement makes it exit too early. Updates golang#68088. Change-Id: Ic1271ed1b7fe5bdee5a25cc5d669a105173b389e Reviewed-on: https://go-review.googlesource.com/c/go/+/593660 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
…directory To work around #59026, where dsymutil may not clean up its temp directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp directory so it uses that, and we can delete it at the end. In Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH directory even if it is not empty. We still need our tmpdir at the point, so give a subdirectory to dsymutil instead. Updates #68088. Fixes #68198. Change-Id: I18759cc39512819bbd0511793ce917eae72245d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/593659 Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit 5f319b7) Reviewed-on: https://go-review.googlesource.com/c/go/+/596455
Xcode 16 beta is released recently. I downloaded it and tested against Go (running all.bash). There are a number of failures. Filing this issue to track.
On ARM64, when external linking, it seems to cause code sign error, where binaries from
go build
have invalid code signature and get killed.Besides, there are a few failures below.
A number of failures seems to be DWARF related
And there is also one that seems not DWARF related
They are failing with
ld-1115.5.3
. I haven't investigated them and I'm not sure they are bugs in Go or Apple's linker. I'll look into them.The text was updated successfully, but these errors were encountered: