source: chapter06/zlib.xml@ 9c9d585

Last change on this file since 9c9d585 was 1fe35e1, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • (chapter06/*.xml) RELAX NG validation fixes

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4356 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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