go install std
doesn't install runtime/cgo.a
when cross compiling
#43700
Labels
go install std
doesn't install runtime/cgo.a
when cross compiling
#43700
For context, I'm working on a build system and I'm trying to cross compile go modules without leaning on
go build/install
. The generated cgo files importsruntime/go
so my tool expectspkg/"$TARGET_GOOS"_"$TARGET_ARCH"/runtime/cgo.a
to exist. I guess this assumption is wrong so I was wondering how I'm meant to compile this target? How do I satisfy theruntime/cgo
import for the target arch?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?
export GOOS=linux && export GOARCH=arm64 && go install std
What did you expect to see?
The file
$GOROOT/pkg/linux_arm64/runtime/cgo.a
to existWhat did you see instead?
The file doesn't exist and then my tool breaks down the line when executing:
Which fails with:
import config is a bit hefty but here's a snippet:
PS: It would be fantastic if there was a
go tool install -importcfg ...
or at least ago list -importcfg
so that we can introspect a module without having to bend togo build
s idea of what the file structure should beThe text was updated successfully, but these errors were encountered: