Dhananjay M
Dhananjay M

Reputation: 61

Golang build error 0x80000034 (2147483700)

command I ran: go build -o main

output: /usr/local/go/pkg/tool/darwin_arm64/link: /usr/local/go/pkg/tool/darwin_arm64/link: combining dwarf failed: unknown load command 0x80000034 (2147483700)

go version: go version go1.16.4 darwin/arm64

Upvotes: 4

Views: 5256

Answers (4)

PixelsTech
PixelsTech

Reputation: 3346

If you are on Mac M1 chip, and if you wanna go 1.16, can also try to install an amd version of the go 1.16. This has been tested and worked fine on my machine.

Reference: https://www.pixelstech.net/article/1637845585-combining-dwarf-failed%3A-unknown-load-command-0x80000034-solution-in-GoLang

Upvotes: 0

Kimmeh
Kimmeh

Reputation: 1011

If you can disable cgo CGO_ENABLED=0 go build -o main it should build with go 1.16

Upvotes: 0

PixelsTech
PixelsTech

Reputation: 3346

As mentioned by @blackgreen, can solve the problem by upgrading to Go 1.17.

However if not wanna upgrade to Go 1.17, can also try to install an AMD version of Go 1.16 and run again. This works for me on my MAC M1.

Upvotes: 0

blackgreen
blackgreen

Reputation: 45199

Have a look at issue #47269.

load command 0x80000034 corresponds to LC_DYLD_CHAINED_FIXUPS. Support for this load command was added in https://go-review.googlesource.com/c/go/+/312729, which is part of Go 1.17.

You should upgrade to Go 1.17 or above.

Upvotes: 7

Related Questions