From: Anthony Martin <ality@pbrane.org>
To: 9fans@9fans.net
Subject: [9fans] Building Go on Plan 9
Date: Thu, 1 Dec 2011 09:48:58 -0800 [thread overview]
Message-ID: <20111201174858.GA23075@dinah> (raw)
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
A few people were asking about this so I
wrote up a tutorial. I also uploaded a
copy to http://apm.sdf.org/go/NOTES for
anyone who has trouble with attachments.
Cheers,
Anthony
[-- Attachment #2: NOTES --]
[-- Type: text/plain, Size: 3642 bytes --]
# Building Go on Plan 9
# Anthony Martin
# ality@pbrane.org
# This document will guide you through the process
# of compiling the commands and packages in the Go
# source code distribution.
#
# Before we get started you should make sure you
# have GNU Make installed. The version on contrib
# is 3.81 and is just fine for our purposes.
#
# It's also necessary to have Mercurial installed
# and I believe there is a version on contrib as
# well.
#
# After reading this document you can extract the
# commands and pipe them to the shell using:
#
# sed -n 's,^[% ] ,,p' NOTES | rc
#
# I highly recommend reading all the way through
# before running the commands.
#
# First we must fetch the archive that contains
# modified include files, a build script, and a
# patch consisting of all pending (and not yet
# submitted) CLs pertaining to Plan 9.
% cd /tmp
% hget http://apm.sdf.org/go/root.tbz >root.tbz
# Next we must verify the SHA1 hash of the archive.
% want = ed25980b3b813b1c80506b56331d83c4d485a4c0
% have = `{sha1sum root.tbz | awk '{print $1}'}
% if(! ~ $have $want){
echo 'ZOMG! INVALID SHA1 CHECKSUM'
echo have: $have
echo want: $want
exit badhash
}
# Now we're ready to fetch the source code for the
# Go repository hosted at Google Code. I had to
# make a decision about where this would reside so
# after a bit of thinking I chose /sys/src/go to
# mirror the structure of APE.
#
# The other important directories that will be
# created when extracting the archive are:
#
# /386/bin/go (for binaries),
# /386/include/go (for machine dependent C headers),
# /386/lib/go (for Go's C libraries),
# and
# /sys/include/go (for machine independent C headers).
% cd /sys/src
% hg clone -u 2d7711ae https://go.googlecode.com/hg/ go
requesting all changes
adding changesets
adding manifests
adding file changes
added 10641 changesets with 40432 changes to 5437 files (+4 heads)
updating to branch default
3231 files updated, 0 files merged, 0 files removed, 0 files unresolved
# After fetching the Go repository we can extract
# the archive into the file system's root. It's
# always a good idea to check the contents of an
# archive before doing something this drastic.
% cd /
% tar xvzf /tmp/root.tbz
tar: blocking = 16
386
386/bin
386/bin/go
386/include
386/include/go
386/include/go/ureg_x86.h
386/include/go/ureg_amd64.h
386/include/go/u.h
386/include/go/ureg_arm.h
386/lib
386/lib/go
sys
sys/include
sys/include/go
sys/include/go/bootexec.h
sys/include/go/mach.h
sys/include/go/ar.h
sys/include/go/bio.h
sys/include/go/stdio.h
sys/include/go/libc.h
sys/include/go/goenv.h
sys/src
sys/src/go
sys/src/go/9fix.patch
sys/src/go/src
sys/src/go/src/make.rc
# We're almost done. We can now apply the patch file
# into the root of the Go tree.
% cd /sys/src/go
% ape/patch -p1 < 9fix.patch
# Our final step is to build the commands and packages.
# Running make.rc will produce tons of output so you
# might want to redirect it to a file.
% cd src
% ./make.rc
# Now that you have a working build of Go you
# should help me make sure all of the tests pass. :-)
# Email me if you're interested in helping out.
#
# In other news, I'm working on setting up an
# an automated builder so we can include Plan 9
# in the Go Dashboard.
#
# Also, please don't submit any of the changes in
# the patch file to the Go development list. Most
# of the changes have corresponding CLs and the few
# others are still being pondered.
#
# That's all for now. Have fun!
next reply other threads:[~2011-12-01 17:48 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 17:48 Anthony Martin [this message]
2011-12-01 17:51 ` erik quanstrom
2011-12-01 18:00 ` John Floren
2011-12-01 18:05 ` Stanley Lieber
2011-12-01 18:14 ` Anthony Martin
2011-12-01 18:19 ` Charles Forsyth
2011-12-01 18:25 ` Lyndon Nerenberg
2011-12-01 19:07 ` Anthony Martin
2011-12-01 19:54 ` Lyndon Nerenberg
2011-12-02 3:39 ` Lucio De Re
2011-12-02 14:33 ` Anthony Martin
2011-12-02 14:57 ` erik quanstrom
2011-12-02 15:23 ` Anthony Martin
2011-12-02 17:14 ` Skip Tavakkolian
2011-12-02 15:19 ` Lyndon Nerenberg
2011-12-02 15:59 ` Lucio De Re
2011-12-02 16:09 ` Lucio De Re
2011-12-02 17:24 ` ron minnich
2011-12-02 17:55 ` Lyndon Nerenberg
2011-12-02 17:58 ` Francisco J Ballesteros
2011-12-02 18:19 ` ron minnich
[not found] ` <CAP6exYKKqsc0Kwyhxp_LiXf0oRUJ79UYWZM=Ugp2WPZ7TZATwQ@mail.gmail.c>
2011-12-02 21:42 ` erik quanstrom
2011-12-02 22:12 ` andrey mirtchovski
2011-12-02 22:13 ` andrey mirtchovski
2011-12-02 17:58 ` Lyndon Nerenberg
2011-12-02 18:01 ` erik quanstrom
2011-12-02 6:34 ` ron minnich
2011-12-02 6:42 ` Lucio De Re
2011-12-02 8:49 ` Francisco J Ballesteros
2011-12-02 17:21 ` ron minnich
2011-12-01 18:28 ` Anthony Martin
2011-12-01 18:30 ` erik quanstrom
2011-12-01 18:45 ` Anthony Martin
2011-12-01 18:48 ` Anthony Martin
2011-12-01 18:18 ` Anthony Martin
2011-12-02 14:40 ` Pavel Zholkover
2011-12-02 14:57 ` Anthony Martin
2011-12-02 20:25 ` [9fans] go v. mk Lyndon Nerenberg
2011-12-02 20:37 ` ron minnich
2011-12-03 0:06 ` Steve Simon
2011-12-03 0:11 ` Lyndon Nerenberg
2011-12-03 0:12 ` ron minnich
2011-12-05 0:32 ` Federico Benavento
2011-12-05 0:44 ` John Floren
2011-12-05 12:20 ` Federico Benavento
2011-12-27 14:38 ` Aram Hăvărneanu
2011-12-01 19:20 [9fans] Building Go on Plan 9 lsub
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111201174858.GA23075@dinah \
--to=ality@pbrane.org \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).