6.45. Perl-5.20.2
The Perl package contains the Practical Extraction and Report
Language.
Approximate build time:
6.5 SBU
Required disk space:
301 MB
6.45.1. Installation of Perl
First create a basic /etc/hosts
file
to be referenced in one of Perl's configuration files as well as
the optional test suite:
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
Perl does not, by default, know about library directories with
names other than lib, The following patch will allow it to install
to other directories:
patch -Np1 -i ../perl-5.20.2-Configure_multilib-2.patch
Back up the hints/linux.sh and cpan/Compress-Raw-Zlib/config.in
files so they can be reset between platforms:
cp -v hints/linux.sh hints/linux.sh.bak
cp -v cpan/Compress-Raw-Zlib/config.in cpan/Compress-Raw-Zlib/config.in.bak
6.45.2. 32-bit Installation
This version of Perl now builds the Compress::Raw::Zlib and
Compress::Raw::BZip2 modules. By default Perl will use an internal
copy of the sources for the build. Issue the following command so
that Perl will use the libraries installed on the system:
export BUILD_ZLIB=False
export BUILD_BZIP2=0
There is a further (possibly cosmetic) anomaly - if we install perl
and then run perl -V
it will claim that libc is in /lib. The following sed fixes this,
but only takes effect when make
install is run:
sed -i "/libc/s@/lib@/lib32@" hints/linux.sh
We still need to tell perl to actually use lib32:
echo 'installstyle="lib32/perl5"' >>hints/linux.sh
To have full control over the way Perl is set up, you can remove
the “-des” options from the following
command and hand-pick the way this package is built. Alternatively,
use the command exactly as below to use the defaults that Perl
auto-detects:
sh Configure -des -Dprefix=/usr \
-Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \
-Dlibpth="/usr/local/lib32 /lib32 /usr/lib32" \
-Dcc="gcc -m32" \
-Duseshrplib
The meaning of the configure options:
-
-Dvendorprefix=/usr
-
This ensures perl knows how to tell
packages where they should install their perl modules.
-
-Dpager="/usr/bin/less
-isR"
-
This ensures that less
is used instead of
more
.
-
-Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3
-
Since Groff is not installed yet, Configure thinks that we do
not want man pages for Perl. Issuing these parameters
overrides this decision.
-
-Duseshrplib
-
Build a shared libperl needed by some perl modules.
-
-Dlibpth="/usr/local/lib32 /lib32
/usr/lib32"
-
This tells Perl to link against the 32-bit libraries.
Compile the package:
make
To test the results (approximately 2.5 SBU), issue:
make -k test
Install the package and clean up:
make install
unset BUILD_ZLIB BUILD_BZIP2
Add a suffix to the perl binary which will be used by
the multiarch wrapper:
mv -v /usr/bin/perl{,-32}
mv -v /usr/bin/perl5.20.2{,-32}
Clean up the build directory and restore the hints/linux.sh and
cpan/Compress-Raw-Zlib/config.in files before moving on to the next
platform:
make distclean
cp -v hints/linux.sh.bak hints/linux.sh
cp -v cpan/Compress-Raw-Zlib/config.in.bak cpan/Compress-Raw-Zlib/config.in
6.45.3. x32 ABI Installation
This version of Perl now builds the Compress::Raw::Zlib and
Compress::Raw::BZip2 modules. By default Perl will use an internal
copy of the sources for the build. Issue the following command so
that Perl will use the libraries installed on the system:
export BUILD_ZLIB=False
export BUILD_BZIP2=0
There is a further (possibly cosmetic) anomaly - if we install perl
and then run perl -V
it will claim that libc is in /lib. The following sed fixes this,
but only takes effect when make
install is run:
sed -i "/libc/s@/lib@/libx32@" hints/linux.sh
We still need to tell perl to actually use libx32:
echo 'installstyle="libx32/perl5"' >>hints/linux.sh
To have full control over the way Perl is set up, you can remove
the “-des” options from the following
command and hand-pick the way this package is built. Alternatively,
use the command exactly as below to use the defaults that Perl
auto-detects:
sh Configure -des -Dprefix=/usr \
-Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \
-Dlibpth="/usr/local/libx32 /libx32 /usr/libx32" \
-Dcc="gcc -mx32" \
-Duseshrplib
The meaning of the configure options:
-
-Dvendorprefix=/usr
-
This ensures perl knows how to tell
packages where they should install their perl modules.
-
-Dpager="/usr/bin/less
-isR"
-
This ensures that less
is used instead of
more
.
-
-Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3
-
Since Groff is not installed yet, Configure thinks that we do
not want man pages for Perl. Issuing these parameters
overrides this decision.
-
-Duseshrplib
-
Build a shared libperl needed by some perl modules.
-
-Dlibpth="/usr/local/libx32 /libx32
/usr/libx32"
-
This tells Perl to link against the x32 ABI libraries.
Compile the package:
make
To test the results (approximately 2.5 SBU), issue:
make -k test
Install the package and clean up:
make install
unset BUILD_ZLIB BUILD_BZIP2
Add a suffix to the perl binary which will be used by
the multiarch wrapper:
mv -v /usr/bin/perl{,-x32}
mv -v /usr/bin/perl5.20.2{,-x32}
Clean up the build directory and restore the hints/linux.sh and
cpan/Compress-Raw-Zlib/config.in files before moving on to the next
platform:
make distclean
cp -v hints/linux.sh.bak hints/linux.sh
cp -v cpan/Compress-Raw-Zlib/config.in.bak cpan/Compress-Raw-Zlib/config.in
6.45.4. 64-bit Installation
This version of Perl now builds the Compress::Raw::Zlib and
Compress::Raw::BZip2 modules. By default Perl will use an internal
copy of the sources for the build. Issue the following command so
that Perl will use the libraries installed on the system:
export BUILD_ZLIB=False
export BUILD_BZIP2=0
To have full control over the way Perl is set up, you can remove
the “-des” options from the following
command and hand-pick the way this package is built. Alternatively,
use the command exactly as below to use the defaults that Perl
auto-detects:
sh Configure -des -Dprefix=/usr \
-Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \
-Duseshrplib
The meaning of the configure options:
-
-Dvendorprefix=/usr
-
This ensures perl knows how to tell
packages where they should install their perl modules.
-
-Dpager="/usr/bin/less
-isR"
-
This ensures that less
is used instead of
more
.
-
-Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3
-
Since Groff is not installed yet, Configure thinks that we do
not want man pages for Perl. Issuing these parameters
overrides this decision.
-
-Duseshrplib
-
Build a shared libperl needed by some perl modules.
Compile the package:
make
To test the results (approximately 2.5 SBU), issue:
make -k test
Install the package and clean up:
make install
unset BUILD_ZLIB BUILD_BZIP2
Add a suffix to the perl binary which will be used by
the multiarch wrapper:
mv -v /usr/bin/perl{,-64}
mv -v /usr/bin/perl5.20.2{,-64}
Now we need to create a link to the multiarch wrapper that lets us
choose which perl installation to use:
ln -sv multiarch_wrapper /usr/bin/perl
ln -sv multiarch_wrapper /usr/bin/perl5.20.2
The value of the USE_ARCH
environment
variable will decide which perl binary to execute. USE_ARCH=32 perl -V:cc will give
the value of CC used to build the 32bit perl. The multiarch_wrapper
will help later with building perl extensions and bindings. Without
the multiarch_wrapper it is very hard to setup a 32bit extension or
binding.
6.45.5. Contents of
Perl
Installed programs:
a2p, c2ph, config_data, corelist, cpan,
cpan2dist, cpanp, cpanp-run-perl, enc2xs, find2perl, h2ph,
h2xs, instmodsh, json_pp, libnetcfg, perl, perl5.20.2 (link to
perl), perlbug, perldoc, perlivp, perlthanks (link to perlbug),
piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text,
pod2usage, podchecker, podselect, prove, psed (link to s2p),
pstruct (link to c2ph), ptar, ptardiff, ptargrep, s2p, shasum,
splain, xsubpp, and zipdetails
Installed libraries:
Several hundred which cannot all be
listed here
Installed directory:
/usr/lib/perl5
Short Descriptions
a2p
|
Translates awk to Perl
|
c2ph
|
Dumps C structures as generated from cc -g -S
|
config_data
|
Queries or changes configuration of Perl modules
|
corelist
|
A commandline frontend to Module::CoreList
|
cpan
|
Interact with the Comprehensive Perl Archive Network
(CPAN) from the command line
|
cpan2dist
|
The CPANPLUS distribution creator
|
cpanp
|
The CPANPLUS launcher
|
cpanp-run-perl
|
Perl script that is used to enable flushing of the output
buffer after each write in spawned processes
|
enc2xs
|
Builds a Perl extension for the Encode module from either
Unicode Character Mappings or Tcl Encoding Files
|
find2perl
|
Translates find commands to Perl
|
h2ph
|
Converts .h C header files
to .ph Perl header files
|
h2xs
|
Converts .h C header files
to Perl extensions
|
instmodsh
|
Shell script for examining installed Perl modules, and
can even create a tarball from an installed module
|
json_pp
|
Converts data between certain input and output formats
|
libnetcfg
|
Can be used to configure the libnet Perl module
|
perl
|
Combines some of the best features of C, sed, awk and sh into a single
swiss-army language
|
perl5.20.2
|
A hard link to perl
|
perlbug
|
Used to generate bug reports about Perl, or the modules
that come with it, and mail them
|
perldoc
|
Displays a piece of documentation in pod format that is
embedded in the Perl installation tree or in a Perl
script
|
perlivp
|
The Perl Installation Verification Procedure; it can be
used to verify that Perl and its libraries have been
installed correctly
|
perlthanks
|
Used to generate thank you messages to mail to the Perl
developers
|
piconv
|
A Perl version of the character encoding converter
iconv
|
pl2pm
|
A rough tool for converting Perl4 .pl files to Perl5 .pm modules
|
pod2html
|
Converts files from pod format to HTML format
|
pod2latex
|
Converts files from pod format to LaTeX format
|
pod2man
|
Converts pod data to formatted *roff input
|
pod2text
|
Converts pod data to formatted ASCII text
|
pod2usage
|
Prints usage messages from embedded pod docs in files
|
podchecker
|
Checks the syntax of pod format documentation files
|
podselect
|
Displays selected sections of pod documentation
|
prove
|
Command line tool for running tests against the
Test::Harness module
|
psed
|
A Perl version of the stream editor sed
|
pstruct
|
Dumps C structures as generated from cc -g -S stabs
|
ptar
|
A tar-like
program written in Perl
|
ptardiff
|
A Perl program that compares an extracted archive with an
unextracted one
|
ptargrep
|
A Perl program that applies pattern matching to the
contents of files in a tar archive
|
s2p
|
Translates sed scripts to Perl
|
shasum
|
Prints or checks SHA checksums
|
splain
|
Is used to force verbose warning diagnostics in Perl
|
xsubpp
|
Converts Perl XS code into C code
|
zipdetails
|
Displays details about the internal structure of a Zip
file
|