Re: [9fans] Go on Plan 9?

2016-04-13 Thread Skip Tavakkolian
I use GOROOT=$home/go to keep up with tip. after bootstrapping, rebuild the standard packages and commands: % GOBIN=$home/bin/386 $home/go/bin/go install -a std cmd and % GOARCH=arm go install -a std cmd then in my profile: % test -d $home/go/bin/plan9_^$cputype && bind -a

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> Still, how much swap are we talking about? On a 1GB system, the default test suite swaps in only a handful of places. It's possible to limit the concurrency enough to cut out swapping, but then it takes longer because there's less opportunity to overlap cpu-bound tests with file I/O and

Re: [9fans] Go on Plan 9?

2016-04-13 Thread lucio
> If you want to get to the satisfying ALL TESTS PASSED message at the end > of the go install+test process, you will need a swap file, even on a > 1GB raspberry pi. Trust me. Sounds like a challenge, but I never quite wanted to know whether Plan 9 swap is or isn't broken. Still, how much swap

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> That's insane. Really. The designer(s) of the test suite had bigger systems in mind, so there's lots of stuff running concurrently.

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Charles Forsyth
On 13 April 2016 at 15:42, Charles Forsyth wrote: > On 13 April 2016 at 15:39, Richard Miller <9f...@hamnavoe.com> wrote: > >> If you want to get to the satisfying ALL TESTS PASSED message at the end >> of the go install+test process, you will need a swap file, >> > >

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Charles Forsyth
On 13 April 2016 at 15:39, Richard Miller <9f...@hamnavoe.com> wrote: > If you want to get to the satisfying ALL TESTS PASSED message at the end > of the go install+test process, you will need a swap file, > That's insane. Really.

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> It won't need a swap file unless the program forces all that to be > allocated, which it shouldn't, If you want to get to the satisfying ALL TESTS PASSED message at the end of the go install+test process, you will need a swap file, even on a 1GB raspberry pi. Trust me.

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Kenny Lasse Hoff Levinsen
I tried that at some point. Got pi2 booting with one core, crashed with multiple, but then again, I'm new to having to be that intimate with assembly and kernel mode. I'd suggest trying from scratch to port things, but there are a few 9front differences that make it much more than just a diff.

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Charles Forsyth
On 13 April 2016 at 14:08, Chris McGee wrote: > I believe that my rpi only has the 512MB of RAM so I’ll add swap. It should be enough to increase the available virtual space by changing that #define. It won't need a swap file unless the program forces all that to be

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Chris McGee
Ah, that makes sense. It’s virtual memory and not the physical memory. Do you think that your changes to the bcm will make it to 9front? If not, any chance I could have the diffs so that I can try merging them in there myself? Thanks, Chris

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> I didn’t realize that Go was so virtual memory hungry. I wonder why stats > didn’t show me a large peak of memory consumption before the go compiler died? stats -m shows physical memory usage. Every go program starts by allocating a huge block of virtual space for its garbage-collected

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Chris McGee
Thanks Richard for doing the go port to plan9/arm. I was going to start on that myself until I found out it was already done. :-) I didn’t realize that Go was so virtual memory hungry. I wonder why stats didn’t show me a large peak of memory consumption before the go compiler died? Perhaps it

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> I tried a bootstrapped version on my RPi but it fails with a "fork/exec ... > virtual memory allocation failed” error when I try to compile anything. Go needs a lot of virtual memory - it won't even pass the installation test suite if you give it less than a gigabyte. That was the reason for

Re: [9fans] Go on Plan 9?

2016-04-13 Thread Richard Miller
> I tried a bootstrapped version on my RPi but it fails with a "fork/exec ... > virtual memory allocation failed” error when I try to compile anything. Go needs a lot of virtual memory - it won't even pass the installation test suite if you give it less than a gigabyte. That was the reason for

Re: [9fans] Go on Plan 9?

2016-04-13 Thread lucio
> Skip, isn't the point here that being able to run go binaries > in Plan 9 on an arm machine is news to most Plan 9 users? Go seems a little outside the scope of a Plan 9 release and I think it would take a greater interest by the community to bring it in. I seem to recall that Quanstro's 9atom

Re: [9fans] Go on Plan 9?

2016-04-13 Thread lucio
> I tried a bootstrapped version on my RPi but it fails with a > "fork/exec ... virtual memory allocation failed” error when I try to > compile anything. According to stats I have plenty of memory left > when it runs. I’m not sure what to make of it. Any idea if the port > is complete or if

Re: [9fans] Go on Plan 9?

2016-04-13 Thread lucio
> Next to try on Plan 9: build a linux/s390x binary and find a machine to run > it on :) I have certainly done that with linux/386 under Plan 9. It works like a charm, even if the compilation is a lot slower than doing it natively on the target machine (which I could eventually install Go on).

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Chris McGee
I see now that there is plan9/arm in tip (1.7), but not 1.6. I tried a bootstrapped version on my RPi but it fails with a "fork/exec ... virtual memory allocation failed” error when I try to compile anything. According to stats I have plenty of memory left when it runs. I’m not sure what to

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Skip Tavakkolian
I think Richards' CL's were submitted to main Go repo before Go 1.6 and are now in 1.7 dev branch (tip). I believe I first saw the announcement on godev list. as a Go user, it is a good way of keeping up with the fast-paced development; e.g. IBM's linux/s390x port went in today! I usually keep

Re: [9fans] Go on Plan 9?

2016-04-12 Thread sl
Skip, isn't the point here that being able to run go binaries in Plan 9 on an arm machine is news to most Plan 9 users? Perhaps even news to those who regularly use go on Plan 9. sl

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Chris McGee
Thanks, I'll give it a shot. I noticed that there are some assembly files in golang for plan9/386 and no equivalent for plan9/arm so I assumed that it wouldn't work with that combination. Chris > On Apr 12, 2016, at 5:26 PM, Skip Tavakkolian > wrote: > > i've

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Skip Tavakkolian
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

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Dave MacFarlane
I've managed to get Go running on an RPi2 using a similar method, but: 1. You need to make sure you're using go-tip. <= 1.6 doesn't have Plan9/arm support. 2. I had to apply this patch that Richard Miller sent me to my kernel: term% diff /n/sources/contrib/miller/9/bcm/mem.h /sys/src/9/bcm/mem.h

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Chris McGee
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 > >

Re: [9fans] Go on Plan 9?

