source: chapter06/zlib.xml@ 47045599

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 47045599 was 7a8f9f3f, checked in by Randy McMurchy <randy@…>, 14 years ago

Fixed a typo in the Zlib instructions

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

  • Property mode set to 100644
File size: 3.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-zlib" role="wrap">
9 <?dbhtml filename="zlib.html"?>
10
11 <sect1info condition="script">
12 <productname>zlib</productname>
13 <productnumber>&zlib-version;</productnumber>
14 <address>&zlib-url;</address>
15 </sect1info>
16
17 <title>Zlib-&zlib-version;</title>
18
19 <indexterm zone="ch-system-zlib">
20 <primary sortas="a-Zlib">Zlib</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Zlib package contains compression and decompression routines used by
27 some programs.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&zlib-ch6-sbu;</seg>
35 <seg>&zlib-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Zlib</title>
43
44 <para>First, fix a typo in the package header file:</para>
45
46<screen><userinput remap="pre">sed -i 's/ifdef _LARGEFILE64_SOURCE/ifndef _LARGEFILE64_SOURCE/' zlib.h</userinput></screen>
47
48 <para>Prepare Zlib for compilation:</para>
49
50<screen><userinput remap="configure">CFLAGS='-mstackrealign -fPIC -O3' ./configure --prefix=/usr</userinput></screen>
51
52 <variablelist>
53 <title>The meaning of the new configure environment variable:</title>
54
55 <varlistentry>
56 <term><envar>CFLAGS='-mstackrealign -fPIC -O3'</envar></term>
57 <listitem>
58 <para>Setting CFLAGS overrides the default optimization in the
59 package to prevent some run time errors. Note that the -mstackrealign
60 may cause build failures in non-Intel architecture systems.</para>
61 </listitem>
62 </varlistentry>
63 </variablelist>
64
65
66
67 <para>Compile the package:</para>
68
69<screen><userinput remap="make">make</userinput></screen>
70
71 <para>To test the results, issue:</para>
72
73<screen><userinput remap="test">make check</userinput></screen>
74
75 <para>Install the package:</para>
76
77<screen><userinput remap="install">make install</userinput></screen>
78
79 <para>The shared library needs to be moved to
80 <filename class="directory">/lib</filename>, and as a result the
81 <filename class="extension">.so</filename> file in
82 <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
83
84<screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib
85ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
86
87 </sect2>
88
89 <sect2 id="contents-zlib" role="content">
90 <title>Contents of Zlib</title>
91
92 <segmentedlist>
93 <segtitle>Installed libraries</segtitle>
94
95 <seglistitem>
96 <seg>libz.{a,so}</seg>
97 </seglistitem>
98 </segmentedlist>
99
100 <variablelist>
101 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
102 <?dbfo list-presentation="list"?>
103 <?dbhtml list-presentation="table"?>
104
105 <varlistentry id="libz">
106 <term><filename class="libraryfile">libz</filename></term>
107 <listitem>
108 <para>Contains compression and decompression functions used by
109 some programs</para>
110 <indexterm zone="ch-system-zlib libz">
111 <primary sortas="c-libz">libz</primary>
112 </indexterm>
113 </listitem>
114 </varlistentry>
115
116 </variablelist>
117
118 </sect2>
119
120</sect1>
Note: See TracBrowser for help on using the repository browser.