Golang Legacy Tutorial

This tutorial describes how to compile and install 1.3+ version releases of the gc implementation of the Go compiler from source.

  1. If you haven't done so already, run through the Tutorial Prerequisites Tutorial.

  2. If you already have Go installed, then uninstall it.

  3. Create the build environment. Run the following commands.

    cd /usr
    sudo make dports-create-shallow

  4. Update the Go version number. Skim through /usr/dports/lang/go/Makefile to find the following line.

    PORTVERSION= 1.3.2

    Then edit the previous line to match the following line and save the change to disk.

    PORTVERSION= 1.4rc1

  5. Compile and install Go. Run the following commands.

    cd /usr/dports/lang/go
    sudo make makesum
    sudo make
    sudo cp -p -r /usr/obj/dports/lang/go/work/go /usr/local/go
    sudo cp -p /usr/obj/dports/lang/go/work/go/bin/* /usr/local/bin/

  6. Configure Go. Continue from step 3 of the Golang Tutorial.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License