Recommended way to build go 1.5 on ppc64le

487 views
Skip to first unread message

lab...@linux.vnet.ibm.com

unread,
May 12, 2015, 9:14:31 AM5/12/15
to golan...@googlegroups.com
Hi,

Last time I tried, the build of go 1.5 on ppc64le it required a go 1.4 build somewhere to bootstrap from.  Since go 1.4 is not supported on Power (ppc64le or ppc64(be)) you can't just build go 1.4 on ppc64le.

What I have been doing is building from the master branch using a commit from before this requirement was introduced as my bootstrap go and then building from the latest master source on ppc64le.  (This was suggested by Russ Cox months ago.)

Is that still the recommended method?  It seems like my bootstrap go compiler on ppc64le could be outdated if I build this way (or maybe it doesn't matter for the bootstrap compiler)?

- Lynn

Dave Cheney

unread,
May 12, 2015, 9:17:39 AM5/12/15
to lab...@linux.vnet.ibm.com, golan...@googlegroups.com
You can cross compile a bootstrap compiler from the 1.5 sources

env GOOS=linux GOARCH=ppc64le ./bootstrap.bash

Cooy that file to the target, unpack it and use that location as GO_BOOTSTRAP_ROOT


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hudson-Doyle

unread,
May 12, 2015, 6:09:16 PM5/12/15
to Dave Cheney, lab...@linux.vnet.ibm.com, golan...@googlegroups.com
You should also be able to bootstrap with gccgo-5.

Dave Cheney

unread,
May 12, 2015, 6:09:46 PM5/12/15
to Michael Hudson-Doyle, lab...@linux.vnet.ibm.com, golan...@googlegroups.com
Yes. That is true. Both should work just fine (and I've tested it both ways)

minux

unread,
May 12, 2015, 6:49:18 PM5/12/15
to golang-dev
It's possible to use commits on dev.power64 to complete bootstrap in a
three step process without cross compiling on another host or gccgo.

Build Go 1.4 cmd/dist (this is a C program), and use it to build the last
commit in dev.power64. (In that branch, all toolchains are still in C, only
the dist tool is in Go.)

But that toolchain is buggy, so it can'be used to bootstrap Go 1.5. Instead,
you need to use that to bootstrap rev 2e78447bafc2dfdfa8b75e01ca3e681741706bbc
on the master branch.

And then you have a working toolchain that could be used to bootstrap Go
1.5. After you've bootstrapped Go 1.5, you can use it to bootstrap future
revisions.

I've tested this process recently when trying to bootstrap Go on linux/ppc64
system with only gcc. I think the linux/ppc64le process should be similar.
(The 2nd commit is essential for linux/ppc64 but not so essential for ppc64le)

Russ Cox

unread,
May 13, 2015, 2:27:21 PM5/13/15
to minux, golang-dev
It's nice that you can do this, but it seems like a lot more work than running bootstrap.bash on a non-ppc64 system. There are still x86 machines here and there.

Russ
Reply all
Reply to author
Forward
0 new messages