1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
\chapter{Installation}\label{ch:inst}

\section{Getting ScaffCC}
\begin{enumerate}
  \item Go to https://github.com/epiqc/ScaffCC
  \item For the \textbf{Unix build}, download the repository:
\begin{lstlisting}
   git clone https://github.com/epiqc/ScaffCC.git [dir]
\end{lstlisting}
  \item For the \textbf{OS X build}, download the repository:
\begin{lstlisting}
   git clone -b ScaffCC_OSX https://github.com/epiqc/ScaffCC.git [dir]
\end{lstlisting}
\end{enumerate}


\section{Building ScaffCC}

\subsection{Prerequisites}

\subsubsection{For OS X build}
\begin{enumerate}
  \item If not already installed, Xcode command line tool is required in order to build ScaffCC.
  \begin{lstlisting}
  xcode-select --install
  \end{lstlisting}
  
  \item Python 2.7 (or later): Python is usually bundled with OS X. The built-in version should be sufficient.
\end{enumerate}

\subsubsection{For Unix build}

First you need to install the following dependencies. For each one, you can either install by building from source,
or use the package manager of your system (``yum" on Red Hat or ``apt-get" on Ubuntu).  

\begin{enumerate}
  \item Static libraries for libstdc++ and glibc

  \begin{itemize}
    \item ``Ubuntu": Install GNU gold linker \\
    You can check if you have this now by doing `ld -v' and if it says `GNU gold' you have it
    \begin{lstlisting}
    sudo apt-get install binutils-gold
    \end{lstlisting}

    \item ``Red Hat"
    \begin{lstlisting}
    sudo yum install libstdc++-static 
    sudo yum install glibc-static
    \end{lstlisting}
  \end{itemize}
  
  \item GCC 4.5 or higher
  NOTE: if you need to preserve an older build, consider using `update-alternatives' as system-wide method for preserving and maintaining these.

  \item Boost 1.48
  \begin{itemize}
    \item ``Source Build" \\
    Boost installation instructions are here: \\
    \url{http://www.boost.org/doc/libs/1_48_0/doc/html/bbv2/installation.html}
    \begin{lstlisting}
    wget http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
    tar zxf boost_1_48_0.tar.gz && cd boost_1_48_0/
    sudo ./bootstrap.sh
    sudo ./b2 install --prefix=/usr/local
    \end{lstlisting}
    Alternatively, Ubuntu users can install the current Boost version via:
    \begin{lstlisting}
    sudo apt-get install libboost-all-dev
    \end{lstlisting}
  \end{itemize}

  \item The GNU Multiple Precision Arithmetic Library (gmp and gmpxx)    
  \begin{itemize}
    \item ``Ubuntu": Use tab-completion to verify the correct packages (e.g. libgmp\textless tab\textgreater \textless tab\textgreater)
    \begin{lstlisting}
    sudo apt-get install libgmp-dev libgmpxx4ldbl
    \end{lstlisting}

    \item ``Source Build"
    \begin{lstlisting}
    wget https://ftp.gnu.org/gnu/gmp/gmp-6.0.0a.tar.bz2
    sudo ./configure --disable-shared --enable-static --enable-cxx
    sudo make && sudo make check && sudo make install
    \end{lstlisting}
  \end{itemize}

  \item The GNU MPFR Library (mpfr)
  \begin{itemize}    
    \item ``Ubuntu"
    \begin{lstlisting}
    sudo apt-get install libmpfr-dev
    \end{lstlisting}

    \item ``Source Build"
    \begin{lstlisting}
    wget http://www.mpfr.org/mpfr-current/mpfr-3.1.4.tar.bz2
    sudo ./configure --disable-shared --enable-static
    sudo make && sudo make check && sudo make install
    \end{lstlisting}
  \end{itemize}

  \item Python 2.7 (or later)

  \item CMake (For Integrating RKQC Functionality)
  \begin{itemize}
    \item ``Ubuntu"
    \begin{lstlisting}
    sudo apt-get install cmake
    \end{lstlisting}

    \item ``Source Build" \\
    There are instructions for downloading and building CMake from source at: \\
    \url{https://cmake.org/install}
  \end{itemize}

\end{enumerate}

\subsection{Installing}

Once you have all of the required libraries, simply run 
\begin{lstlisting}
    make
\end{lstlisting} 
or 
\begin{lstlisting}
    make USE_GCC=1
\end{lstlisting} 
at the root of the repository. The $USE\_GCC$ flag will force the 
Makefile to use GCC to compile instead, and this has been seen to be faster 
on some systems.

\section{Verifying Installation}

Included with ScaffCC is a suite of tests designed to verify the integrity of new installations. To access these tests and verify that the installation process completed successfully:

\begin{enumerate}
    \item Enter the scripts/ directory:
    \begin{lstlisting}
        cd scripts/
    \end{lstlisting}
    \item Run the Regression Test Suite:
    \begin{lstlisting}
        ./regression_test.sh
    \end{lstlisting}
\end{enumerate}

This invocation will compile three small benchmarks, and verify that the generated files match those precompiled on an existing system, which are included in the test cases directory. If the three tests complete with a ``Succeeded", the installation was successful.