# Getting the Source Code — SeisComP Release documentation

6.9.0

# Getting the Source Code

Caution

For production systems only install the officially released packages from Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [67], gempa GmbH [28] or compile from the corresponding release tags in this repository.

The SeisComP software collection is distributed among several repositories. For more information about compilation and build configuration head over to SeisComP on GitHub [1].

For building a complete SeisComP distribution checkout all repositories using the following script:

    #!/bin/bash

    if [ $# -eq 0 ]
    then
        echo "$0 <target-directory>"
        exit 1
    fi

    target_dir=$1
    repo_path=https://github.com/SeisComP

    echo "Cloning base repository into $1"
    git clone $repo_path/seiscomp.git $1

    echo "Cloning base components"
    cd $1/src/base
    git clone $repo_path/seedlink.git
    git clone $repo_path/common.git
    git clone $repo_path/main.git
    git clone $repo_path/extras.git

    echo "Cloning external base components"
    git clone $repo_path/contrib-gns.git
    git clone $repo_path/contrib-ipgp.git
    git clone https://github.com/swiss-seismological-service/sed-SeisComP-contributions.git contrib-sed

    echo "Done"

    cd ../../

    echo "If you want to use 'mu', call 'mu register --recursive'"
    echo "To initialize the build, run 'make'."

# Compiling SeisComP from Source Code

To build from source you will need to clone from one or more repositories as described in Getting the Source Code.

Before building, install all the dependencies, as described below in Software dependencies.

The easiest way to compile SeisComP is to use the `Makefile` file provided which creates a build directory inside the source tree.

Perform the following steps:

- Clone all required repositories (see above)

- Run `make`

- Configure the build

- Press ‘c’ as long as ‘g’ appears

- Press ‘g’ to generate the Makefiles

- Enter the build directory and run `make install`

By default all files are installed under `$HOME/seiscomp`. This location can be changed with cmake or with its front end ccmake.

Basically the build directory can live anywhere. The following steps create a build directory, configure the build and start it:

    $ mkdir sc-build
    $ cd sc-build
    $ ccmake /path/to/sc-src
    # Configure with ccmake
    $ make install

## Software dependencies

For compiling the SeisComP sources the following development software packages are required (Debian/Ubuntu package names):

- g++

- git

- cmakecmake-gui

- libboost

- libxml2-dev

- flex

- libfl-dev

- libssl-dev

- crypto-dev

- python3-dev (optional)

- python3-numpy (optional, required if Numpy support is enabled which is also the default configuration)

- libqt5-dev (optional)

- qtbase5-dev (optional)

- libmysqlclient-dev (optional)

- libpq-dev (optional)

- libsqlite3-dev (optional)

- ncurses-dev (optional)

As of SeisComP in version 5.0.0 support for Python 2 is dropped and Python 3 has become the default. The Python development libraries are required if Python wrappers should be compiled which is the default configuration. The development files must match the used Python interpreter of the system.

## Compiling SeisComP for MacOS

Although SeisComP has been developed, compiled and tested on Linux systems, users have compiled SeisComP on MacOS. The procedures are given online by external sources [15]. Please contact the managers of these sources for any requests.