10.4. Temporary Perl-5.20.0

The Perl package contains the Practical Extraction and Report Language.

10.4.1. Installation of Perl

[Note]

Note

In this section, we will add Perl to the temporary system in /tools. This package installation should technically be part of Constructing a Temporary System, but Perl has often had problems with cross-compiling, so we will compile and install it while in the final build environment.

Change a hardcoded path from /usr/include to /tools/include:

sed -i 's@/usr/include@/tools/include@g' ext/Errno/Errno_pm.PL

Prepare Temporary Perl for compilation:

./configure.gnu --prefix=/tools  -Dcc="gcc ${BUILD32}"

The meaning of the configure option:

-Dcc="gcc"

Tells Perl to use gcc instead of the default cc.

Compile the package:

make

Although Perl comes with a test suite, it is not recommended to run it at this point, as this Perl installation is only temporary. The test suite can be run later in this chapter if desired.

Install the package:

make install

Finally, create a necessary symlink:

ln -sfv /tools/bin/perl /usr/bin

Details on this package are located in Section 10.55.2, “Contents of Perl.”