1
== Installation of additional packages with goinstall ==
3
Debian's goinstall was modified to not install dependencies by
4
default, because it tries to recompile system libraries, which fails.
5
If you want to use goinstall you are probably better using golang-go
6
installed in your home, because goinstall is not very FHS friendly
9
-- Ondřej Surý <ondrej@debian.org>, Fri, 18 Feb 2011 15:38:47 +0100
3
Go supports cross-compilation. The environment variables GOOS (e.g. linux,
4
netbsd, …) and GOARCH (amd64, 386, arm) influence the resulting binary.
6
For example, to compile helloworld for linux_386, use:
8
~/gocode/src/helloworld $ GOARCH=386 go build
9
~/gocode/src/helloworld $ file helloworld
10
helloworld: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
11
statically linked, not stripped
13
If you get an error message like this:
15
~/gocode/src/helloworld $ GOARCH=386 go build
16
go build runtime: linux/386 must be bootstrapped using make.bash
18
…you are missing the appropriate golang-go-$GOOS-$GOARCH debian package,
19
i.e. golang-go-linux-386 in this case.
21
-- Michael Stapelberg <stapelberg@debian.org> Fri, 07 Jun 2013 22:34:12 +0200