cmd/go: "read-only file system" with -linkshared even when files are present #47186
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
First, Go was built using the regular steps that NixOS has, except after the build process, the command
go install -buildmode=shared -linkshared std
waws ran. This created a bunch of files:Output for
tail /nix/store/7mjiq33kdk70mgfffb699gdg4hp1bna8-go-1.17beta1/share/go/pkg/linux_amd64_dynlink/*.shlibname
Then, a Hello World package was built using that Go:
The command to build was
go install -linkshared .
.What did you expect to see?
The build should've succeeded, and upon running, should've printed
bruh
. Whenldd
is used on the binary, there should've been an entry forlibstd.so
.What did you see instead?
Lots of errors about a
read-only file system
, even though the files are already present:The problem here is that, even when these files are already created, Go still tries to open them. probably with a read-write or write flag, and since NixOS stores
GOROOT
in a read-only file system, this causes Go to fail.The text was updated successfully, but these errors were encountered: