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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
<HTML>
<HEAD>
<TITLE>Building %OpenMS on Linux</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK HREF="style_ini.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<A href="index.html">Home</A> ·
<A href="classes.html">Classes</A> ·
<A href="annotated.html">Annotated Classes</A> ·
<A href="modules.html">Modules</A> ·
<A href="functions_func.html">Members</A> ·
<A href="namespaces.html">Namespaces</A> ·
<A href="pages.html">Related Pages</A>
<HR style="height:1px; border:none; border-top:1px solid #c0c0c0;">
<!-- Generated by Doxygen 1.8.5 -->
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Building OpenMS on Linux </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="install_linux_read"></a>
Read this section first!</h1>
<p>This document addresses OpenMS users and explains the installation procedure for building OpenMS from its sources. On Linux, this the most common way to install <a class="el" href="namespaceOpenMS.html" title="Main OpenMS namespace. ">OpenMS</a> even though we provide binary packages for select Linux distributions and versions of <a class="el" href="namespaceOpenMS.html" title="Main OpenMS namespace. ">OpenMS</a>. Be aware though that we do not provide binary installers for every Linux distribution. For more information read the install instructions for the TOPP binaries.</p>
<p>This document especially considers the installation of several libraries which are required by OpenMS. Most of these libraries are made available in our "contrib-package" (see below). <br/>
If you encounter errors during configuring/compiling our software, have a look at our "Known Issues" section (documentation), maybe the error is already known. If not, please write to the mailing list.</p>
<p><b>Required applications</b></p>
<p>In order to compile OpenMS, several applications need to be installed:</p>
<ul>
<li>Compiler: An ANSI-compatible C++ compiler is required. <br/>
Currently g++ 4.0 or higher is supported. <br/>
Older versions might still work, but are not actively maintained. <br/>
g++ is part of the GNU Compiler Collection (GCC).</li>
<li>CMake (version 2.8.3 or higher) is required to configure and build the package.</li>
<li>Qt4 (version 4.5 or higher; development package containing qmake and headers)</li>
<li>GNU make is required</li>
<li>patch</li>
<li>autoconf (at least version 2.60)</li>
<li>automake (at least version 1.9)</li>
<li>libtool (libtoolize or glibtoolize)</li>
</ul>
<p>If your OpenMS version is a development version from SVN, the following applications are needed in order to create the OpenMS documentation:</p>
<ul>
<li>doxygen (we recommend version 1.5.4)</li>
<li>pdflatex or texlive or texlive-full</li>
</ul>
<p>Here is a list of package names that might help you (might change with newer distributions).</p>
<table style="border-style:solid; border-collapse:collapse; border-color:#c0c0c0;" cellpadding="3px">
<tr>
<td><b>Fedora</b> </td><td><b>OpenSuse 11.1</b> </td><td><b>Ubuntu 8.10 and later</b> </td><td><b>Debian (Lenny)</b> </td></tr>
<tr>
<td valign="top">cmake <br/>
gcc, gcc-g++ <br/>
autoconf, autoconf-2.6* <br/>
qt-devel also look <a href="http://koji.fedoraproject.org/koji/packages">here</a> </td><td valign="top">cmake <br/>
gcc-g++ <br/>
autoconf <br/>
libqt4-devel </td><td valign="top">cmake <br/>
g++ <br/>
autoconf <br/>
qt4-dev-tools <br/>
patch <br/>
libtool </td><td valign="top">cmake <br/>
g++ <br/>
autoconf <br/>
qt4-dev-tools <br/>
patch <br/>
libtool <br/>
make </td></tr>
</table>
<hr/>
<h1><a class="anchor" id="install_linux_contrib"></a>
Installing the contrib package</h1>
<p><a class="el" href="namespaceOpenMS.html" title="Main OpenMS namespace. ">OpenMS</a> depends on several external libraries, namely Boost, GSL, libSVM, SeqAn, glpk, zlib, libbz2 and Xerces-C. There are two ways to install them: i) use the "contrib" package provided by OpenMS and compile them from source or ii) use the distributions package management.</p>
<h2><a class="anchor" id="install_linux_contrib_src"></a>
Installing the dependencies from source</h2>
<p>In order to facilitate the installation of the libraries required for OpenMS, we composed a "contrib-package" containing the libraries Boost, GSL, libSVM, SeqAn, glpk, zlib, libbz2 and Xerces-C.</p>
<p>The contrib package is contained in the OpenMS release package and is available under the path <em>contrib</em> in the OpenMS directory.</p>
<p>If you are using the developer version of OpenMS, you must check out the contrib from Sourceforge SVN repository </p>
<pre>
> svn co <a href="https://open-ms.svn.sourceforge.net/svnroot/open-ms/contrib">https://open-ms.svn.sourceforge.net/svnroot/open-ms/contrib</a>
</pre><p>CMake is used to check the system and create the contrib libraries. <br/>
Go to the contrib directory and execute the following command: </p>
<pre>
> cmake .
</pre><p>If everything worked, the following sub-directories were created under <em>contrib</em> :</p>
<ul>
<li>
<p class="startli">'lib/' <br/>
It contains the static libraries needed by OpenMS.</p>
<p class="endli"></p>
</li>
<li>
'include/' <br/>
It contains the header files needed for OpenMS. </li>
</ul>
<dl class="section note"><dt>Note</dt><dd>To avoid problems while building the libraries contained in the contrib package, the path to your contrib directory should not have any spaces in it.</dd></dl>
<h2><a class="anchor" id="install_linux_contrib_dist"></a>
Installing the dependencies from the distribution</h2>
<p>All OpenMS dependencies (except SeqAn) can be installed using the package management on many major Linux distributions. Depending on your internet connection, this may be faster for you. For Ubuntu (12.04) and Debian please install the following packages:</p>
<pre>
libxerces-c-dev libgsl0-dev libboost-regex-dev libboost-iostreams-dev libboost-date-time-dev libboost-math-dev libsvm-dev libglpk-dev libzip-dev zlib1g-dev
</pre><p>Once these are installed, you will still need SeqAn, for this follow the instructions above (section section <a class="el" href="install_linux.html#install_linux_contrib_src">Installing the dependencies from source</a>) and configure with</p>
<pre>
> cmake -DBUILD_TYPE=SEQAN .
</pre><dl class="section note"><dt>Note</dt><dd>When compiling <a class="el" href="namespaceOpenMS.html" title="Main OpenMS namespace. ">OpenMS</a> (see section <a class="el" href="install_linux.html#install_linux_openms">Installing OpenMS/TOPP</a> below) you will need to set the following CMake flags:</dd></dl>
<p>-DCMAKE_FIND_ROOT_PATH="/usr;/usr/local" and -DBOOST_USE_STATIC=OFF to enable CMake to find the correct libraries and to disable static linking of the Boost libraries.</p>
<hr/>
<h1><a class="anchor" id="install_linux_openms"></a>
Installing %OpenMS/TOPP</h1>
<p>You need to get the OpenMS source package from our website. The latest stable version of OpenMS can be found in the <a href="http://www.OpenMS.de/download.php" target="_blank">download</a> page. For further (e.g. latest developer version from SVN) info see the <a href="http://open-ms.sourceforge.net/download.php" target="_blank">download instructions</a>.</p>
<p>If you have not installed the contrib libraries which OpenMS requires, please refer to the section <a class="el" href="install_linux.html#install_linux_contrib">Installing the contrib package</a> above and install the contrib libraries.</p>
<p><a href="http://www.cmake.org/">CMake</a> is used to check the system and create the main 'Makefile'. <br/>
Go to the OpenMS directory and execute the following command: </p>
<pre>
> cmake .
</pre><p>You can set CMake variables using the <code>-D VARIABLE=VALUE</code> option. A full list of the CMake variables is shown when you execute </p>
<pre>
> ccmake .
</pre><p> This works only after having executing <code>cmake .</code> before.</p>
<p>The most important CMake variables are:</p>
<table style="border-style:solid; border-collapse:collapse; border-color:#c0c0c0;">
<tr>
<td valign="top">INSTALL_PREFIX </td><td><p class="starttd">the path where the library is installed. <br/>
<b>Note:</b> Moving the library after installing it is not possible! Please use this option to point CMake to the location OpenMS should be installed to.</p>
<p class="endtd">For development, install prefixes are not supported. In this case OpenMS must be built in place! </p>
</td></tr>
<tr>
<td valign="top">CMAKE_FIND_ROOT_PATH </td><td>Additional search path for the contrib libraries. If not set the location is assumed to be <code><path_to_OpenMS>/contrib</code>. </td></tr>
<tr>
<td valign="top">QT_QMAKE_EXECUTABLE </td><td>Defines the Qt 'qmake' application. The corresponding Qt installation is used. </td></tr>
<tr>
<td valign="top">CMAKE_BUILD_TYPE </td><td>Should be either 'Release' (optimization enabled) or 'Debug' (debug info and precondition/postcondition checks enabled). <br/>
The default is 'Release'. </td></tr>
<tr>
<td valign="top">QT_DB_PLUGIN </td><td>Defines the Qt database type. By default MySQL is used. </td></tr>
<tr>
<td valign="top">CMAKE_CXX_COMPILER </td><td>Defines the C++ compiler to use. </td></tr>
<tr>
<td valign="top"><code>CMAKE_C_COMPILER</code> </td><td>Defines the C compiler to use. This should match the C++ compiler. Mixing compilers (e.g., <code>clang++</code> for C++ and <code>gcc</code> for C) can lead to undefined behavior as some internal settings (e.g., OpenMP support) are determined using the C compiler and are assumed to be the same for the C++ compiler. </td></tr>
<tr>
<td valign="top"><code>SEARCH_ENGINES_DIRECTORY</code> (optional) </td><td>The location where the ID search engines are located. This directory should have the same structure as the one in the OpenMS svn repository. This directory is needed to build the installer for OpenMS. </td></tr>
<tr>
<td valign="top">PYOPENMS </td><td>Use ON to also build the Python bindings, see also <a class="el" href="pyOpenMS.html">pyOpenMS (Python bindings)</a>. </td></tr>
</table>
<p>After CMake was executed, you can list the make targets by calling: </p>
<pre>
> make targets
</pre><p>In order to build the OpenMS library and TOPP tools execute the following command: </p>
<pre>
> make
</pre><p>If you have chosen to use a install prefix via the INSTALL_PREFIX variable you should install the components using: </p>
<pre>
> make install
</pre><dl class="section note"><dt>Note</dt><dd>Make sure to add <em><path_to_OpenMS>/lib/</em> (e.g. <em>/home/smith/OpenMS/lib/</em>) to the environment variable <b>LD_LIBRARY_PATH</b>.</dd>
<dd>
The TOPP tools are ready to use in the <em><path_to_OpenMS>/bin/</em> folder. To use the TOPP tools from TOPPView, you have to add this path to the environment variable <b>PATH</b> (do not use the tilde character <em>~</em> to abbreviate your home folder).</dd></dl>
<hr/>
<h1><a class="anchor" id="install_linux_testing_openms"></a>
Testing your %OpenMS/TOPP installation</h1>
<p>After you have installed OpenMS and TOPP, you should test your installation by executing the following command: </p>
<pre>
> make test_build
> make test
</pre><dl class="section note"><dt>Note</dt><dd>To enable DB connectivity tests, use the following CMake parameters:<ul>
<li>DB_TEST</li>
<li>DB_TEST_HOST</li>
<li>DB_TEST_PORT</li>
<li>DB_TEST_DB</li>
<li>DB_TEST_USER</li>
<li>DB_TEST_PW </li>
</ul>
</dd></dl>
</div></div><!-- contents -->
<HR style="height:1px; border:none; border-top:1px solid #c0c0c0;">
<TABLE width="100%" border="0">
<TR>
<TD><font color="#c0c0c0">OpenMS / TOPP release 1.11.1</font></TD>
<TD align="right"><font color="#c0c0c0">Documentation generated on Thu Nov 14 2013 11:19:25 using doxygen 1.8.5</font></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|