-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: cgo fails to link on macos 13 beta (arm64) #53372
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
Thanks for reporting. I'll see if I can get macOS 13 beta on my machine and try this. Please note that this is the beta version of the OS and things may change before the final release. Thanks. |
Fully aware of the pain of using beta software 😄 Happy to test nightly builds of go if there's any commits that might solve this problem |
I couldn't find how to install macOS 13 beta despite that I have enrolled the Apple Beta Program. However, I'm able to reproduce the issue by using Xcode 14 beta on macOS 12.5 beta. I see two issues here:
for the go.o object file. It doesn't really affect program execution. But I think it is a good idea to just align that address. I send a CL for the second part. With that the cgo program builds and runs fine. |
Change https://go.dev/cl/411912 mentions this issue: |
Oh that's good news - then I should be able to use another version of xcode. |
@ptxmac could you try if Go tip (which now includes the CL) works on the new OS with the new Xcode? Thanks! |
Just tested with
Just perfect! - Thanks! |
Change https://go.dev/cl/412734 mentions this issue: |
Currently, when we calculate the size of a carrier symbol, we use the previous symbol's end address as the start. But the symbol actually starts after applying the alignment. Do this in the size calculation. Should fix AIX build. Updates #53372. Change-Id: I17942b1fe8027dce12b78c8e8c80ea6cebcee240 Reviewed-on: https://go-review.googlesource.com/c/go/+/412734 Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
It looks like beta 3 update solved this issue |
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
)?tl;dr: 13.0 Beta (22A5266r) on Apple silicon (arm64)
go env
OutputWhat did you do?
Attempt to compile the following program:
What did you expect to see?
This should Just-Work™ and create a valid arm64 binary
What did you see instead?
A long list of linker warnings followed by an error:
The text was updated successfully, but these errors were encountered: