go compiler 1.4 & 1.5 build errors with binutils 2.27

Created on 28 Aug 2016  Â·  2Comments  Â·  Source: golang/go

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

1.4 & 1.5 (fixed in 1.6 & 1.7)

  1. What operating system and processor architecture are you using (go env)?

NixOS Linux x64

  1. What did you do?

Attempted to build go 1.4 against binutils 2.27

If possible, provide a recipe for reproducing the error.

bash $ sudo mkdir /nix && sudo chown `id -u`.`id -g` /nix && sudo -k $ curl https://nixos.org/nix/install | bash $ . $HOME/.nix-profile/etc/profile.d/nix.sh $ nix-build https://github.com/NixOS/nixpkgs/archive/57ddc15.tar.gz -A go_1_4

  1. What did you expect to see?

A build of the go compiler

  1. What did you see instead?

This build error:

[…] text/scanner net os/user # net cannot load DWARF output from $WORK/net/_obj//_cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0 # os/user cannot load DWARF output from $WORK/os/user/_obj//_cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0 builder for ‘/nix/store/44m9psp0b05gdn53qq12nh1kn3jz6fzd-go-1.4.3.drv’ failed with exit code 2 error: build of ‘/nix/store/44m9psp0b05gdn53qq12nh1kn3jz6fzd-go-1.4.3.drv’ failed

Full build log: http://hydra.nixos.org/build/39293474/nixlog/1#line-299

FrozenDueToAge

Most helpful comment

Go 1.4 is end of life. If you are using Go 1.4 to bootstrap a later version, disable cgo with

env CGO_ENABLED=0 ./make.bash

All 2 comments

Go 1.4 is end of life. If you are using Go 1.4 to bootstrap a later version, disable cgo with

env CGO_ENABLED=0 ./make.bash

That worked, thanks!

(Yes we use 1.4 to boostrap the higher versions)

Was this page helpful?
0 / 5 - 0 ratings