06-13-2016, 11:25 AM
(This post was last modified: 06-13-2016, 11:37 AM by simonritchie.)
Just to confirm that the Go programming language runs on the Pine64. This was announced in the Go forum a few days ago: https://groups.google.com/forum/#!topic/...mY7IKVMMyE. The person who posted thate announcement is running it under Debian Linux. I'm running it under Ubuntu Linux.
Just to expand on that posting, Go doesn't work on the Arm64 out of the box. To get started you need to create an intermediate version of Go using another machine that already has Go running. (I used an Intel-based system running Ubuntu. You could also use a Windows system.) Use these instructions: https://golang.org/doc/install/source, in particular the section "Optional Environment Variables". When you build your intermediate system, specify the arm64 as the target architecture using GOARCH and specify the target operating as linux using GOOS:
export GOARCH=arm64
export GOOS=linux
Use GOROOT_FINAL to specify the location where you want the result to be stored on your Pine64.
Once it's built, copy the resulting files onto your Pine64 and put the directory containing the go command into your path. That gives you a working Go compiler. For a quick test, run:
go version
which should display some information about the go compiler. That it runs at all is a good sign.
You could just use this version of the go compiler but it's nicer to download the source code of the Go system onto the Pine64 and compile it all over again. The compilation process takes about ten minutes and gives you a Go system that was created from source on the Pine64. It also acts as a fairly thorough check that the compiler is working OK.
You only need to go through that rigmarole once. After that, when a new version of Go comes out, you can compile it from source code using your existing compiler.
The Go compiler will only work if it's stored in the directory that you specified using GOROOT_FINAL when you built it - you can't move it around later. It's a very good idea to store the final version in /usr/local/go, so you may want to put the intermediate cross-compiled version somewhere else.
To find out more about Go, visit https://golang.org. (There again, if you don't already know about Go, you are probably not reading this posting.)
Happy Going.
Simon
Just to expand on that posting, Go doesn't work on the Arm64 out of the box. To get started you need to create an intermediate version of Go using another machine that already has Go running. (I used an Intel-based system running Ubuntu. You could also use a Windows system.) Use these instructions: https://golang.org/doc/install/source, in particular the section "Optional Environment Variables". When you build your intermediate system, specify the arm64 as the target architecture using GOARCH and specify the target operating as linux using GOOS:
export GOARCH=arm64
export GOOS=linux
Use GOROOT_FINAL to specify the location where you want the result to be stored on your Pine64.
Once it's built, copy the resulting files onto your Pine64 and put the directory containing the go command into your path. That gives you a working Go compiler. For a quick test, run:
go version
which should display some information about the go compiler. That it runs at all is a good sign.
You could just use this version of the go compiler but it's nicer to download the source code of the Go system onto the Pine64 and compile it all over again. The compilation process takes about ten minutes and gives you a Go system that was created from source on the Pine64. It also acts as a fairly thorough check that the compiler is working OK.
You only need to go through that rigmarole once. After that, when a new version of Go comes out, you can compile it from source code using your existing compiler.
The Go compiler will only work if it's stored in the directory that you specified using GOROOT_FINAL when you built it - you can't move it around later. It's a very good idea to store the final version in /usr/local/go, so you may want to put the intermediate cross-compiled version somewhere else.
To find out more about Go, visit https://golang.org. (There again, if you don't already know about Go, you are probably not reading this posting.)
Happy Going.
Simon