Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: combining dwarf failed: Unknown load command 0x80000018 (2147483672) #32233
What version of Go are you using (
I've made an attempt to adapt your reproducer as a testcase -- see https://golang.org/cl/178726. My first attempt is problematic in that I it contains code that doesn't work with older versions of MacOS, e.g. 10.11, since it refers to the UserNotifications framework.
I can add guards via #ifdef to insure that those constructs are conditionally compiled based on the OS version, e.g.
however I can't use the same trick with the cgo directives. Something like
doesn't have the desired effect, since cgo doesn't run the C preprocessor.
A question for you: is it possible to reproduce the same DWARF issue without using the newer framework (e.g. just using something from the Foundation framework)?
@thanm I stumbled into the issue randomly because I was trying to use the
I don't have an alternative way to reproduce that issue. I could look into how we can get the compiler to produce a binary that specifically uses that MACH-O command.
Ah, from looking at the revised test case, did you try different frameworks randomly?, curious about it.
Thank you for looking into this issue!
Rework this recently introduced test case to insure that it works with older versions of the OS. It was using a new framework library not available on pre-10.14 to trigger the weak symbol reference; switch to using a new symbol from an existing library. Tested on MacOS 10.14 and 10.11. Updates #32233. Change-Id: I1fe2a9255fca46cb7cdf33ff7fed67bba86fdc22 Reviewed-on: https://go-review.googlesource.com/c/go/+/179837 Run-TryBot: Than McIntosh <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org> Reviewed-by: David Chase <email@example.com>