macOS Linker changes cause golang to crash when installing
go install github.com/wealdtech/ethereal/v2@latest
returns this error:
# truncated
go: downloading github.com/bits-and-blooms/bitset v1.8.0
# github.com/wealdtech/ethereal/v2
ld: warning: '/private/var/folders/18/4p7lgyxj2jd4v2vmv82b25ch0000gn/T/go-link-2801687295/go.o' has malformed LC_DYSYMTAB, expected 128 undefined symbols to start at index 35481, found 202 undefined symbols starting at index 92
macOS env
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.0.0.0.1.1692336968
volume: /
location: /
Fix: explicitly force legacy linker when building
go build -ldflags="-extldflags=-Wl,-ld_classic"
$ ./ethereal version
2.8.10
macOS Linker changes cause golang to crash when installing
returns this error:
macOS env
Fix: explicitly force legacy linker when building
go build -ldflags="-extldflags=-Wl,-ld_classic"