[Pkg-golang-devel] Bug#784543: golang: golang on arm64

Edmund Grimley Evans edmund.grimley.evans at gmail.com
Wed May 6 14:16:01 UTC 2015


Source: golang
Version: 1.4.2-2
Severity: wishlist

It would be nice to have Go on arm64. Upstream has it.
According to https://github.com/golang/go/milestones
they are aiming to release 1.5 around Jul 31 so perhaps
you'll want to wait till then, or perhaps a 1.5~pre would
be a good idea at some point.

If anyone is keen for a preview, the following recipe seems to work.
However, I have not checked it on any other architectures and I have
not checked the upstream issue tracker to see if this version has any
known major problems. Also, check the attached patch for "xx".

# Refer to http://build.golang.org/ and pick a commit that did not
# fail any critical tests, for example 71274e485715.

# On a Debian system which has golang, for example amd64:
sudo apt-get build-dep golang
sudo apt-get install golang git
mkdir /tmp/go1
cd /tmp/go1
git clone https://go.googlesource.com/go
cd go/src
git checkout 71274e485715
export GOROOT_BOOTSTRAP=/usr/lib/go
GOOS=linux GOARCH=arm64 ./bootstrap.bash

scp ../../go-linux-arm64-bootstrap.tbz ...

# On a Debian unstable arm64 system:
sudo apt-get build-dep golang
sudo apt-get install golang git
mkdir /tmp/go1 /tmp/go2
cd /tmp/go1
tar xjf .../go-linux-arm64-bootstrap.tbz
cd /tmp/go2
wget http://http.debian.net/debian/pool/main/g/golang/golang_1.4.2-2.debian.tar.xz
git clone https://go.googlesource.com/go
cd go
git checkout 71274e485715
tar xJf ../golang_1.4.2-2.debian.tar.xz
patch -p1 < .../golang-1.5~pre20150504-1.patch
export GOROOT_BOOTSTRAP=/tmp/go1/go-linux-arm64-bootstrap
debian/rules gencontrol
dpkg-buildpackage -b


A slight problem with this recipe is that you must set GOROOT_BOOTSTRAP.
Even if you have built and installed golang_1.5~pre20150504-1_all.deb,
if you want to rebuild it using this recipe you have to set
GOROOT_BOOTSTRAP=/usr/lib/go before running dpkg-buildpackage -b.
Presumably that wouldn't happen on a buildd. So for this recipe to
become a source package this would have to be fixed. Perhaps the fix
is to add a line in debian/rules to set GOROOT_BOOTSTRAP, but I'm not
sure about the right way to do it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: golang-1.5~pre20150504-1.patch
Type: text/x-diff
Size: 4897 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20150506/bb6dbae4/attachment-0001.patch>


More information about the pkg-golang-devel mailing list