You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set GOARCH=386 on my amd64 machine, go install puts binaries in pkg/tool/darwin_386.
But if I then run "go tool api" (with GOARCH=386 still set), it doesn't find
it in pkg/tool/darwin_386.
This seems weird. Is that by design? Or just omission in "go tool" to search
for it elsewhere?
$ GOARCH=386 go install -a -x ...
.....
mkdir -p /Users/bradfitz/go/pkg/tool/darwin_386/
cp $WORK/cmd/api/_obj/exe/a.out /Users/bradfitz/go/pkg/tool/darwin_386/api
mac:src bradfitz$ GOARCH=386 go tool api
go tool: no such tool "api"
The text was updated successfully, but these errors were encountered:
GOARCH sets the kind of binary to build.
You might be cross-compiling: GOARCH might be arm.
You definitely don't want to run the arm tool on an x86 system.
The host system type is GOHOSTARCH.
To install the api tool (or any tools) you need to use
GOARCH=$(go env GOHOSTARCH) go install .../api
and then plain 'go tool' will find them.
make.bash does this for the standard tools. api/run.go needs
to do it for the api tool, because the api tool is not being built
as part of the standard tools.
Russ
The text was updated successfully, but these errors were encountered: