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: LC_UUID not generated by go linker, resulting in failure to access local network on macOS 15 [1.23 backport] #69992

Closed
gopherbot opened this issue Oct 22, 2024 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link
Contributor

@cherrymui requested issue #68678 to be considered for backport to the next 1.23 minor release.

@gopherbot please backport this. This causes programs fail to access local network on macOS 15.

The full fix would be backporting CL 618595, CL 618596, CL 618597, and CL 618598, which may be too complex for backport. A simpler alternative is backporting just CL 618595, which enables generating LC_UUID with a flag. It still needs a flag, but not the C toolchain, therefore helpful for cross compilation. We might be able to do a hacky way to enable it by default except for the toolchain binaries. I'll look into that.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Oct 22, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Oct 22, 2024
@gopherbot gopherbot added this to the Go1.23.3 milestone Oct 22, 2024
@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Oct 23, 2024
@prattmic
Copy link
Member

A simpler alternative is backporting just CL 618595,

In cherry pick review, we decided to approve this simpler backport.

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Oct 23, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/622595 mentions this issue: [release-branch.go1.23] cmd/link: generate Mach-O UUID when -B flag is specified

gopherbot pushed a commit that referenced this issue Oct 30, 2024
…s specified

Currently, on Mach-O, the Go linker doesn't generate LC_UUID in
internal linking mode. This causes some macOS system tools unable
to track the binary, as well as in some cases the binary unable
to access local network on macOS 15.

This CL makes the linker start generate LC_UUID. Currently, the
UUID is generated if the -B flag is specified. And we'll make it
generate UUID by default in a later CL. The -B flag is currently
for generating GNU build ID on ELF, which is a similar concept to
Mach-O's UUID. Instead of introducing another flag, we just use
the same flag and the same setting. Specifically, "-B gobuildid"
will generate a UUID based on the Go build ID.

Updates #68678.
Fixes #69992.

Cq-Include-Trybots: luci.golang.try:go1.23-darwin-amd64_14,go1.23-darwin-arm64_13
Change-Id: I90089a78ba144110bf06c1c6836daf2d737ff10a
Reviewed-on: https://go-review.googlesource.com/c/go/+/618595
Reviewed-by: Michael Knyszek <[email protected]>
Reviewed-by: Ingo Oeser <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
(cherry picked from commit 20ed603)
Reviewed-on: https://go-review.googlesource.com/c/go/+/622595
Reviewed-by: Michael Pratt <[email protected]>
@gopherbot
Copy link
Contributor Author

Closed by merging CL 622595 (commit 5472853) to release-branch.go1.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants