I'm using Linux 64-bit and I'm trying to set up Go for cross-compiling (for Windows, specifically). There's an awesome guide for this here. But when I try to run the second command below:
cd /usr/lib/go/src
sudo GOOS=windows GOARCH=386 CGO_ENABLED=0 ./make.bash --no-clean
I get errors when it tries to build the cmd
package. It says use of internal package not allowed
. Is this a bug in Go's main source code? I'll paste the full list of errors.
# Building packages and commands for host, linux/amd64.
package cmd/cmd/pprof
imports cmd/pprof/internal/driver: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/fetch: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/symbolizer: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/symbolz: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/report: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/svg: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/tempfile: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/commands: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/report: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/tempfile: use of internal package not allowed
package cmd/cmd/pprof/internal/fetch
imports cmd/pprof/internal/plugin: use of internal package not allowed
package cmd/cmd/pprof/internal/fetch
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/plugin
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/report
imports cmd/pprof/internal/plugin: use of internal package not allowed
package cmd/cmd/pprof/internal/report
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/symbolizer
imports cmd/pprof/internal/plugin: use of internal package not allowed
package cmd/cmd/pprof/internal/symbolizer
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/symbolz
imports cmd/pprof/internal/profile: use of internal package not allowed
I can't find anything like this on Google, so that probably means I'm doing something wrong. I'm using Arch Linux, by the way, and I installed Go
with pacman
, not from source.