[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1fe35e1] | 2 | <!DOCTYPE section [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[1fe35e1] | 6 | <section xmlns="http://docbook.org/docbook-ng"
|
---|
| 7 | xml:id="ch-system-zlib" xreflabel="Zlib" role="wrap">
|
---|
| 8 | <info><title>Zlib-&zlib-version;</title></info>
|
---|
[673b0d8] | 9 | <?dbhtml filename="zlib.html"?>
|
---|
[24380c7] | 10 |
|
---|
[673b0d8] | 11 | <indexterm zone="ch-system-zlib"><primary sortas="a-Zlib">Zlib</primary></indexterm>
|
---|
| 12 |
|
---|
[1fe35e1] | 13 | <section role="package"><info><title/></info>
|
---|
[673b0d8] | 14 | <para>The Zlib package contains compression and un-compression routines used by
|
---|
[5888299] | 15 | some programs.</para>
|
---|
| 16 |
|
---|
[a001133] | 17 | <segmentedlist>
|
---|
| 18 | <segtitle>&buildtime;</segtitle>
|
---|
| 19 | <segtitle>&diskspace;</segtitle>
|
---|
| 20 | <seglistitem><seg>0.1 SBU</seg><seg>1.5 MB</seg></seglistitem>
|
---|
| 21 | </segmentedlist>
|
---|
[673b0d8] | 22 |
|
---|
[a001133] | 23 | <segmentedlist>
|
---|
| 24 | <segtitle>Zlib installation depends on</segtitle>
|
---|
| 25 | <seglistitem><seg>Binutils, Coreutils, GCC, Glibc, Make, Sed</seg></seglistitem>
|
---|
| 26 | </segmentedlist>
|
---|
[1fe35e1] | 27 | </section>
|
---|
[24380c7] | 28 |
|
---|
[1fe35e1] | 29 | <section role="installation">
|
---|
| 30 | <info><title>Installation of Zlib</title></info>
|
---|
[73aedd1d] | 31 |
|
---|
[bcd0ce7] | 32 | <note><para>Zlib is known to build its shared library incorrectly if CFLAGS is
|
---|
| 33 | specified in the environment. If you are using your own CFLAGS variable, be
|
---|
[8ad7980] | 34 | sure to add the <parameter>-fPIC</parameter> directive to your CFLAGS for the
|
---|
[4248b0e] | 35 | duration of the below <command>configure</command> command, then remove it
|
---|
[bcd0ce7] | 36 | afterwards.</para></note>
|
---|
[73aedd1d] | 37 |
|
---|
[4248b0e] | 38 | <para>Prepare Zlib for compilation:</para>
|
---|
| 39 |
|
---|
| 40 | <screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
|
---|
| 41 |
|
---|
[73aedd1d] | 42 | <para>Compile the package:</para>
|
---|
| 43 |
|
---|
| 44 | <screen><userinput>make</userinput></screen>
|
---|
| 45 |
|
---|
[673b0d8] | 46 | <para>To test the results, issue:
|
---|
[8a5f906] | 47 | <userinput>make check</userinput>.</para>
|
---|
[dfddb12] | 48 |
|
---|
| 49 | <para>Install the shared library:</para>
|
---|
[73aedd1d] | 50 |
|
---|
| 51 | <screen><userinput>make install</userinput></screen>
|
---|
| 52 |
|
---|
[dfddb12] | 53 | <para>Now also build the non-shared (static) library:</para>
|
---|
[8ad7980] | 54 |
|
---|
[73aedd1d] | 55 | <screen><userinput>make clean
|
---|
| 56 | ./configure --prefix=/usr
|
---|
| 57 | make</userinput></screen>
|
---|
| 58 |
|
---|
[673b0d8] | 59 | <para>To again test the results, issue:
|
---|
[8a5f906] | 60 | <userinput>make check</userinput>.</para>
|
---|
[73aedd1d] | 61 |
|
---|
[84e4cae] | 62 | <para>Install the static library:</para>
|
---|
[73aedd1d] | 63 |
|
---|
| 64 | <screen><userinput>make install</userinput></screen>
|
---|
| 65 |
|
---|
[84e4cae] | 66 | <para>And fix the permissions on the static library:</para>
|
---|
| 67 |
|
---|
| 68 | <screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
|
---|
| 69 |
|
---|
[dfddb12] | 70 | <para>It is good policy and common practice to place important libraries into
|
---|
| 71 | the <filename class="directory">/lib</filename> directory. This matters most
|
---|
| 72 | in scenarios where <filename class="directory">/usr</filename> is on a
|
---|
[db9d773c] | 73 | separate partition. Essentially, the run-time components of any libraries that
|
---|
| 74 | are used by programs in <filename class="directory">/bin</filename> or
|
---|
[dfddb12] | 75 | <filename class="directory">/sbin</filename> should reside in
|
---|
| 76 | <filename class="directory">/lib</filename> so that they are on the root
|
---|
| 77 | partition and available in the event of
|
---|
| 78 | <filename class="directory">/usr</filename> being inaccessible.</para>
|
---|
| 79 |
|
---|
[db9d773c] | 80 | <para>For the above reason we move the run-time components of the shared Zlib
|
---|
| 81 | into <filename class="directory">/lib</filename>:</para>
|
---|
[73aedd1d] | 82 |
|
---|
| 83 | <screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
|
---|
| 84 |
|
---|
[8ad7980] | 85 | <para>Now we need to fix the <filename class="symlink">/usr/lib/libz.so</filename> symlink
|
---|
[db9d773c] | 86 | because we just moved the file it points to:</para>
|
---|
[73aedd1d] | 87 |
|
---|
| 88 | <screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
|
---|
| 89 |
|
---|
[1fe35e1] | 90 | </section>
|
---|
[24380c7] | 91 |
|
---|
[5888299] | 92 |
|
---|
[1fe35e1] | 93 | <section xml:id="contents-zlib" role="content"><info><title>Contents of Zlib</title></info>
|
---|
[673b0d8] | 94 |
|
---|
[c6cb3aa] | 95 | <segmentedlist>
|
---|
| 96 | <segtitle>Installed libraries</segtitle>
|
---|
| 97 | <seglistitem><seg>libz[a,so]</seg></seglistitem>
|
---|
| 98 | </segmentedlist>
|
---|
[24380c7] | 99 |
|
---|
[c6cb3aa] | 100 | <variablelist><title>Short description</title>
|
---|
[673b0d8] | 101 |
|
---|
[1fe35e1] | 102 | <varlistentry xml:id="libz">
|
---|
[8ad7980] | 103 | <term><filename class="libraryfile">libz*</filename></term>
|
---|
[c6cb3aa] | 104 | <listitem>
|
---|
[673b0d8] | 105 | <indexterm zone="ch-system-zlib libz"><primary sortas="c-libz*">libz*</primary></indexterm>
|
---|
[c6cb3aa] | 106 | <para>contains compression and un-compression
|
---|
[673b0d8] | 107 | functions used by some programs.</para>
|
---|
[c6cb3aa] | 108 | </listitem>
|
---|
| 109 | </varlistentry>
|
---|
| 110 | </variablelist>
|
---|
[673b0d8] | 111 |
|
---|
[1fe35e1] | 112 | </section>
|
---|
[673b0d8] | 113 |
|
---|
[1fe35e1] | 114 | </section>
|
---|