Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The Moonshot source code is available from our GIT repository and it all can be built by hand relatively easier, assuming you have all of the prerequisite packages installed. This page has instructions for building the software itself.



This page is still under construction

1. System Preparation

1.1. Requirements

To build all of the Moonshot components, you need various packages installed. To install all of these, see below.

1.1.1. Get the required packages on macOS El Capitan

To get all of the requirements on El Capitan, you will need to install Xcode, the Xcode command-line extensions, and several GNU tools:

  1. Install Xcode from the Mac App Store.

  2. Open a Terminal, then install the Xcode Command Line Tools. You will be prompted with a dialog to install the Command Line Tools after a 130MB download.

    $ xcode-select --install
  3. Install the GNU tools that are required for Moonshot by following the instructions at How to install Autoconf, Automake and related tools on Mac OS X from source?

  4. Install GNU GetText:

    $ curl -O -L
    $ tar -xzf gettext-latest.tar.gz
    $ cd gettext-*
    $ ./configure
    $ make && sudo install
  5. Install MacPorts by downloading the latest install package from, then update it:

    $ sudo port -v selfupdate
  6. Install Makedepend from MacPorts:

    $ sudo port install makedepend
  7. Update CPAN and install JSON:

    $ sudo cpan install JSON

2. Download and build the required external dependencies:

2.1.1. OpenSSL

  1. Create a directory called openssl.
  2. Download the OpenSSL build tree from Apple's OpenSource site. Some scripts that Apple provides will be needed.

    $ cd openssl && curl -OL
  3. Download the latest OpenSSL build from the OpenSSL website. We will build this version.

    $ curl -OL
  4. Extract OpenSSL098-59.60.1, copy its 'bin' directory into the openssl directory, then delete the extracted source

2.1.2. Boost

2.1.3. Heimdal

2.1.4. Xerces-C

2.1.5. XML-Security-C

2.1.6. LibConfuse

2.1.7. LibEvent

3. Checkout the Moonshot source

The Moonshot source code is all stored in a GIT repository. To fetch it, issue the following command.

$ git clone --recursive

4. Build Moonshot

To build Moonshot, simply enter the moonshot directory of the git repo that you just checked out, and run the builder script. In the --prefix option, you can specify where the code will be installed to. Note that you will need to build as a user who has permission to install in the target directory, because the builder script installs during the build, instead of doing an install after the build has finished (so you can't build first as an underprivileged user and install as a superuser as you would normally do).

$ cd moonshot && ./builder --prefix=/opt/moonshot

You probably know this, but if you stuck your installation into an unusual location, you may need to do the following (as root) - where, here, /opt/moonshot is the install path you used for the prefix option above:

# echo /opt/moonshot/lib >/etc/
# ldconfig

(TODO: document /etc/init.d/ stuff?)

  • No labels