Installation of Go on ARM v8


Is GO installable on Odroid C2 (arm v8 / 64bits).

if yes could you provide process ?


I wrote up instructions for how to do this from source here

Replace Go 1.5 wih Go 1.7.3 and replace ppc64 with arm64 and you should be good to go.

Thanks, but :

root@C2:~/go1.4/src# GOOS=linux GOARCH=arm64 ./make.bash

Building C bootstrap tool.

go tool dist: unknown architecture: aarch64

any tips?

The instructions are for building a bootstrap Go installation on an intel host then using that bootstrap install as your GOROOT_BOOTSTRAP. You cannot build Go1.4 directly on you C2 as Go 1.4 does not support arm64, that was added in Go 1.5.

Ok, but Go 1.5 need 1.4 to build, right ? that seems to be a vicious circle …
so there is a way to build a Go version on arm64

The process has several steps.

  1. on an intel host, build Go 1.4 to be your hosts’ GOROOT_BOOTSTRAP
  2. on the same intel host, build Go 1.7.3 (the blog post says Go 1.5)
  3. on the same intel host, use env GOOS=linux GOARCH=arm64 ./bootstrap.bash to build the bootstrap version of Go for your arm64 host
  4. on your arm64 host, build Go 1.7.3, using the output of step 3 as your GOROOT_BOOTSTRAP/

It works :slight_smile:
Thanks a lot guy

Is anyway to build the arm5 version of GO 1.7.3 on the same intel host? I tried doing the above steps for ARM5 but unfortunately the build is running out of memory.
I need to build the binary for ARM5 version of GO on some other machine.
I have checked your articles in cross-compilation, but I am not sure if that allows to build the GO installation itself.


So you want to

a. Build a version of the Go 1.7.3 toolchain that will run on your arm5 sustem.
b. or, build your program to run on arm5 using Go 1.7.3 on your Intel machine?

A) I want to run GO 1.7.3 on ARM5. Unfortunately, I could not find a binary distribution for ARM5 so I was trying to build from source but I am having issues with Out Of Memory errors.

I was reading your article on cross-compiling and might have misunderstood but I thought that I might be able to build GO 1.7.3 for ARM5 in some other platform.

I would really appreciate your help.


Why not just cross compile your program to arm5?

env GOARM=5 GOARCH=arm GOOS=linux go build $YOURPACKAGE


Thanks for the response but I still have a couple of clarifications.

Do I need to download the source of the GO version I want to build and then from the src folder execute the command below?

env GOARM=5 GOARCH=arm GOOS=linux go build $YOURPACKAGE

What will be the $YOURPACKAGE?

Thanks again,

Nope, it’s even easier. Install Go on your intel machine, run

env GOARM=5 GOARCH=arm GOOS=linux go build $YOURPACKAGE

And it will leave an arm binary in your $CWD.

$YOURPACKAGE is the import path of the package you want to build.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.