-r--r--r-- 6857 libmceliece-20240513/doc/html/install.html raw
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html{overflow-y:scroll}
body{font-family:"Noto Sans","Droid Sans","DejaVu Sans","Arial",sans-serif;line-height:1.5}
tt,code{background-color:#f0f0f0;font-family:"Noto Sans Mono","Droid Sans Mono","DejaVu Sans Mono","Courier New",monospace,sans-serif;font-size:1em;}
pre{margin-left:3em}
p,ul,ol,blockquote,pre{font-size:1.0em;line-height:1.6}
li p{font-size:1.0em}
blockquote p{font-size:1.0em}
h1{font-size:1.5em}
h2{font-size:1.3em}
h3{font-size:1.0em}
h1 a{text-decoration:none}
table{border-collapse:collapse}
th,td{border:1px solid black}
table a{text-decoration:none}
table tr{font-size:1.0em;line-height:1.6em}
table tr{font-size:1.0em;line-height:1.5}
tbody tr:nth-child(20n+1){background-color:#f0ffff}
tbody tr:nth-child(20n+2){background-color:#f0ffff}
tbody tr:nth-child(20n+3){background-color:#f0ffff}
tbody tr:nth-child(20n+4){background-color:#f0ffff}
tbody tr:nth-child(20n+5){background-color:#f0ffff}
tbody tr:nth-child(20n+6){background-color:#f0ffff}
tbody tr:nth-child(20n+7){background-color:#f0ffff}
tbody tr:nth-child(20n+8){background-color:#f0ffff}
tbody tr:nth-child(20n+9){background-color:#f0ffff}
tbody tr:nth-child(20n+10){background-color:#f0ffff}
tbody tr:nth-child(20n+11){background-color:#fffff0}
tbody tr:nth-child(20n+12){background-color:#fffff0}
tbody tr:nth-child(20n+13){background-color:#fffff0}
tbody tr:nth-child(20n+14){background-color:#fffff0}
tbody tr:nth-child(20n+15){background-color:#fffff0}
tbody tr:nth-child(20n+16){background-color:#fffff0}
tbody tr:nth-child(20n+17){background-color:#fffff0}
tbody tr:nth-child(20n+18){background-color:#fffff0}
tbody tr:nth-child(20n+19){background-color:#fffff0}
tbody tr:nth-child(20n+20){background-color:#fffff0}
.links a:hover{text-decoration:underline}
.links a:active{text-decoration:underline}
.links img{width:200px;padding-left:1em}
.links td{border:0px;padding-top:0.5em;padding-bottom:0.5em}
.headline{padding:0;font-weight:bold;font-size:1.5em;vertical-align:top;padding-bottom:0.5em;color:#196069}
.navt{display:inline-block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;
min-width:14%;margin:0;padding:0;padding-left:0.5em;padding-right:0.5em;vertical-align:center;
font-weight:bold;font-size:1.1em;text-align:center;border:1px solid black}
.here{border-bottom:0px;background-color:#ffffff}
.away{background-color:#196069;}
.away a{text-decoration:none;display:block;color:#ffffff}
.away a:hover,.away a:active{text-decoration:underline}
.main{margin:0;padding-top:0em;padding-bottom:1%;clear:both}
</style>
<title>
libmceliece: Install</title>
</head>
<body>
<div class=headline>
libmceliece</div>
<div class=nav>
<div class="navt away"><a href=index.html>Intro</a>
</div><div class="navt away"><a href=download.html>Download</a>
</div><div class="navt here">Install
</div><div class="navt away"><a href=api.html>API</a>
</div><div class="navt away"><a href=cli.html>CLI</a>
</div><div class="navt away"><a href=security.html>Security</a>
</div><div class="navt away"><a href=verification.html>Verification</a>
</div><div class="navt away"><a href=speed.html>Speed</a>
</div><div class="navt away"><a href=internals.html>Internals</a>
</div><div class="navt away"><a href=people.html>People</a>
</div><div class="navt away"><a href=license.html>License</a>
</div></div>
<div class=main>
<p>Prerequisites:</p>
<ul>
<li><code>python3</code></li>
<li><code>gcc</code> and/or <code>clang</code></li>
<li><a href="https://cpucycles.cr.yp.to"><code>libcpucycles</code></a></li>
<li><a href="https://randombytes.cr.yp.to"><code>librandombytes</code></a></li>
</ul>
<h3>For sysadmins</h3>
<p>To install in <code>/usr/local/{include,lib,bin,man}</code>:</p>
<pre><code>./configure && make -j8 install
</code></pre>
<h3>For developers with an unprivileged account</h3>
<p>Typically you'll already have</p>
<pre><code>export LD_LIBRARY_PATH="$HOME/lib"
export LIBRARY_PATH="$HOME/lib"
export CPATH="$HOME/include"
export PATH="$HOME/bin:$PATH"
</code></pre>
<p>in <code>$HOME/.profile</code>. To install in <code>$HOME/{include,lib,bin,man}</code>:</p>
<pre><code>./configure --prefix=$HOME && make -j8 install
</code></pre>
<h3>For distributors creating a package</h3>
<p>Run</p>
<pre><code>./configure --prefix=/usr && make -j8
</code></pre>
<p>and then follow your usual packaging procedures for the
<code>build/0/package</code> files:</p>
<pre><code>build/0/package/include/mceliece.h
build/0/package/lib/libmceliece*
build/0/package/bin/mceliece*
build/0/package/man/man3/*.3
build/0/package/man/man1/*.1
</code></pre>
<p>The <code>libcpucycles</code> and <code>librandombytes</code> packages are build-time and
run-time prerequisites; the <code>python3</code> and compiler packages are only
build-time prerequisites.</p>
<h3>More options</h3>
<p>You can run</p>
<pre><code>./configure --host=amd64
</code></pre>
<p>to override <code>./configure</code>'s guess of the architecture that it should
compile for. The architecture controls which implementations to try
(see <code>crypto_*/*/*/architectures</code>) and which compilers to try (see
<code>compilers/*</code>).</p>
<p>Inside the <code>build</code> directory, <code>0</code> is symlinked to <code>amd64</code> for
<code>--host=amd64</code>. Running <code>make clean</code> removes <code>build/amd64</code>. Re-running
<code>./configure</code> automatically starts with <code>make clean</code>.</p>
<p>A subsequent <code>./configure --host=arm64</code> will create <code>build/arm64</code> and
symlink <code>0 -> arm64</code>, without touching an existing <code>build/amd64</code>. However,
cross-compilers aren't yet selected automatically.</p>
<p>You can run</p>
<pre><code>./configure --valgrind
</code></pre>
<p>to set up a version of libmceliece suitable for tests under <code>valgrind</code>.
After compilation and installation,</p>
<pre><code>env valgrind_multiplier=1 \
valgrind -q \
--max-stackframe=16777216 \
--error-exitcode=99 \
mceliece-test
</code></pre>
<p>will run those tests. This takes a while. To run tests in parallel on
many cores:</p>
<pre><code>ls -d crypto_*/*/* |
( while read opi
do
op=`dirname $opi`
o=`dirname $op`
p=`basename $op`
i=`basename $opi`
o=`echo $o | sed 's/crypto_//'`
( mceliece-test $o $p $i
echo $? ) > test-${o}-${p}-${i}.out &
( env valgrind_multiplier=1 valgrind -q \
--max-stackframe=16777216 --error-exitcode=99 \
mceliece-test $o $p $i
echo $? ) > test-valgrind-${o}-${p}-${i}.out 2>&1 &
done
wait
)
</code></pre><hr><font size=1><b>Version:</b>
This is version 2024.05.08 of the "Install" web page.
</font>
</div>
</body>
</html>