Go lang on OS X (lion)

Recently I’ve moved from linux to OS X, yep I’m using a so-called “hackintosh”.   Having spent the past week learning how to live in the environment, which for the record I really live, it’s time to hack some Go!

Prerequisites

As the Go lang site says, you need Xcode installed first off, so head off and find Xcode in App Store and install it.

Additionally I’ve installed and used MacPorts, primarily because I wanted some other unix tools but I’ve also used it to install Mercurial. To install mercurial open a terminal and run the following command :

sudo port install mercurial

Get the Go sources

As the Go lang getting started page shows, you can use mercurial to download the sources:

 hg clone -u release https://go.googlecode.com/hg/ go

And build it :

cd go/src
./all.bash

That’s about it, as long as you see that all tests have passed.  Of course you probably want to edit your .bashrc to include your local environmental variables but that’s been documented many times before.

 

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

2 Responses to Go lang on OS X (lion)

  1. Foo says:

    There’s a MUCH easier way to do all of the above: http://mxcl.github.com/homebrew/ has both Go and Mercurial in it.

  2. Mercurial is a Python tool, you better install it using pip or easy_instal:

    $ [sudo] easy_install mercurial

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>