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