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">
|
---|
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 | <para>The Zlib package contains compression and un-compression routines used by
|
---|
13 | some programs.</para>
|
---|
14 |
|
---|
15 | <screen>&buildtime; 0.1 SBU
|
---|
16 | &diskspace; 1.5 MB</screen>
|
---|
17 |
|
---|
18 | <para>Zlib installation depends on: Binutils, Coreutils, GCC, Glibc, Make, Sed.</para>
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 | <sect2>
|
---|
23 | <title>Installation of Zlib</title>
|
---|
24 |
|
---|
25 | <note><para>Zlib is known to build its shared library incorrectly if CFLAGS is
|
---|
26 | specified in the environment. If you are using your own CFLAGS variable, be
|
---|
27 | sure to add the <emphasis>-fPIC</emphasis> directive to your CFLAGS for the
|
---|
28 | duration of the below <command>configure</command> command, then remove it
|
---|
29 | afterwards.</para></note>
|
---|
30 |
|
---|
31 | <para>Prepare Zlib for compilation:</para>
|
---|
32 |
|
---|
33 | <screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
|
---|
34 |
|
---|
35 | <para>Compile the package:</para>
|
---|
36 |
|
---|
37 | <screen><userinput>make</userinput></screen>
|
---|
38 |
|
---|
39 | <para>To test the results, issue:
|
---|
40 | <userinput>make check</userinput>.</para>
|
---|
41 |
|
---|
42 | <para>Install the shared library:</para>
|
---|
43 |
|
---|
44 | <screen><userinput>make install</userinput></screen>
|
---|
45 |
|
---|
46 | <para>Now also build the non-shared (static) library:</para>
|
---|
47 | <screen><userinput>make clean
|
---|
48 | ./configure --prefix=/usr
|
---|
49 | make</userinput></screen>
|
---|
50 |
|
---|
51 | <para>To again test the results, issue:
|
---|
52 | <userinput>make check</userinput>.</para>
|
---|
53 |
|
---|
54 | <para>Install the static library:</para>
|
---|
55 |
|
---|
56 | <screen><userinput>make install</userinput></screen>
|
---|
57 |
|
---|
58 | <para>And fix the permissions on the static library:</para>
|
---|
59 |
|
---|
60 | <screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
|
---|
61 |
|
---|
62 | <para>It is good policy and common practice to place important libraries into
|
---|
63 | the <filename class="directory">/lib</filename> directory. This matters most
|
---|
64 | in scenarios where <filename class="directory">/usr</filename> is on a
|
---|
65 | separate partition. Essentially, the run-time components of any libraries that
|
---|
66 | are used by programs in <filename class="directory">/bin</filename> or
|
---|
67 | <filename class="directory">/sbin</filename> should reside in
|
---|
68 | <filename class="directory">/lib</filename> so that they are on the root
|
---|
69 | partition and available in the event of
|
---|
70 | <filename class="directory">/usr</filename> being inaccessible.</para>
|
---|
71 |
|
---|
72 | <para>For the above reason we move the run-time components of the shared Zlib
|
---|
73 | into <filename class="directory">/lib</filename>:</para>
|
---|
74 |
|
---|
75 | <screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
|
---|
76 |
|
---|
77 | <para>Now we need to fix the <filename>/usr/lib/libz.so</filename> symlink
|
---|
78 | because we just moved the file it points to:</para>
|
---|
79 |
|
---|
80 | <screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
|
---|
81 |
|
---|
82 | </sect2>
|
---|
83 |
|
---|
84 |
|
---|
85 | <sect2 id="contents-zlib"><title>Contents of Zlib</title>
|
---|
86 |
|
---|
87 | <para><emphasis>Installed libraries</emphasis>: libz[a,so]</para>
|
---|
88 |
|
---|
89 | </sect2>
|
---|
90 |
|
---|
91 |
|
---|
92 | <sect2><title>Short description</title>
|
---|
93 |
|
---|
94 | <indexterm zone="ch-system-zlib libz"><primary sortas="c-libz*">libz*</primary></indexterm>
|
---|
95 | <para id="libz"><command>libz*</command> contains compression and un-compression
|
---|
96 | functions used by some programs.</para>
|
---|
97 |
|
---|
98 | </sect2>
|
---|
99 |
|
---|
100 |
|
---|
101 |
|
---|
102 | </sect1>
|
---|