~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to debian/README.Debian

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 == Installation of additional packages with goinstall ==
2
 
 
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
7
 
now.
8
 
 
9
 
 -- Ondřej Surý <ondrej@debian.org>, Fri, 18 Feb 2011 15:38:47 +0100
 
1
== Cross-Compilation
 
2
 
 
3
Go supports cross-compilation. The environment variables GOOS (e.g. linux,
 
4
netbsd, …) and GOARCH (amd64, 386, arm) influence the resulting binary.
 
5
 
 
6
For example, to compile helloworld for linux_386, use:
 
7
 
 
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
 
12
 
 
13
If you get an error message like this:
 
14
 
 
15
    ~/gocode/src/helloworld $ GOARCH=386 go build
 
16
    go build runtime: linux/386 must be bootstrapped using make.bash
 
17
 
 
18
…you are missing the appropriate golang-go-$GOOS-$GOARCH debian package,
 
19
i.e. golang-go-linux-386 in this case.
 
20
 
 
21
-- Michael Stapelberg <stapelberg@debian.org>  Fri, 07 Jun 2013 22:34:12 +0200