blob: 78db26c7e4e92556492e92c185187baf7c492085 (
plain)
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
|
<sect1 id="ch06-zlib">
<title>Installing Zlib-&zlib-version;</title>
<?dbhtml filename="zlib.html" dir="chapter06"?>
<screen>Estimated build time: &zlib-time;
Estimated required disk space: &zlib-compsize;</screen>
&aa-zlib-shortdesc;
&aa-zlib-desc;
<sect2><title> </title><para> </para></sect2>
<sect2>
<title>Installation of Zlib</title>
<para>Zlib has a potential buffer overflow in its
<emphasis>gzprintf()</emphasis> function, that, though difficult to take
advantage of, should be taken care of by applying this patch:</para>
<screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen>
<para>Now prepare Zlib for compilation:</para>
<screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
<para>Note: Zlib is known to build its shared library incorrectly if a CFLAGS
is specified in the environment. If you are using your own CFLAGS variables,
ensure you add the <emphasis role="strong">-fPIC</emphasis> directive during
this stage, and remove it afterwards.</para>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
<para>Install the shared libraries:</para>
<screen><userinput>make install</userinput></screen>
<para>Now also build the non-shared libraries:</para>
<screen><userinput>make clean
./configure --prefix=/usr
make</userinput></screen>
<para>This package has a test suite available which can perform a number of
checks to ensure it built correctly. Should you choose to run it, the
following command will do so:</para>
<screen><userinput>make test</userinput></screen>
<para>And install the package:</para>
<screen><userinput>make install</userinput></screen>
<para>The shared Zlib library should be installed in the
<filename>/lib</filename> directory. That way, in the event
that you must boot without the <filename>/usr</filename>
directory, vital system programs will still have access to
the library:</para>
<screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
<para>The <filename>/usr/lib/libz.so</filename> symlink is
linked to a file which no longer exists, because we moved
it. Create a symbolic link to the new location of the
library:</para>
<screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
<para>Zlib does not install its manual page. Issue the
following command to install this documentation:</para>
<screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen>
</sect2>
</sect1>
|