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
|
<HTML>
<HEAD>
<TITLE>Building OpenMS on Mac OS X</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 <a class="el" href="namespaceOpenMS.html" title="Main OpenMS namespace. ">OpenMS</a> on Mac OS X </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="install_mac_read"></a>
Introduction</h1>
<p>This document addresses OpenMS users and explains the installation procedure for building OpenMS from its sources. If you only want to use the OpenMS Proteomics Pipeline (TOPP), you are strongly encouraged to <b>download the binary installer</b> (see <a href="http://www.OpenMS.de" target="_blank">here</a>), instead of building OpenMS from sources. Be aware though that we do not provide binary installers for every MacOS version. 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 or report the error on our <a href="https://sourceforge.net/apps/trac/open-ms/" target="_new">issue tracker</a>.</p>
<h2><a class="anchor" id="hint_package_manager"></a>
Package Mangers</h2>
<p>We suggest to use either <a href="http://mxcl.github.com/homebrew/" target="_new">Homebrew</a> or <a href="http://www.macports.org" target="_new">MacPorts</a> as they contain most of the following requirements for OpenMS and ease the process of upgrading those dependencies.</p>
<h2><a class="anchor" id="required_apps"></a>
Required applications</h2>
<p>In order to compile OpenMS, several applications need to be installed: </p>
<ul>
<li>
Xcode (version 4.0 or higher) is required to build OpenMS (the current version can be obtained from the Mac App Store). More details can be found on the <a href="https://developer.apple.com/xcode/" target="_new" title="Xcode 4 Downloads and Resources.">Apple Developer Site</a>. <dl class="section note"><dt>Note</dt><dd>Since Xcode 4.3 you also need to install the "Command Line Tools" to access the compilers shipped with Xcode from the command line. An explanation on how to install the Command Line Tools can be found <a href="http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html#//apple_ref/doc/uid/1006-SW1" target="_new" title="Install Command Line Tools for Xcode">here</a>. </dd></dl>
</li>
<li>
CMake (version 2.8.3 or higher) is required to configure and build the OpenMS as well as some of its dependencies. </li>
<li>
Qt4 (version 4.5 or higher) containing qmake and the header files is required (either a dmg file or source packages can be obtained from <a href="http://qt-project.org" target="_new" title="Get Qt">http://qt-project.org/</a>) <dl class="section note"><dt>Note</dt><dd>Qt 5 is not yet supported by OpenMS. </dd></dl>
</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>
<a href="http://www.doxygen.org/index.html">Doxygen</a> is used to generate the OpenMS documentation. <dl class="section note"><dt>Note</dt><dd>We recommend using at least doxygen 1.7.1 (or above) since some 1.6.X versions have a serious bug that makes building the OpenMS documentation impossible. </dd></dl>
</li>
<li>
pdflatex is required to generate the tutorial pdfs. The latest MacTeX release can be downloaded <a href="http://tug.org/mactex/">here</a> </li>
</ul>
<hr/>
<h1><a class="anchor" id="install_mac_contrib"></a>
Installing the contrib package</h1>
<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, bzip2 and Xerces-C.</p>
<p>The contrib package is contained in the OpenMS release package and is available inside the <code>contrib</code> directory in the OpenMS directory.</p>
<p>If you are using the developer version of OpenMS, you have to check out the contrib from Sourceforge SVN repository</p>
<div class="fragment"><div class="line">svn co <span class="stringliteral">"https://open-ms.svn.sourceforge.net/svnroot/open-ms/contrib"</span></div>
</div><!-- fragment --><p>CMake is used to check your system and build the contrib libraries.</p>
<dl class="section note"><dt>Note</dt><dd>As of OpenMS 1.10 compiling OpenMS with the Apple GCC 4.2 compiler can lead to errors due to the update of BOOST to version 1.52. Please use the shipped clang compiler instead (clang/clang++) to avoid this problem.</dd></dl>
<ol>
<li>
Open a Terminal (/Applications/Utilities/Terminal.app) </li>
<li>
<p class="startli">Create a build directory for the OpenMS contrib e.g.,</p>
<div class="fragment"><div class="line">$ mkdir ~/openms-development/contrib_build</div>
</div><!-- fragment --> </li>
<li>
<p class="startli">Enter the created directory and call cmake to build the contrib</p>
<div class="fragment"><div class="line">$ cd <path_to_contrib_build></div>
<div class="line">$ cmake -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang <path_to_contrib></div>
</div><!-- fragment --><p>Example:</p>
<div class="fragment"><div class="line">cd ~/openms-development/contrib_build</div>
<div class="line">cmake -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang ~/openms-development/contrib</div>
</div><!-- fragment --> </li>
</ol>
<p>If everything worked, the following sub-directories were created under in the contrib build directory:</p>
<ul>
<li>
<code>lib/</code> containing the libraries needed by OpenMS. </li>
<li>
<code>include/</code> containing 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 contain any spaces.</dd></dl>
<hr/>
<h1><a class="anchor" id="install_mac_openms"></a>
Installing OpenMS</h1>
<p>Assuming you have successfully installed the dependent libraries, you need to get the OpenMS source code. The latest stable version of OpenMS can be found in the <a href="http://www.openms.de/downloads/" 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>
<ol>
<li>
Open a Terminal (/Applications/Utilities/Terminal.app) </li>
<li>
<p class="startli">Create a build directory for OpenMS, e.g.,</p>
<div class="fragment"><div class="line">$ mkdir ~/openms-development/openms_build</div>
</div><!-- fragment --> </li>
<li>
<p class="startli">Call cmake to create the build system there</p>
<div class="fragment"><div class="line">cd <path_to_OpenMS_build></div>
<div class="line">cmake -D CMAKE_FIND_ROOT_PATH=<path_to_contrib_build> <path_to_OpenMS></div>
</div><!-- fragment --><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>
<div class="fragment"><div class="line">ccmake ~/openms-development/openms_build</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>You need to execute <code>cmake</code> at least once before <code>ccmake</code> can be used. </dd></dl>
</li>
</ol>
<p>The most important CMake variables are:</p>
<table style="border-style:solid; border-collapse:collapse; border-color:#c0c0c0;">
<tr>
<td valign="top"><code>CMAKE_FIND_ROOT_PATH</code> </td><td>Additional search path for the contrib libraries. If not set the the location is assumed to be <code><path_to_OpenMS>/contrib</code>. </td></tr>
<tr>
<td valign="top"><code>QT_QMAKE_EXECUTABLE</code> </td><td>Defines the Qt 'qmake' application to identify the corresponding Qt installation. This variable only needs to be set if <code>qmake</code> is not in the PATH. </td></tr>
<tr>
<td valign="top"><code>CMAKE_BUILD_TYPE</code> </td><td>Should be either 'Release' (optimization enabled) or 'Debug' (debug info and precondition/postcondiction checks enabled). <br/>
The default is <code>Release</code>. </td></tr>
<tr>
<td valign="top"><code>QT_DB_PLUGIN</code> </td><td>Defines the Qt database type. By default MySQL is used. </td></tr>
<tr>
<td valign="top"><code>CMAKE_CXX_COMPILER</code> </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>
<div class="fragment"><div class="line">make targets</div>
</div><!-- fragment --><p>In order to build the OpenMS library and TOPP tools execute the following command: </p>
<div class="fragment"><div class="line">make</div>
</div><!-- fragment --><p>The TOPP tools should now be ready to use. The executables are located in the <code>bin/</code> folder of the build directory. Add this folder to your <b><code>PATH</code></b> variable for easy access.</p>
<hr/>
<h1><a class="anchor" id="install_mac_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>
<div class="fragment"><div class="line">make test_build</div>
<div class="line">make <a class="code" href="namespaceOpenMS_1_1Internal_1_1ClassTest.html#a69f942d7289d5ed2ffe3a00b12235d04">test</a></div>
</div><!-- fragment --><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>
|