| [6bef17d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
 | 
|---|
| [aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
 | 3 |   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
| [6bef17d] | 4 |   <!ENTITY % general-entities SYSTEM "../../general.ent">
 | 
|---|
 | 5 |   %general-entities;
 | 
|---|
 | 6 | ]>
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | <sect1 id="ch-system-temp-perl" role="wrap">
 | 
|---|
 | 9 |   <?dbhtml filename="temp-perl.html"?>
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 |   <title>Temporary Perl-&perl-version;</title>
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 |   <indexterm zone="ch-system-temp-perl">
 | 
|---|
 | 14 |     <primary sortas="a-Perl">Perl</primary>
 | 
|---|
 | 15 |     <secondary>temporary tools</secondary>
 | 
|---|
 | 16 |   </indexterm>
 | 
|---|
 | 17 | 
 | 
|---|
| [dabbced] | 18 |   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
 | 
|---|
| [6bef17d] | 19 |   href="../../final-system/common/perl.xml"
 | 
|---|
 | 20 |   xpointer="xpointer(//*[@role='package'])"/>
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 |   <sect2 role="installation">
 | 
|---|
 | 23 |     <title>Installation of Perl</title>
 | 
|---|
 | 24 | 
 | 
|---|
| [d5cb735] | 25 |     <note os="a">
 | 
|---|
| [433aebb2] | 26 |       <para>In this section, we will add Perl to the temporary system in
 | 
|---|
 | 27 |       <filename class="directory">/tools</filename>. This package installation
 | 
|---|
 | 28 |       should technically be part of
 | 
|---|
 | 29 |       <xref linkend="chapter-temp-system"/>, but Perl has often had problems
 | 
|---|
 | 30 |       with cross-compiling, so we will compile and install it while in the
 | 
|---|
 | 31 |       final build environment.</para>
 | 
|---|
| [d5cb735] | 32 |     </note>
 | 
|---|
 | 33 | 
 | 
|---|
| [f698c15d] | 34 |     <para os="s1">Change a hardcoded path from
 | 
|---|
 | 35 |     <filename class="directory">/usr/include</filename> to
 | 
|---|
 | 36 |     <filename class="directory">/tools/include</filename>:</para>
 | 
|---|
| [6bef17d] | 37 | 
 | 
|---|
| [c5c8ee8] | 38 | <screen os="s2"><userinput>sed -i 's@/usr/include@/tools/include@g' ext/Errno/Errno_pm.PL</userinput></screen>
 | 
|---|
 | 39 | 
 | 
|---|
| [1532fcd] | 40 | <para os="c">Prepare Temporary Perl for compilation:</para>
 | 
|---|
| [c5c8ee8] | 41 | 
 | 
|---|
| [b27081c4] | 42 | <screen os="d"><userinput>./configure.gnu \
 | 
|---|
 | 43 |     --prefix=/tools \
 | 
|---|
 | 44 |     -Dcc="gcc"</userinput></screen>
 | 
|---|
| [76cf100] | 45 | 
 | 
|---|
 | 46 |     <variablelist os="e">
 | 
|---|
| [6bef17d] | 47 |       <title>The meaning of the configure option:</title>
 | 
|---|
 | 48 | 
 | 
|---|
 | 49 |       <varlistentry>
 | 
|---|
| [4e1dce4] | 50 |         <term><parameter>-Dcc="gcc"</parameter></term>
 | 
|---|
| [6bef17d] | 51 |         <listitem>
 | 
|---|
| [4e1dce4] | 52 |           <para>Tells Perl to use <command>gcc</command> instead of the
 | 
|---|
 | 53 |           default <command>cc</command>.</para>
 | 
|---|
| [6bef17d] | 54 |         </listitem>
 | 
|---|
 | 55 |       </varlistentry>
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 |     </variablelist>
 | 
|---|
 | 58 | 
 | 
|---|
| [4e1dce4] | 59 |   <para os="f">Compile the package:</para>
 | 
|---|
| [6bef17d] | 60 | 
 | 
|---|
| [369ec62] | 61 | <screen os="g"><userinput>make</userinput></screen>
 | 
|---|
| [6bef17d] | 62 | 
 | 
|---|
| [6c4e93e] | 63 |   <para os="h">Although Perl comes with a test suite, it is not recommended
 | 
|---|
| [4e1dce4] | 64 |   to run it at this point, as this Perl installation is only temporary. The
 | 
|---|
 | 65 |   test suite can be run later in this chapter if desired.</para>
 | 
|---|
| [6bef17d] | 66 | 
 | 
|---|
| [4e1dce4] | 67 |     <para os="i">Install the package:</para>
 | 
|---|
| [6c4e93e] | 68 | 
 | 
|---|
| [369ec62] | 69 | <screen os="j"><userinput>make install</userinput></screen>
 | 
|---|
| [6bef17d] | 70 | 
 | 
|---|
| [a22d9a5] | 71 |     <para os="k">Finally, create a necessary symlink:</para>
 | 
|---|
 | 72 | 
 | 
|---|
 | 73 | <screen os="l"><userinput>ln -sfv /tools/bin/perl /usr/bin</userinput></screen>
 | 
|---|
 | 74 | 
 | 
|---|
| [6bef17d] | 75 |   </sect2>
 | 
|---|
 | 76 | 
 | 
|---|
 | 77 |   <sect2 role="content">
 | 
|---|
 | 78 |     <title/>
 | 
|---|
 | 79 | 
 | 
|---|
 | 80 |     <para>Details on this package are located in <xref
 | 
|---|
 | 81 |     linkend="contents-perl" role="."/></para>
 | 
|---|
 | 82 | 
 | 
|---|
 | 83 |   </sect2>
 | 
|---|
 | 84 | 
 | 
|---|
 | 85 | </sect1>
 | 
|---|