Please answer these questions before submitting your issue. Thanks!
go version)?1.4 & 1.5 (fixed in 1.6 & 1.7)
go env)?NixOS Linux x64
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
A build of the go compiler
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
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)
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