i've not built Go under plan9/arm.  however, in practice (in a real Plan 9
environment) this is not an issue. the way authentication and namespaces
(including file server) work in a Plan 9 envrionment, it is natural to use
the fastest cpu available to (cross) compile apps. typical sessions are
like this:

supermic% ls -l
d-rwxrwxr-x M 5543 fst fst       0 Jul 21  2015 .hg
--rw-rw-r-- M 5543 fst fst    1071 Feb 10  2013 LICENSE
--rw-rw-r-- M 5543 fst fst     206 Feb 10  2013 README
--rw-rw-r-- M 5543 fst fst   12477 Feb 10  2013 admui.go
--rw-rw-r-- M 5543 fst fst    6332 Feb 10  2013 client.go
--rw-rw-r-- M 5543 fst fst    8623 Feb 10  2013 index.html
--rw-rw-r-- M 5543 fst fst     450 Feb 10  2013 logger.go
--rw-rw-r-- M 5543 fst fst    1307 Feb 10  2013 main.go
--rw-rw-r-- M 5543 fst fst    4232 May 13  2013 server.go
--rwxrwxr-x M 5543 fst fst 5977542 Apr 12 13:57 tcpmeter
supermic% rm tcpmeter
supermic% go build
supermic% ls -ltr
--rw-rw-r-- M 5543 fst fst    6332 Feb 10  2013 client.go
--rw-rw-r-- M 5543 fst fst     450 Feb 10  2013 logger.go
--rw-rw-r-- M 5543 fst fst    1071 Feb 10  2013 LICENSE
--rw-rw-r-- M 5543 fst fst    1307 Feb 10  2013 main.go
--rw-rw-r-- M 5543 fst fst     206 Feb 10  2013 README
--rw-rw-r-- M 5543 fst fst   12477 Feb 10  2013 admui.go
--rw-rw-r-- M 5543 fst fst    8623 Feb 10  2013 index.html
--rw-rw-r-- M 5543 fst fst    4232 May 13  2013 server.go
d-rwxrwxr-x M 5543 fst fst       0 Jul 21  2015 .hg
--rwxrwxr-x M 5543 fst fst 5855281 Apr 12 14:00 tcpmeter
supermic% file tcpmeter
tcpmeter: 386 plan 9 executable
supermic% ./tcpmeter -?
flag provided but not defined: -?
2016/04/12 14:00:31 usage: ./tcpmeter (-c|-s) [-r [host:]port] [-h
[host:]port] [-l logfile]
supermic% GOARCH=arm go build
supermic% file tcpmeter
tcpmeter: arm plan 9 executable
supermic% cpu -h rpi2
rpi2% ./tcpmeter -?
flag provided but not defined: -?
2016/04/12 14:04:35 usage: ./tcpmeter (-c|-s) [-r [host:]port] [-h
[host:]port] [-l logfile]
rpi2% pwd
/usr/fst/GoApps/src/tcpmeter
rpi2% exit
supermic% pwd
/usr/fst/GoApps/src/tcpmeter
supermic%

Similar setup could be done under Linux/MacOSX with some work. I found this
article very helpful:
https://medium.com/@rakyll/go-1-5-cross-compilation-488092ba44ec#.635w6yhi5

btw, building Go on rpi/linux, took some time.  i have not tried rpi3 yet
(waiting for 64bit plan9 or linux).  building Go on odroid-c2 (linux/arm64)
"feels" as speedy as on atom or i3.


On Tue, Apr 12, 2016 at 12:21 PM, Chris McGee <sirnewton...@yahoo.ca> wrote:

> Hi Skip,
>
> Have you managed to get Go running on an RPi this way?
>
> Cheers,
> Chris
>
> >
> > If you run Plan 9 in a VM, emulator or a confined device (RPi), it will
> be easier/faster to cross compile your app and copy it over. E.g. to
> compile for 9Pi:
> >         $ GOOS=plan9 GOARCH=arm go build
> >
> >
>
>
>

Reply via email to