Outdated README.Debian for cross-compilation on Ubuntu xenial
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/
If you get an error message like this:
~/gocode/
go build runtime: linux/386 must be bootstrapped using make.bash
…you are missing the appropriate golang-
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.
go install runtime/
$ 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://
100 /var/lib/
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.