Outdated README.Debian for cross-compilation on Ubuntu xenial

Bug #1609823 reported by Tero Marttila
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang-1.6 (Ubuntu)
New
Undecided
Unassigned

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

Tags: xenial
Revision history for this message
Tero Marttila (terom) wrote :

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.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu.

Version 1.6.3-1 of golang-1.6 removed the outdated README.Debian, so it doesn't contain misleading instructions in the development version of Ubuntu. The bad news is that I don't think it contains updated instructions...

affects: golang (Ubuntu) → golang-1.6 (Ubuntu)
tags: added: xenial
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.