Skip to content

Building from source

yindra edited this page Sep 27, 2019 · 8 revisions


This document describes how to build the source code using the Go toolchain.

Pat is dependent on some C libraries, so a C compiler (gcc/clang) must be available in addition to the Go toolchain.


  • Git
  • Latest stable Go (>=1.5) with cgo enabled
  • A configured GOPATH

The fast route

If you're building with Go 1.5, be sure to export GO15VENDOREXPERIMENT=1 before running go get. This is not needed with Go 1.6 or later.

$ go get -u

go get will download the latest release of Pat (including dependencies), build and install the binary at $GOPATH/bin/pat.

The long route

The source code must live inside your Go workspace ($GOPATH). Clone the repository to $GOPATH/src/

git clone $GOPATH/src/
cd $GOPATH/src/

The master branch is the stable branch for Pat, this is where you'll find the latest released Pat version.

Initialize and update all git submodules:

$ git submodule update --init --recursive

Linux only: download and build libax25

$ ./make.bash libax25

Build using the make.bash-script:

$ ./make.bash

The build output is ./pat which is a self-contained binary.

Build tags

Build tags can be used to enable additional features for the build:

  • libhamlib: Link against libhamlib for serial/usb rig control (no rigctld required).
  • libax25: Link against libax25 to enable Linux's AX.25 implementation.

To enable both features when using go get:

$ go get -tags 'libax25 libhamlib'

make.bash uses the $TAGS environment variable for this purpose:

$ TAGS="libax25 libhamlib" ./make.bash

Debian packaging

dpkg-buildpackage -d -us -uc
You can’t perform that action at this time.