📄 zlib.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 10.11. Zlib-1.2.3 </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="coreutils.html" title= "Coreutils-5.94">Prev</a> <p> Coreutils-5.94 </p> </li> <li class="next"> <a accesskey="n" href="iana-etc.html" title= "Iana-Etc-2.00">Next</a> <p> Iana-Etc-2.00 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.11. Zlib-1.2.3 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Zlib package contains compression and decompression routines used by some programs. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Binutils, Coreutils, GCC, Glibc, Make, and Sed</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.11.1. Installation of Zlib </h2> </div> <p> This patch will add -fPIC to our build and allow us to build a static and shared library at the same time: </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../zlib-1.2.3-fPIC-1.patch</kbd></pre> <p> Prepare Zlib for compilation: </p> <pre class="userinput"><kbd class="command">./configure --prefix=/usr --shared</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make</kbd></pre> <p> To test the results, issue: <strong class="userinput"><tt>make check</tt></strong>. </p> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make install</kbd></pre> <p> The previous command installed a <tt class="filename">.so</tt> file in <tt class="filename">/usr/lib</tt>. We will remove itinto <tt class="filename">/lib</tt> and then relink it to <tt class= "filename">/usr/lib</tt>: </p> <pre class="userinput"><kbd class="command">mv -v /usr/lib/libz.so.* /libln -svf ../../lib/libz.so.1 /usr/lib/libz.so</kbd></pre> <p> Now we fix the permissions on the static library: </p> <pre class="userinput"><kbd class="command">chmod -v 644 /usr/lib/libz.a</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-zlib" name="contents-zlib"></a> <h2 class="sect2"> 10.11.2. Contents of Zlib </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed libraries:</span></strong> <span class="seg">libz.[a,so]</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3668578" name="id3668578"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="libz" name="libz"></a><span class="term"><tt class= "filename">libz</tt></span> </td> <td> <p> Contains compression and decompression functions used by some programs </p> </td> </tr> </tbody> </table> </div> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="coreutils.html" title= "Coreutils-5.94">Prev</a> <p> Coreutils-5.94 </p> </li> <li class="next"> <a accesskey="n" href="iana-etc.html" title= "Iana-Etc-2.00">Next</a> <p> Iana-Etc-2.00 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -