[Bug 1609823] Re: Outdated README.Debian for cross-compilation on Ubuntu xenial

Tero Marttila terom at fixme.fi
Thu Aug 4 17:11:19 UTC 2016


Workaround is to use go build:

    GOPATH=~/go GOOS=linux GOARCH=arm GOARM=5 go build -o
bin/linux_arm/foo -v .

But this recompiles the entire stdlib each time.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to golang in Ubuntu.
https://bugs.launchpad.net/bugs/1609823

Title:
  Outdated README.Debian for cross-compilation on Ubuntu xenial

Status in golang package in Ubuntu:
  New

Bug description:
  On Ubuntu trusty, I used to cross-compile Golang programs for ARM
  devices, IIRC by installing the golang-go-linux-arm package. However,
  these packages no longer exist in xenial, even though it is referred
  to in the /usr/share/doc/golang-1.6-go/README.Debian file:

    If you get an error message like this:

      ~/gocode/src/helloworld $ GOARCH=386 go build
      go build runtime: linux/386 must be bootstrapped using make.bash

    …you are missing the appropriate golang-go-$GOOS-$GOARCH debian package,
    i.e. golang-go-linux-386 in this case.

  Not sure how to get the missing stdlib linux_arm pkgs. Trying to
  cross-compile for e.g. GOOS=arm on amd64 results in:

      $ GOPATH=~/go GOOS=linux GOARCH=arm GOARM=5 go install -v github.com/qmsk/e2/cmd/tally
      go install runtime/internal/sys: mkdir /usr/lib/go-1.6/pkg/linux_arm: permission denied

  $ lsb_release -rd
  Description:    Ubuntu 16.04.1 LTS
  Release:        16.04

  $ apt-cache policy golang-go
  golang-go:
    Installed: 2:1.6-1ubuntu4
    Candidate: 2:1.6-1ubuntu4
    Version table:
   *** 2:1.6-1ubuntu4 500
          500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
          100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang/+bug/1609823/+subscriptions



More information about the foundations-bugs mailing list