📄 perl-64bit.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.34. Perl-5.8.8 </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-x86_64-Multilib"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Multilib </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="procps-64bit.html" title= "Procps-3.2.6 64 Bit">Prev</a> <p> Procps-3.2.6 64 Bit </p> </li> <li class="next"> <a accesskey="n" href="iproute2.html" title= "IPRoute2-2.6.15-060110">Next</a> <p> IPRoute2-2.6.15-060110 </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-x86_64-Multilib"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.34. Perl-5.8.8 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Perl package contains the Practical Extraction and Report Language. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Iana-Etc, Make, Patch, and Sed</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.34.1. Installation of Perl </h2> </div> <p> In multilib builds we install compilers and libraries for each available architecture. The description below says that perl installs several hundred libraries, but they are used by invoking <span><strong class="command">perl</strong></span>, not by linking to them with <span><strong class="command">ld</strong></span>. Although it is possible to install perl for 32 bits, move it to a different name, and then install the 64-bit version, it is almost always invoked as just <span><strong class= "command">perl</strong></span>. That means only the libraries and modules for the last version installed will be accessible. We therefore only install one version. </p> <p> Perl does not, by default, know about library directories with names other than lib, such as lib64. The following patch will allow it to install to lib64. </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../perl-5.8.8-Configure_multilib-1.patch</kbd></pre> <p> There is a further (possibly cosmetic) anomaly - if we install perl and then run <span><strong class="command">perl -V</strong></span> it will claim that libc is in /lib. The following patch fixes this, but only takes effect when <span><strong class="command">make install</strong></span> is run. </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../perl-5.8.8-libc_lib64-1.patch</kbd></pre> <p> We still need to tell perl to actually use lib64 </p> <pre class="userinput"><kbd class="command">echo 'installstyle="lib64/perl5"' >>hints/linux.sh</kbd></pre> <p> Before starting to configure, create a basic <tt class= "filename">/etc/hosts</tt> file which will be referenced in one of Perl's configuration files as well as being used used by the testsuite if you run that. </p> <pre class="userinput"><kbd class="command">echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</kbd></pre> <p> To have full control over the way Perl is set up, run the interactive <span><strong class="command">Configure</strong></span> script and hand-pick the way this package is built. If the defaults it auto-detects are suitable, prepare Perl for compilation with: </p> <pre class="userinput"><kbd class="command">./configure.gnu --prefix=/usr -Dpager="/bin/less -isR" \ -Dlibpth="/usr/local/lib64 /lib64 /usr/lib64" \ -Dcc="gcc ${BUILD64}"</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the new configure option:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>-Dlibpth="/usr/local/lib64 /lib64 /usr/lib64"</tt></em></span> </dt> <dd> <p> This tells Perl to link against the 64-bit libraries. </p> </dd> <dt> <span class="term"><em class="parameter"><tt>-Dpager="/bin/less -isR"</tt></em></span> </dt> <dd> <p> This corrects an error in the way that <span><strong class= "command">perldoc</strong></span> invokes the <span><strong class="command">less</strong></span> program. </p> </dd> </dl> </div> <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 test</tt></strong>. </p> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make install</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-perl" name="contents-perl"></a> <h2 class="sect2"> 10.34.2. Contents of Perl </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed programs:</span></strong> <span class="seg">a2p, c2ph, dprofpp, enc2xs, find2perl, h2ph, h2xs, libnetcfg, perl, perl5.8.8 (link to perl), perlbug, perlcc, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text, pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link to c2ph), s2p, splain, and xsubpp</span> </div> <div class="seg"> <strong><span class="segtitle">Installed libraries:</span></strong> <span class="seg">Several hundred which cannot all be listed here</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3687959" name="id3687959"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="a2p" name="a2p"></a><span class= "term"><span><strong class= "command">a2p</strong></span></span> </td> <td> <p> Translates awk to Perl </p> </td> </tr> <tr> <td> <a id="c2ph" name="c2ph"></a><span class= "term"><span><strong class= "command">c2ph</strong></span></span> </td> <td> <p> Dumps C structures as generated from <span><strong class= "command">cc -g -S</strong></span> </p> </td> </tr> <tr> <td> <a id="dprofpp" name="dprofpp"></a><span class= "term"><span><strong class= "command">dprofpp</strong></span></span> </td> <td> <p> Displays Perl profile data </p> </td> </tr> <tr> <td> <a id="en2cxs" name="en2cxs"></a><span class= "term"><span><strong class= "command">en2cxs</strong></span></span> </td> <td> <p> Builds a Perl extension for the Encode module from either Unicode Character Mappings or Tcl Encoding Files </p> </td> </tr> <tr> <td> <a id="find2perl" name="find2perl"></a><span class= "term"><span><strong class= "command">find2perl</strong></span></span> </td> <td> <p> Translates <span><strong class= "command">find</strong></span> commands to Perl </p> </td> </tr> <tr> <td> <a id="h2ph" name="h2ph"></a><span class= "term"><span><strong class= "command">h2ph</strong></span></span> </td> <td> <p> Converts <tt class="filename">.h</tt> C header files to <tt class="filename">.ph</tt> Perl header files </p> </td> </tr> <tr> <td> <a id="h2xs" name="h2xs"></a><span class= "term"><span><strong class= "command">h2xs</strong></span></span> </td> <td> <p> Converts <tt class="filename">.h</tt> C header files to Perl extensions </p> </td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -