9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Go on Plan 9?
@ 2016-04-12  0:59 Chris McGee
  2016-04-12 19:01 ` Skip Tavakkolian
  0 siblings, 1 reply; 43+ messages in thread
From: Chris McGee @ 2016-04-12  0:59 UTC (permalink / raw)
  To: 9fans

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 similar floating point error as was mentioned here before in that thread.

1) Download, extract and compile Go 1.4.3 from the source tarball
New versions of Go require older versions in order to compile through a bootstrapping process.
This is the last version that can be compiled without bootstrapping.
Modify the include/plan9/386/u.h and remove the line that has a typedef for intptr (in my 9front install this is already declared elsewhere).
Run the make.rc script in the src directory (don’t run all of the tests as many of them appear to fail)

2) Download, extract and compile Go 1.5.3
Set GOROOT_BOOTSTRAP to the go directory for 1.4.3 compiled above
Set GO386=387 (this is important as there appears to be a problem with sse2 floating point with Go in my environment - plan9/386/virtualbox)
https://github.com/golang/go/issues/15234
Run the make.rc script (skip the tests for now)

3) Download, extract and compile Go 1.6
Set GOROOT_BOOTSTRAP to the 1.5.3 go directory
Run the all.rc script

Step 2 may not be necessary, but it worked for me this way.

It may also be possible to cross compile a bootstrap of Go from Linux/Mac/Windows using the bootstrap.sh script after setting GOOS=plan9, GOARCH=386 and GO386=387. That bootstrap can be placed into plan9 and used as the GOROOT_BOOTSTRAP to compile a full Go installation on the plan9 system.

I hope that this is useful information for others who are trying to get Go working on plan9.

Cheers,
Chris


^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: [9fans] Go on Plan 9?
@ 2016-01-26 21:52 sl
  2016-01-26 22:03 ` Kenny Lasse Hoff Levinsen
  2016-01-27  1:29 ` Matthew Veety
  0 siblings, 2 replies; 43+ messages in thread
From: sl @ 2016-01-26 21:52 UTC (permalink / raw)
  To: 9fans

>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 775 $home/bin/rc/git
	# fetch the repository
	git clone https://go.googlesource.com/go
	cd go
	git checkout go1.4.2
	# build go
	cd src
	./make.rc
	# install documentation
	go get golang.org/x/tools/cmd/godoc
	# go!

Newer versions of go seem to have problems with Plan 9.

sl



^ permalink raw reply	[flat|nested] 43+ messages in thread
* [9fans] Go on Plan 9?
@ 2016-01-26 21:44 Sean Caron
  2016-01-26 22:05 ` Skip Tavakkolian
  0 siblings, 1 reply; 43+ messages in thread
From: Sean Caron @ 2016-01-26 21:44 UTC (permalink / raw)
  To: 9fans, Sean Caron

[-- Attachment #1: Type: text/plain, Size: 5011 bytes --]

Hi all,

I've been getting interested in programming in Go recently and it's my
understanding that at some point in time, Plan 9 was a supported
environment in which one could bootstrap and use Go?

I've tried a few different versions; 1.2.2, 1.4.2, 1.5.2, just following
the directions that I found on a blog somewhere, i.e:

tar xf go 1.4.2.tar
cd go-go1.4.2/src
./all.rc

But it fails almost immediately trying to bootstrap Go:

cpu% ./all.rc
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, plan9/386.
lib9
cpp: /usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:226
/usr/scaron/go-go1.4.2/include/plan9/../utf.h:1
/usr/scaron/go-go1.4.2/include/plan9/utf.h:5
/usr/scaron/go-go1.4.2/include/plan9/../fmt.h:21
/usr/scaron/go-go1.4.2/include/plan9/fmt.h:5
/usr/scaron/go-go1.4.2/include/plan9/libc.h:6
/usr/scaron/go-go1.4.2/src/lib9/flag.c:6 Unterminated string or char const

I get a fair number of these errors for various header files, then some
more worrisome output:

/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/dorfmt.c:152]
external redeclaration of: Rune
TYPEDEF UINT
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/dorfmt.c:152]
TYPEDEF USHORT
/386/include/u.h:11[/usr/scaron/go-go1.4.2/src/lib9/fmt/dorfmt.c:21]
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/flag.c:153]
external redeclaration of: Rune
TYPEDEF UINT
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/flag.c:153]
TYPEDEF USHORT
/386/include/u.h:11[/usr/scaron/go-go1.4.2/src/lib9/flag.c:22]
cpp: /usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:227
/usr/scaron/go-go1.4.2/include/plan9/../utf.h:1
/usr/scaron/go-go1.4.2/include/plan9/utf.h:5
/usr/scaron/go-go1.4.2/include/plan9/libc.h:7
/usr/scaron/go-go1.4.2/src/lib9/fmt/charstod.c:20 Unterminated string or
char const
go tool dist: FAILED: /bin/8c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/scaron/go-go1.4.2/include/plan9
-I/usr/scaron/go-go1.4.2/include/plan9/386 -DPLAN9PORT -I
/usr/scaron/go-go1.4.2/src/lib9 -o $WORK/dorfmt.8
/usr/scaron/go-go1.4.2/src/lib9/fmt/dorfmt.c:
'/usr/scaron/go-go1.4.2/pkg/obj/plan9_386/lib9.a' does not exist
go tool dist: FAILED: /bin/8c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/scaron/go-go1.4.2/include/plan9
-I/usr/scaron/go-go1.4.2/include/plan9/386 -DPLAN9PORT -I
/usr/scaron/go-go1.4.2/src/lib9 -o $WORK/flag.8
/usr/scaron/go-go1.4.2/src/lib9/flag.c:
'/usr/scaron/go-go1.4.2/pkg/obj/plan9_386/lib9.a' does not exist
cpp: /usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:227
/usr/scaron/go-go1.4.2/include/plan9/../utf.h:1
/usr/scaron/go-go1.4.2/include/plan9/utf.h:5
/usr/scaron/go-go1.4.2/include/plan9/libc.h:7
/usr/scaron/go-go1.4.2/src/lib9/fmt/dofmt.c:20 Unterminated string or char
const
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/charstod.c:152]
external redeclaration of: Rune
TYPEDEF UINT
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/charstod.c:152]
TYPEDEF USHORT
/386/include/u.h:11[/usr/scaron/go-go1.4.2/src/lib9/fmt/charstod.c:21]
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/dofmt.c:152]
external redeclaration of: Rune
TYPEDEF UINT
/usr/scaron/go-go1.4.2/include/plan9/../../src/lib9/utf/utf.h:19[/usr/scaron/go-go1.4.2/src/lib9/fmt/dofmt.c:152]
TYPEDEF USHORT
/386/include/u.h:11[/usr/scaron/go-go1.4.2/src/lib9/fmt/dofmt.c:21]
go tool dist: FAILED: /bin/8c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/scaron/go-go1.4.2/include/plan9
-I/usr/scaron/go-go1.4.2/include/plan9/386 -DPLAN9PORT -I
/usr/scaron/go-go1.4.2/src/lib9 -o $WORK/charstod.8
/usr/scaron/go-go1.4.2/src/lib9/fmt/charstod.c:
'/usr/scaron/go-go1.4.2/pkg/obj/plan9_386/lib9.a' does not exist
go tool dist: FAILED: /bin/8c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/scaron/go-go1.4.2/include/plan9
-I/usr/scaron/go-go1.4.2/include/plan9/386 -DPLAN9PORT -I
/usr/scaron/go-go1.4.2/src/lib9 -o $WORK/dofmt.8
/usr/scaron/go-go1.4.2/src/lib9/fmt/dofmt.c:
'/usr/scaron/go-go1.4.2/pkg/obj/plan9_386/lib9.a' does not exist

At that point the build fails and I drop back to the rc prompt.

While the example I cite above is for version 1.4.2, I believe the failure
mode is pretty much the same for both earlier and later versions that I've
tried to build.

Is my Plan 9 installation "too old"? I'm using pretty bog-standard Fourth
Edition on this particular instance; 9atom doesn't seem to get along with
VMware ESXi (at least, not last time I checked).

Any help greatly appreciated! I'd love to be able to use Go within Plan 9.

Thanks,

Sean

[-- Attachment #2: Type: text/html, Size: 5978 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2016-04-13 20:38 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12  0:59 [9fans] Go on Plan 9? Chris McGee
2016-04-12 19:01 ` Skip Tavakkolian
2016-04-12 19:21   ` Chris McGee
2016-04-12 19:50     ` Dave MacFarlane
2016-04-12 21:26     ` Skip Tavakkolian
2016-04-13  0:18       ` Chris McGee
2016-04-12 21:44   ` sl
2016-04-13  2:50     ` Skip Tavakkolian
2016-04-13  2:59       ` Chris McGee
2016-04-13  7:27         ` lucio
2016-04-13  9:10         ` Richard Miller
2016-04-13  9:10         ` Richard Miller
2016-04-13 13:08           ` Chris McGee
2016-04-13 13:46             ` Richard Miller
2016-04-13 14:00               ` Chris McGee
2016-04-13 14:32                 ` Kenny Lasse Hoff Levinsen
2016-04-13 14:32             ` Charles Forsyth
2016-04-13 14:39               ` Richard Miller
2016-04-13 14:42                 ` Charles Forsyth
2016-04-13 14:46                   ` Richard Miller
2016-04-13 14:46                   ` Charles Forsyth
2016-04-13 14:52                 ` lucio
2016-04-13 16:12                   ` Richard Miller
2016-04-13  7:21       ` lucio
2016-04-13  7:34     ` lucio
2016-04-13 20:38       ` Skip Tavakkolian
  -- strict thread matches above, loose matches on Subject: below --
2016-01-26 21:52 sl
2016-01-26 22:03 ` Kenny Lasse Hoff Levinsen
2016-01-26 22:29   ` sl
2016-01-26 22:38     ` David du Colombier
2016-01-27  1:29 ` Matthew Veety
2016-01-26 21:44 Sean Caron
2016-01-26 22:05 ` Skip Tavakkolian
2016-01-26 22:16   ` Sean Caron
2016-01-26 22:32     ` David du Colombier
2016-01-26 22:40       ` David du Colombier
2016-01-27  1:40     ` Sean Caron
2016-01-27  1:52       ` Skip Tavakkolian
2016-01-27  2:24         ` Sean Caron
2016-01-27  4:04           ` lucio
2016-01-27  6:25           ` David du Colombier
2016-01-27 13:45       ` Charles Forsyth
2016-01-26 22:19   ` David du Colombier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).