go get runtime/cgo: open /nix/store/yh6p6ky7w2nfa64r3r7vhr5d5s1p87bk-go-1.11.2/share/go/pkg/linux_amd64/runtime/cgo.a: read-only file system
Install Go
Attempt to compile project that requires cgo. (Not with nix. just regularly)
"x86_64-linux"Linux 4.18.0, NixOS, 19.03pre162671.44b02b52ea6 (Koi)yesyesnix-env (Nix) 2.1.3"nixos-19.03pre162671.44b02b52ea6, nixpkgs-19.03pre155263.20c4986c4dd"/nix/var/nix/profiles/per-user/root/channels/nixosCC @cstrahan @orivej @velovix @Mic92
I don't know the scope of the issue (I don't remember having encountered it) and whether we can/should fix it, but you can probably work around it by running go build or go install with -pkgdir /tmp (or any other writable directory).
The same file already exists, so I don' know why tries to recompile it. Usually this happens when build systems are injecting -i into go builds.
Also tracked here: https://github.com/golang/go/issues/24674
$ go list -f '{{.Stale}}' runtime/cgo
true
$ go list -f '{{.StaleReason}}' runtime/cgo
not installed but available in build cache
It seems that there is not much we can do about that but stop using -i in go, which is not useful anymore anyway: https://github.com/golang/go/issues/24674#issuecomment-379919460
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
It seems that there is not much we can do about that but stop using
-iin go, which is not useful anymore anyway: https://github.com/golang/go/issues/24674#issuecomment-379919460