2016-04-12 Thread Skip Tavakkolian
Yes, this works and is the easier of the two methods. Using a desktop OS and starting no Go compilers: 1. download the Go 1.6 binaries for your desktop OS and install them; set GOROOT_BOOTSTRAP to that directory (e.g. /usr/local/go) 2. copy the Go 1.6 sources (either the tar.gz or git clone of

Re: [9fans] Go on Plan 9?

2016-04-11 Thread Chris McGee
Hi All, A while back there was a thread about getting newer versions of Go running on plan9. In particular there was a panic related to a floating point error. In case anyone is interested I have managed to get the newest version of Go working on plan9/386 within virtualbox despite having a

Re: [9fans] Go on Plan 9?

2016-01-27 Thread Charles Forsyth
On 27 January 2016 at 01:40, Sean Caron wrote: > update process running: > > replica/pull -v /dist/replica/network > Beware that the introduction of the nsec system call can cause trouble if replica updates commands before you're running the new kernel.

Re: [9fans] Go on Plan 9?

2016-01-26 Thread David du Colombier
> Yeah, thank goodness for snapshots :O Running replica/pull didn't turn out > so good for my current running system. It looks like it might make the most > sense to just archive my home directory and reload a fresh VM ... > > Where are they keeping the most current installation ISO these days?

Re: [9fans] Go on Plan 9?

2016-01-26 Thread lucio
> Where are they keeping the most current installation ISO these days? I'm > just not sure of what's canonical now that the old bell-labs.com domain is > offline. David is in charge of legacy Plan 9 outside of Bell Labs. His instructions were pretty explicit, but if you run into trouble I'll be

Re: [9fans] Go on Plan 9?

2016-01-26 Thread sl
>From http://fqa.9front.org/appendixl.html: # automatically converted ca certs from mozilla.org hget http://curl.haxx.se/ca/cacert.pem >/sys/lib/tls/ca.pem # shell script that emulates git commands hget http://9front.org/extra/rc/git >$home/bin/rc/git chmod 

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Kenny Lasse Hoff Levinsen
Go builds just fine right now on the plan9 builders: http://build.golang.org 1.4 and 1.5 are very different, due to 1.5 being written in Go. i386 and amd64 should both build, although amd64 fails an irrelevant unittest. What do you see with 1.5.2/1.5.3? (You said you tried?) Best regards,

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Skip Tavakkolian
All the errors seem related to the old Rune size. I suspect you're running an old system and it's likely to not have nsec and tsemacquire syscalls either. If you believe the system is up-to-date, you can cross compile a simple Go program using 1.5 or later targeting GOOS=plan9 GOARCH=386 from a

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Sean Caron
Thanks, Skip. That would follow; this system is probably straight Fourth Edition, certainly an old ISO... I've never been 100% clear on the process for running updates; can I bring myself up to current from where I'm at now and not have to reload or build a fresh system? It's a VM and I can

Re: [9fans] Go on Plan 9?

2016-01-26 Thread David du Colombier
> All the errors seem related to the old Rune size. I suspect you're running > an old system and it's likely to not have nsec and tsemacquire syscalls > either. > > If you believe the system is up-to-date, you can cross compile a simple Go > program using 1.5 or later targeting GOOS=plan9

Re: [9fans] Go on Plan 9?

2016-01-26 Thread sl
> Go builds just fine right now on the plan9 builders: http://build.golang.org > > 1.4 and 1.5 are very different, due to 1.5 being written in Go. i386 and > amd64 should both build, although amd64 fails an irrelevant unittest. > > What do you see with 1.5.2/1.5.3? (You said you tried?) Note:

Re: [9fans] Go on Plan 9?

2016-01-26 Thread David du Colombier
> I'm looking at the directions in a (cached copy) of > http://plan9.bell-labs.com/wiki/plan9/Staying_up_to_date/index.html... > > Is that still valid? What's the canonical procedure these days for updating > a system? > > If that's roughly correct ... I'm running a single Plan 9 machine, combined

Re: [9fans] Go on Plan 9?

2016-01-26 Thread David du Colombier
> Note: I'm running 9front. I can build on amd64 but not 386. Last attempt > was 1.5 on 386, bootstrapped with 1.4.2: > > dl; go version > go version go1.4.2 plan9/386 > dl; GOROOT_BOOTSTRAP=/usr/local/go > dl; ./make.rc > # Building Go bootstrap tool. >

Re: [9fans] Go on Plan 9?

2016-01-26 Thread David du Colombier
> % 9fs sources > % 9fat: > % cp /n/sources/plan9/386/9pcf /n/9fat > % cp /n/sources/plan9/386/9pccpu /n/9fat > % hget http://www.9legacy.org/download/kernel/9pccpuf >/n/9fat Of course, I mean: hget http://www.9legacy.org/download/kernel/9pccpuf >/n/9fat/9pccpuf -- David du Colombier

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Matthew Veety
Also the ports tree[1] version of golang should install fine. I haven't tried it in a while, but also haven't changed it so it should work. That will grab the ca certs and install (I think) 1.3. -- Veety

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Sean Caron
Answering my own silly question, on my fossil-based system, running the following command on the console as the bootes user seems to get the update process running: replica/pull -v /dist/replica/network I'll wait for this to complete and then give building Go another shot. Thanks for answering

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Skip Tavakkolian
Sean, David's (0intro) instructions are the right way to do it. If I recall correctly, if you want to update by rebuilding from updated sources, there's a careful dance that needs to happen for the transition from old Rune size to the new. Geoff sent out a note to 9fans outlining the steps at

Re: [9fans] Go on Plan 9?

2016-01-26 Thread Sean Caron
Yeah, thank goodness for snapshots :O Running replica/pull didn't turn out so good for my current running system. It looks like it might make the most sense to just archive my home directory and reload a fresh VM ... Where are they keeping the most current installation ISO these days? I'm just