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 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
|
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Compiling — Cyrus IMAP 3.12.1 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="../../_static/cyrus.css" type="text/css" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Installing Cyrus" href="../installing.html" />
<link rel="prev" title="Setup" href="../../setup.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
Cyrus IMAP
</a>
<div class="version">
3.12.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Cyrus IMAP</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../download.html">Download</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../quickstart.html">Quickstart Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../overview.html">Overview</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../setup.html">Setup</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Compiling</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#setting-up-dependencies">Setting up dependencies</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#required-build-dependencies">Required Build Dependencies</a></li>
<li class="toctree-l4"><a class="reference internal" href="#build-dependencies-for-additional-functionality">Build dependencies for additional functionality</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#compile-cyrus">Compile Cyrus</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#default-build-mail-only">Default build: mail only</a></li>
<li class="toctree-l4"><a class="reference internal" href="#optional-dependencies">Optional dependencies</a></li>
<li class="toctree-l4"><a class="reference internal" href="#compile">Compile</a></li>
<li class="toctree-l4"><a class="reference internal" href="#check">Check</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html">Installing Cyrus</a></li>
<li class="toctree-l2"><a class="reference internal" href="../download/upgrade.html">Upgrading to 3.12</a></li>
<li class="toctree-l2"><a class="reference internal" href="../concepts/deployment.html">Configuration Guide</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../operations.html">Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers.html">Developers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../support.html">Support/Community</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Cyrus SASL</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="http://www.cyrusimap.org/sasl">Cyrus SASL</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Cyrus IMAP</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../setup.html">Setup</a></li>
<li class="breadcrumb-item active">Compiling</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/cyrusimap/cyrus-imapd/blob/master/docsrc/imap/developer/compiling.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="compiling">
<span id="id1"></span><h1>Compiling<a class="headerlink" href="#compiling" title="Permalink to this heading"></a></h1>
<p>These instructions are based on Debian 8.0 because it has to be based on
something. Other Linux distributions will be similar in the broad ideas but may
differ in the specifics. If you already have a preferred distro, use that (we
assume you know how to use its package management system). If you don't already
have a preferred distro, maybe consider using Debian.</p>
<p>First make sure you have a <a class="reference internal" href="../download/getcyrus.html#getcyrus"><span class="std std-ref">copy of the source</span></a>. You can either
fetch the latest source from git, or download one of our release tarballs.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Cyrus does not support compiling with <a class="reference external" href="https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html">Link Time Optimization</a>,
but some platforms now enable Link Time Optimization by default.
If your platform does so, you will need to override it, perhaps
by adding <code class="docutils literal notranslate"><span class="pre">-fno-lto</span></code> to <code class="docutils literal notranslate"><span class="pre">CFLAGS</span></code> and <code class="docutils literal notranslate"><span class="pre">LDFLAGS</span></code>.</p>
</div>
<section id="setting-up-dependencies">
<h2>Setting up dependencies<a class="headerlink" href="#setting-up-dependencies" title="Permalink to this heading"></a></h2>
<section id="required-build-dependencies">
<h3>Required Build Dependencies<a class="headerlink" href="#required-build-dependencies" title="Permalink to this heading"></a></h3>
<p>Building a basic Cyrus that can send and receive email: the minimum libraries
required to build a functional cyrus-imapd.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="http://www.gnu.org/software/autoconf/">autoconf</a></p></td>
<td><p>autoconf</p></td>
<td><p>autoconf</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.gnu.org/software/automake/">automake</a></p></td>
<td><p>automake</p></td>
<td><p>automake</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.gnu.org/software/bison/">bison</a></p></td>
<td><p>bison</p></td>
<td><p>bison</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href=":ref:`CyrusSASL<cyrussasl:sasl-index>`">Cyrus SASL</a></p></td>
<td><p>libsasl2-dev</p></td>
<td><p>cyrus-sasl-devel</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://flex.sourceforge.net/">flex</a></p></td>
<td><p>flex</p></td>
<td><p>flex</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://gcc.gnu.org">gcc</a></p></td>
<td><p>gcc</p></td>
<td><p>gcc</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.gnu.org/software/gperf/">gperf</a></p></td>
<td><p>gperf</p></td>
<td><p>gperf</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.digip.org/jansson/">jansson</a></p></td>
<td><p>libjansson-dev</p></td>
<td><p>jansson-devel</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://libbsd.freedesktop.org/wiki/">libbsd</a></p></td>
<td><p>libbsd-dev</p></td>
<td><p>libbsd-devel</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.gnu.org/software/libtool/">libtool</a></p></td>
<td><p>libtool</p></td>
<td><p>libtool</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.icu-project.org/">ICU</a></p></td>
<td><p>libicu-dev</p></td>
<td><p>libicu-devel</p></td>
<td><p>version 55 or newer</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.kernel.org/pub/linux/utils/util-linux/">uuid</a></p></td>
<td><p>uuid-dev</p></td>
<td><p>libuuid-devel</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.openssl.org/">openssl</a> <a class="reference internal" href="../reference/faqs/install-linkerwarnings.html#openssl-versions"><span class="std std-ref">(Note about versions)</span></a></p></td>
<td><p>libssl-dev</p></td>
<td><p>openssl-devel</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://pkgconfig.freedesktop.org">pkgconfig</a></p></td>
<td><p>pkg-config</p></td>
<td><p>pkgconfig</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sqlite.org/">sqlite</a></p></td>
<td><p>libsqlite3-dev</p></td>
<td><p>sqlite-devel</p></td>
<td></td>
</tr>
</tbody>
</table>
<p>To install all dependencies from packages on Debian Jessie, use this:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>git<span class="w"> </span>build-essential<span class="w"> </span>autoconf<span class="w"> </span>automake<span class="w"> </span>libtool<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>pkg-config<span class="w"> </span>bison<span class="w"> </span>flex<span class="w"> </span>libssl-dev<span class="w"> </span>libjansson-dev<span class="w"> </span>libxml2-dev<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>libsqlite3-dev<span class="w"> </span>libical-dev<span class="w"> </span>libsasl2-dev<span class="w"> </span>libpcre2-dev<span class="w"> </span>uuid-dev<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>libicu-dev
sudo<span class="w"> </span>apt-get<span class="w"> </span>-t<span class="w"> </span>jessie-backports<span class="w"> </span>install<span class="w"> </span>libxapian-dev
</pre></div>
</div>
</section>
<section id="build-dependencies-for-additional-functionality">
<h3>Build dependencies for additional functionality<a class="headerlink" href="#build-dependencies-for-additional-functionality" title="Permalink to this heading"></a></h3>
<p>The following dependencies enable additional functionality, help with
code maintenance tasks or are required for building the documentation.</p>
<section id="developers-only">
<h4>Developers only<a class="headerlink" href="#developers-only" title="Permalink to this heading"></a></h4>
<p>The developer dependencies are required if you are building from git sources,
have modified certain source files from the release tarball, or have configured
with <code class="docutils literal notranslate"><span class="pre">--enable-maintainer-mode</span></code> in order to build a new package.</p>
<p>If you are building normally from a pure release tarball, then you don't need
these dependencies. The files, these dependencies produce, have been pre-built
and included in the release, and do not normally need to be re-built.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 20.0%" />
<col style="width: 15.0%" />
<col style="width: 15.0%" />
<col style="width: 5.0%" />
<col style="width: 45.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Required</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="http://www.perl.org/">perl-devel</a></p></td>
<td><p>perl-dev</p></td>
<td><p>perl-devel</p></td>
<td><p>no</p></td>
<td><p>Needed for building binary perl
libraries, version 5+.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://search.cpan.org/dist/ExtUtils-MakeMaker/">perl(ExtUtils::MakeMaker)</a></p></td>
<td></td>
<td></td>
<td><p>no</p></td>
<td><p>Needed for building extensions to
Perl.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://metacpan.org/pod/Pod::POM::View::Restructured">perl(Pod::POM::View::Restructured)</a></p></td>
<td></td>
<td></td>
<td><p>no</p></td>
<td><p>Needed to generate man
pages. This has to be available to the system-wide perl interpreter, found
by <code class="docutils literal notranslate"><span class="pre">which</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://github.com/gitpython-developers/GitPython">python(GitPython)</a></p></td>
<td><p>python3-git</p></td>
<td></td>
<td><p>no</p></td>
<td><p>Needed for building the documentation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://github.com/readthedocs/sphinx_rtd_theme">python(sphinx_rtd_theme)</a></p></td>
<td><p>python3-sphinx-rtd-theme</p></td>
<td></td>
<td><p>no</p></td>
<td><p>Needed for building the documentation.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/">python(Sphinx)</a></p></td>
<td><p>python3-sphinx</p></td>
<td></td>
<td><p>no</p></td>
<td><p>Needed for building the documentation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.xfig.org/">transfig</a></p></td>
<td><p>transfig</p></td>
<td><p>transfig</p></td>
<td><p>no</p></td>
<td><p>Also known as fig2dev, transfig is
an artifact from the old days, and is only used for generation of a couple
of png files in the legacy documentation (doc/legacy/murder.png and
doc/legacy/netnews.png). One day it should be merged into the current
documentation, cause then we can get rid of it: <a class="reference external" href="https://github.com/cyrusimap/cyrus-imapd/issues/1769">issues/1769</a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.valgrind.org/">valgrind</a></p></td>
<td><p>valgrind</p></td>
<td><p>valgrind</p></td>
<td><p>no</p></td>
<td><p>Performance and memory testing.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="sasl-authentication">
<h4>SASL Authentication<a class="headerlink" href="#sasl-authentication" title="Permalink to this heading"></a></h4>
<table class="docutils align-default">
<colgroup>
<col style="width: 20.0%" />
<col style="width: 15.0%" />
<col style="width: 15.0%" />
<col style="width: 5.0%" />
<col style="width: 45.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Required</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href=":ref:`CyrusSASL<cyrussasl:sasl-index>`">Cyrus SASL Plain</a></p></td>
<td><p>libsasl2-modules</p></td>
<td><p>cyrus-sasl-plain</p></td>
<td><p>yes/no</p></td>
<td><p>Required
to pass Cyrus IMAP's PLAIN authentication unit tests.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href=":ref:`CyrusSASL<cyrussasl:sasl-index>`">sasl binaries</a></p></td>
<td><p>sasl2-bin</p></td>
<td><p>sasl2-bin</p></td>
<td><p>no</p></td>
<td><p>Administration tools for
managing SASL.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://web.mit.edu/kerberos/www/">Kerberos</a></p></td>
<td><p>libsasl2-modules-gssapi-mit</p></td>
<td><p>krb5-devel</p></td>
<td><p>no</p></td>
<td><p>Development
headers required to enable Kerberos v5 authentication capabilities, also
known as the authentication mechanism <em>GSSAPI</em>. Configure option:
<code class="docutils literal notranslate"><span class="pre">--with-gss_impl=mit</span></code>.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="alternate-database-formats">
<h4>Alternate database formats<a class="headerlink" href="#alternate-database-formats" title="Permalink to this heading"></a></h4>
<table class="docutils align-default">
<colgroup>
<col style="width: 20.0%" />
<col style="width: 15.0%" />
<col style="width: 15.0%" />
<col style="width: 5.0%" />
<col style="width: 45.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Required</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="http://www.mysql.com">mysql</a> or <a class="reference external" href="http://mariadb.org">mariadb</a></p></td>
<td><p>libmysqlclient-dev or libmariadb-dev</p></td>
<td><p>mysql-devel
or mariadb-devel</p></td>
<td><p>yes/no</p></td>
<td><p>MariaDB or MySQL development headers, required
to allow Cyrus IMAP to use it as the backend for its databases. Configure
options: <code class="docutils literal notranslate"><span class="pre">--with-mysql</span></code>, <code class="docutils literal notranslate"><span class="pre">--with-mysql-incdir</span></code>,
<code class="docutils literal notranslate"><span class="pre">--with-mysql-libdir</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.postgresql.org/">postgresql</a></p></td>
<td><p>postgresql-dev</p></td>
<td><p>postgresql-devel</p></td>
<td><p>yes/no</p></td>
<td><p>PostgreSQL
development headers, required to allow Cyrus IMAP to use it as the backend
for its databases. Configure option: <code class="docutils literal notranslate"><span class="pre">--with-pgsql</span></code>.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="caldav-carddav-or-jmap-httpd-subsystem">
<h4>CalDAV, CardDAV, or JMAP (httpd subsystem)<a class="headerlink" href="#caldav-carddav-or-jmap-httpd-subsystem" title="Permalink to this heading"></a></h4>
<table class="docutils align-default">
<colgroup>
<col style="width: 20.0%" />
<col style="width: 15.0%" />
<col style="width: 15.0%" />
<col style="width: 5.0%" />
<col style="width: 45.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Required</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="https://github.com/google/brotli">libbrotli</a></p></td>
<td><p>libbrotli-dev</p></td>
<td><p>brotli-devel</p></td>
<td><p>no</p></td>
<td><p>It provides Brotli
compression support for http communications (otherwise only <code class="docutils literal notranslate"><span class="pre">deflate</span></code> and
<code class="docutils literal notranslate"><span class="pre">gzip</span></code> (optionally) would be available).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://github.com/Joungkyun/libchardet">libchardet</a></p></td>
<td><p>libchardet-dev</p></td>
<td><p>libchardet-devel</p></td>
<td><p>yes/no</p></td>
<td><p>It is used
by the <strong>JMAP</strong> module of httpd to detect the character set of untagged
8-bit headers. Without it, cyrus-imapd will not do character-set detection.
If some piece of data has no character set coming in, it will have no
character set. Required for JMAP, but otherwise is not needed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://github.com/libical/libical/">libical</a></p></td>
<td><p>libical-dev</p></td>
<td><p>libical-devel</p></td>
<td><p>yes</p></td>
<td><p>It provides
calendaring functionality for CalDAV, which can't be used without this lib.
Version 3.0.10 or higher is required.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://xmlsoft.org/">libxml</a></p></td>
<td><p>libxml2-dev</p></td>
<td><p>libxml2-devel</p></td>
<td><p>yes</p></td>
<td><p>A fundamental lib for
all *DAV functionality.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://nghttp2.org/">nghttp2</a></p></td>
<td><p>libnghttp2-dev</p></td>
<td><p>libnghttp2-devel</p></td>
<td><p>no</p></td>
<td><p>HTTP/2 support
for the entire <strong>httpd</strong> subsystem (*DAV & JMAP).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://shapelib.maptools.org">shapelib</a></p></td>
<td><p>libshp-dev</p></td>
<td><p>shapelib</p></td>
<td><p>yes/no</p></td>
<td><p>It is required for
<strong>tzdist</strong> service to have geolocation support. Otherwise it is not needed.
Version 1.3.0 or higher is required when using it.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://tatsuhiro-t.github.io/wslay/">wslay</a></p></td>
<td><p>libwslay-dev</p></td>
<td><p>wslay-devel</p></td>
<td><p>no</p></td>
<td><p>It provides WebSockets support
in httpd. Only used with <strong>JMAP</strong>, otherwise not needed. Version 1.1.1 or
higher is required when using it.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://github.com/ConorOG/xxd/">xxd</a></p></td>
<td><p>xxd</p></td>
<td><p>vim-common</p></td>
<td><p>yes</p></td>
<td><p>Needed for the _js.h files, for CalDAV
and CardDAV support.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://zlib.net/">zlib</a></p></td>
<td><p>zlib1g-dev</p></td>
<td><p>zlib-devel</p></td>
<td><p>no</p></td>
<td><p>It provides gzip compression
support for http communications.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="other">
<h4>Other<a class="headerlink" href="#other" title="Permalink to this heading"></a></h4>
<table class="docutils align-default">
<colgroup>
<col style="width: 20.0%" />
<col style="width: 15.0%" />
<col style="width: 15.0%" />
<col style="width: 5.0%" />
<col style="width: 45.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Package</p></th>
<th class="head"><p>Debian</p></th>
<th class="head"><p>RedHat</p></th>
<th class="head"><p>Required</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="http://cunit.sourceforge.net/">CUnit</a></p></td>
<td><p>libcunit1-dev</p></td>
<td><p>cunit-devel</p></td>
<td><p>no</p></td>
<td><p>Development headers for
compiling Cyrus IMAP's unit tests. Required to run <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">check</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p>SSL certificates</p></td>
<td><p>ssl-cert-dev</p></td>
<td><p>mod_ssl</p></td>
<td><p>no</p></td>
<td><p>Used if you're
installing SSL certificates.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://www.clamav.net/">ClamAV</a></p></td>
<td><p>libclamav-dev</p></td>
<td><p>clamav-devel</p></td>
<td><p>no</p></td>
<td><p>It is used by
<strong>cyr_virusscan</strong>, otherwise not needed.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://github.com/CLD2Owners/cld2">CLD2</a></p></td>
<td><p>libcld2-dev</p></td>
<td><p>cld2-devel</p></td>
<td><p>yes/no</p></td>
<td><p>Compact Language Detector 2
(probabilistically detects over 80 languages in Unicode UTF-8 text, either
plain text or HTML/XML). Required for <strong>Xapian</strong> (<code class="docutils literal notranslate"><span class="pre">--enable-xapian</span></code>),
otherwise not needed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://www.openldap.org/">openldap</a></p></td>
<td><p>libldap2-dev</p></td>
<td><p>openldap-devel</p></td>
<td><p>no</p></td>
<td><p>Development headers
to enable <strong>ptloader</strong> to interface with LDAP directly, for canonification
of login usernames to mailbox names, and verification of login usernames,
ACL subjects and group membership. Configure option: <code class="docutils literal notranslate"><span class="pre">--with-ldap</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.pcre.org/">pcre2</a></p></td>
<td><p>libpcre2-dev</p></td>
<td><p>pcre2-devel</p></td>
<td><p>yes</p></td>
<td><p>PCRE 2 (10.x) - for utf-8/unicode
regular expression matching. Could be replaced by something else in the
future. See <a class="reference external" href="https://github.com/cyrusimap/cyrus-imapd/issues/1731#issuecomment-273064554">issues/1731</a> for more information.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://metacpan.org/pod/Term::ReadLine">perl(Term::ReadLine)</a></p></td>
<td></td>
<td></td>
<td><p>no</p></td>
<td><p>Perl library needed by <strong>cyradm</strong>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.libsrs2.org/">libsrs2</a></p></td>
<td><p><em>no package</em></p></td>
<td><p><em>no package</em></p></td>
<td><p>no</p></td>
<td><p>It is used for
implementing Sender Rewriting Scheme (SRS) functionality for messages
forwarded by sieve scripts. Without it, messages forwarded by sieve scripts
will not have this functionality and might have difficulty delivering to
SMTP servers that insist on it.</p></td>
</tr>
</tbody>
</table>
<dl class="simple">
<dt>Install tools for building</dt><dd><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">build-essential</span></code></p></li>
</ul>
</dd>
<dt>Optionally install dependencies for <a class="reference internal" href="documentation.html#contribute-docs"><span class="std std-ref">building the docs</span></a>.</dt><dd><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">python-sphinx</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">cpan</span> <span class="pre">install</span> <span class="pre">Pod::POM::View::Restructured</span></code></p></li>
</ul>
</dd>
</dl>
</section>
</section>
</section>
<section id="compile-cyrus">
<h2>Compile Cyrus<a class="headerlink" href="#compile-cyrus" title="Permalink to this heading"></a></h2>
<p>There are additional <a class="reference internal" href="install-xapian.html#imapinstall-xapian"><span class="std std-ref">compile and installation steps</span></a>
if you are using Xapian for searching, or if you are <a class="reference internal" href="jmap.html#developer-jmap"><span class="std std-ref">using jmap</span></a>.</p>
<section id="default-build-mail-only">
<h3>Default build: mail only<a class="headerlink" href="#default-build-mail-only" title="Permalink to this heading"></a></h3>
<pre class="literal-block">$ <strong class="command">autoreconf -i</strong>
$ <strong class="command">./configure</strong> [options]</pre>
<p>Check the summary after <code class="docutils literal notranslate"><span class="pre">./configure</span></code> completes to ensure it
matches your expectations.</p>
<p>To view all options, and disable or enable specific features,
please see:</p>
<pre class="literal-block"># <strong class="command">./configure --help</strong></pre>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Passing environment variables as an argument to configure, rather than
setting them in the environment before running configure, allows their
values to be logged in config.log. This is useful for diagnosing problems.</p>
</div>
</section>
<section id="optional-dependencies">
<h3>Optional dependencies<a class="headerlink" href="#optional-dependencies" title="Permalink to this heading"></a></h3>
<p>Some features are disabled by default and must be explicitly enabled
via configure.</p>
<p>Sieve is enabled by default.</p>
<section id="caldav-carddav-webdav-jmap">
<h4>CalDAV, CardDAV, WebDAV, JMAP<a class="headerlink" href="#caldav-carddav-webdav-jmap" title="Permalink to this heading"></a></h4>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">./configure</span> <span class="pre">--enable-http</span> <span class="pre">--enable-calalarmd</span> <span class="pre">--enable-jmap</span></code></p>
</div></blockquote>
</section>
<section id="murder">
<h4>Murder<a class="headerlink" href="#murder" title="Permalink to this heading"></a></h4>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">./configure</span> <span class="pre">--enable-murder</span></code></p>
</div></blockquote>
</section>
<section id="replication">
<h4>Replication<a class="headerlink" href="#replication" title="Permalink to this heading"></a></h4>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">./configure</span> <span class="pre">--enable-replication</span></code></p>
</div></blockquote>
</section>
</section>
<section id="compile">
<h3>Compile<a class="headerlink" href="#compile" title="Permalink to this heading"></a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>/path/to/cyrus-imapd
autoreconf<span class="w"> </span>-i<span class="w"> </span>-s<span class="w"> </span><span class="c1"># generates a configure script, and its various dependencies</span>
./configure<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">"-W -Wno-unused-parameter -g -O0 -Wall -Wextra -Werror -fPIC"</span><span class="w"> </span><span class="se">\</span>
--enable-coverage<span class="w"> </span>--enable-calalarmd<span class="w"> </span>--enable-autocreate<span class="w"> </span><span class="se">\</span>
--enable-nntp<span class="w"> </span>--enable-http<span class="w"> </span>--enable-unit-tests<span class="w"> </span><span class="se">\</span>
--enable-replication<span class="w"> </span>--with-openssl<span class="o">=</span>yes<span class="w"> </span>--enable-murder<span class="w"> </span><span class="se">\</span>
--enable-idled<span class="w"> </span>--prefix<span class="o">=</span>/usr/cyrus
make<span class="w"> </span>lex-fix<span class="w"> </span><span class="c1"># you need this if compile fails with errors from sieve/sieve.c</span>
make
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">--prefix</span></code> option sets where Cyrus is installed to.</p>
<p>It may be of use to also add <code class="docutils literal notranslate"><span class="pre">--std=gnu99</span></code> to the <code class="docutils literal notranslate"><span class="pre">CFLAGS</span></code>. That generates
TONS of warnings.</p>
<p>Having problems with <a class="reference internal" href="../reference/faqs/install-compilationerrors.html#compilationerrors"><span class="std std-ref">compilation</span></a> or
<a class="reference internal" href="../reference/faqs/install-linkerwarnings.html#linker-warnings"><span class="std std-ref">linking</span></a>?</p>
<p>If you're running on Debian, and you install to <code class="docutils literal notranslate"><span class="pre">/usr/local</span></code>, you may need to
update your library loader. Edit <code class="docutils literal notranslate"><span class="pre">/etc/ld.so.conf.d/x86_64-linux-gnu.conf</span></code> so
it includes the following additional line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">x86_64</span><span class="o">-</span><span class="n">linux</span><span class="o">-</span><span class="n">gnu</span>
</pre></div>
</div>
<p>Without this, when you attempt to start Cyrus, it reports <code class="docutils literal notranslate"><span class="pre">error</span> <span class="pre">while</span> <span class="pre">loading</span>
<span class="pre">shared</span> <span class="pre">libraries:</span> <span class="pre">libcyrus_imap.so.0:</span> <span class="pre">cannot</span> <span class="pre">open</span> <span class="pre">shared</span> <span class="pre">object</span> <span class="pre">file:</span> <span class="pre">No</span> <span class="pre">such</span>
<span class="pre">file</span> <span class="pre">or</span> <span class="pre">directory</span></code> because it can't find the Cyrus library in /usr/local/lib.</p>
</section>
<section id="check">
<h3>Check<a class="headerlink" href="#check" title="Permalink to this heading"></a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>check<span class="w"> </span><span class="c1"># this runs the cunit tests.</span>
</pre></div>
</div>
<p>This runs the cunit tests and is used for testing that the libraries support
all the expected behaviour. If this fails, please <a class="reference internal" href="../support/feedback-mailing-lists.html#feedback-mailing-lists"><span class="std std-ref">report it to the
cyrus-dev mailing list</span></a> with details of your source
version, operating system and affected libraries.</p>
<p>Next: <a class="reference internal" href="../installing.html#installing"><span class="std std-ref">installing Cyrus</span></a>.</p>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../../setup.html" class="btn btn-neutral float-left" title="Setup" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../installing.html" class="btn btn-neutral float-right" title="Installing Cyrus" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 1993–2025, The Cyrus Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
|