This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Data::Dumper: Fix wrong #if
[perl5.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index cab8b75..5a5b53a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -43,6 +43,10 @@ rely on anything more than C89.
 
 These options, and many more, are explained in further detail below.
 
+If you're building perl from a git repository, you should also consult
+the documentation in pod/perlgit.pod for information on that special
+circumstance.
+
 If you have problems, corrections, or questions, please see
 L<"Reporting Problems"> below.
 
@@ -100,8 +104,9 @@ On a related issue, old modules may possibly be affected by the changes
 in the Perl language in the current release.  Please see
 pod/perldelta.pod for a description of what's changed.  See your
 installed copy of the perllocal.pod file for a (possibly incomplete)
-list of locally installed modules.  Also see CPAN::autobundle for one
-way to make a "bundle" of your currently installed modules.
+list of locally installed modules.  Also see the L<CPAN> module's
+C<autobundle> function for one way to make a "bundle" of your currently
+installed modules.
 
 =head1 Run Configure
 
@@ -331,38 +336,62 @@ and the long double support.
 
 =head3 Algorithmic Complexity Attacks on Hashes
 
-In Perls 5.8.0 and earlier it was easy to create degenerate hashes.
-Processing such hashes would consume large amounts of CPU time,
-enabling a "Denial of Service" attack against Perl.  Such hashes may be
-a problem for example for mod_perl sites, sites with Perl CGI scripts
-and web services, that process data originating from external sources.
-
-In Perl 5.8.1 a security feature was introduced to make it harder to
-create such degenerate hashes. A visible side effect of this was that
-the keys(), values(), and each() functions may return the hash elements
-in different order between different runs of Perl even with the same
-data.  It also had unintended binary incompatibility issues with
-certain modules compiled against Perl 5.8.0.
-
-In Perl 5.8.2 an improved scheme was introduced.  Hashes will return
-elements in the same order as Perl 5.8.0 by default.  On a hash by hash
-basis, if pathological data is detected during a hash key insertion,
-then that hash will switch to an alternative random hash seed.  As
-adding keys can always dramatically change returned hash element order,
-existing programs will not be affected by this, unless they
-specifically test for pre-recorded hash return order for contrived
-data. (eg the list of keys generated by C<map {"\0"x$_} 0..15> trigger
-randomisation) In effect the new implementation means that 5.8.1 scheme
-is only being used on hashes which are under attack.
-
-One can still revert to the old guaranteed repeatable order (and be
-vulnerable to attack by wily crackers) by setting the environment
-variable PERL_HASH_SEED, see L<perlrun/PERL_HASH_SEED>.  Another option
-is to add -DUSE_HASH_SEED_EXPLICIT to the compilation flags (for
-example by using C<Configure -Accflags=-DUSE_HASH_SEED_EXPLICIT>), in
-which case one has to explicitly set the PERL_HASH_SEED environment
-variable to enable the security feature, or by adding -DNO_HASH_SEED to
-the compilation flags to completely disable the randomisation feature.
+Perl 5.18 reworked the measures used to secure its hash function
+from algorithmic complexity attacks.  By default it will build with
+all of these measures enabled along with support for controlling and
+disabling them via environment variables.
+
+You can override various aspects of this feature by defining various
+symbols during configure. An example might be:
+
+    Configure -Accflags=-DPERL_HASH_FUNC_SIPHASH
+
+B<Unless stated otherwise these options are considered experimental or
+insecure and are not recommended for production use.>
+
+Perl 5.18 includes support for multiple hash functions, and changed
+the default (to ONE_AT_A_TIME_HARD), you can choose a different
+algorithm by defining one of the following symbols. Note that as of
+Perl 5.18 we can only recommend use of the default or SIPHASH. All
+the others are known to have security issues and are for research
+purposes only.
+
+    PERL_HASH_FUNC_SIPHASH
+    PERL_HASH_FUNC_SDBM
+    PERL_HASH_FUNC_DJB2
+    PERL_HASH_FUNC_SUPERFAST
+    PERL_HASH_FUNC_MURMUR3
+    PERL_HASH_FUNC_ONE_AT_A_TIME
+    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
+    PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
+
+Perl 5.18 randomizes the order returned by keys(), values(), and each(),
+and allows controlling this behavior by using of the PERL_PERTURB_KEYS
+option. You can disable this option entirely with the define:
+
+    PERL_PERTURB_KEYS_DISABLED
+
+You can disable the environment variable checks and specify the type of
+key traversal randomization to be used by defining one of these:
+
+    PERL_PERTURB_KEYS_RANDOM
+    PERL_PERTURB_KEYS_DETERMINISTIC
+
+In Perl 5.18 the seed used for the hash function is randomly selected
+at process start which can be overridden by specifying a seed by setting
+the PERL_HASH_SEED environment variable.
+
+You can change this behavior by building perl with the
+
+   USE_HASH_SEED_EXPLICIT
+
+define, in which case one has to explicitly set the PERL_HASH_SEED
+environment variable to enable the security feature or by adding
+
+    NO_HASH_SEED
+
+to the compilation flags to completely disable the randomisation feature.
+Note these modes are poorly tested, insecure and not recommended.
 
 B<Perl has never guaranteed any ordering of the hash keys>, and the
 ordering has already changed several times during the lifetime of Perl
@@ -373,6 +402,10 @@ between different runs of Perl, since Data::Dumper by default dumps
 hashes "unordered".  The use of the Data::Dumper C<Sortkeys> option is
 recommended.
 
+See L<perlrun/PERL_HASH_SEED> and L<perlrun/PERL_PERTURB_KEYS> for details on
+the environment variables, and L<perlsec/Algorithmic Complexity Attacks> for
+further security details.
+
 =head3 SOCKS
 
 Perl can be configured to be 'socksified', that is, to use the SOCKS
@@ -427,7 +460,7 @@ You can elect to build a shared libperl by
 
 To build a shared libperl, the environment variable controlling shared
 library search (LD_LIBRARY_PATH in most systems, DYLD_LIBRARY_PATH for
-NeXTSTEP/OPENSTEP/Darwin, LIBRARY_PATH for BeOS, LD_LIBRARY_PATH/SHLIB_PATH
+NeXTSTEP/OPENSTEP/Darwin, LD_LIBRARY_PATH/SHLIB_PATH
 for HP-UX, LIBPATH for AIX, PATH for Cygwin) must be set up to include
 the Perl build directory because that's where the shared libperl will
 be created.  Configure arranges makefile to have the correct shared
@@ -441,7 +474,7 @@ shared library path might be required.  For example, if you want to run
 something like the following with the newly-built but not-yet-installed
 ./perl:
 
-        cd t; ./perl -MTestInit misc/failing_test.t
+        ./perl -MTestInit t/misc/failing_test.t
 
 or
 
@@ -530,7 +563,7 @@ The directories set up by Configure fall into three broad categories.
 
 =item Directories for the perl distribution
 
-By default, Configure will use the following directories for 5.15.6.
+By default, Configure will use the following directories for 5.21.1.
 $version is the full perl version number, including subversion, e.g.
 5.12.3, and $archname is a string like sun4-sunos,
 determined by Configure.  The full definitions of all Configure
@@ -564,16 +597,18 @@ After perl is installed, you may later wish to add modules (e.g. from
 CPAN) or scripts.  Configure will set up the following directories to
 be used for installing those add-on modules and scripts.
 
-    Configure variable Default value
-    $siteprefixexp     $prefixexp
-    $sitebinexp                $siteprefixexp/bin
-    $sitescriptexp     $siteprefixexp/bin
-    $sitelibexp                $siteprefixexp/lib/perl5/site_perl/$version
-    $sitearchexp       $siteprefixexp/lib/perl5/site_perl/$version/$archname
-    $siteman1direxp    $siteprefixexp/man/man1
-    $siteman3direxp    $siteprefixexp/man/man3
-    $sitehtml1direxp   (none)
-    $sitehtml3direxp   (none)
+   Configure        Default
+   variable          value
+ $siteprefixexp    $prefixexp
+ $sitebinexp       $siteprefixexp/bin
+ $sitescriptexp    $siteprefixexp/bin
+ $sitelibexp       $siteprefixexp/lib/perl5/site_perl/$version
+ $sitearchexp
+               $siteprefixexp/lib/perl5/site_perl/$version/$archname
+ $siteman1direxp   $siteprefixexp/man/man1
+ $siteman3direxp   $siteprefixexp/man/man3
+ $sitehtml1direxp  (none)
+ $sitehtml3direxp  (none)
 
 By default, ExtUtils::MakeMaker will install architecture-independent
 modules into $sitelib and architecture-dependent modules into $sitearch.
@@ -584,49 +619,51 @@ Lastly, if you are building a binary distribution of perl for
 distribution, Configure can optionally set up the following directories
 for you to use to distribute add-on modules.
 
-    Configure variable Default value
-    $vendorprefixexp   (none)
-    (The next ones are set only if vendorprefix is set.)
-    $vendorbinexp      $vendorprefixexp/bin
-    $vendorscriptexp   $vendorprefixexp/bin
-    $vendorlibexp
-       $vendorprefixexp/lib/perl5/vendor_perl/$version
-    $vendorarchexp
-       $vendorprefixexp/lib/perl5/vendor_perl/$version/$archname
-    $vendorman1direxp  $vendorprefixexp/man/man1
-    $vendorman3direxp  $vendorprefixexp/man/man3
-    $vendorhtml1direxp (none)
-    $vendorhtml3direxp (none)
+   Configure          Default
+   variable            value
+ $vendorprefixexp    (none)
+
+ (The next ones are set only if vendorprefix is set.)
+
+ $vendorbinexp       $vendorprefixexp/bin
+ $vendorscriptexp    $vendorprefixexp/bin
+ $vendorlibexp       $vendorprefixexp/lib/perl5/vendor_perl/$version
+ $vendorarchexp
+           $vendorprefixexp/lib/perl5/vendor_perl/$version/$archname
+ $vendorman1direxp   $vendorprefixexp/man/man1
+ $vendorman3direxp   $vendorprefixexp/man/man3
+ $vendorhtml1direxp  (none)
+ $vendorhtml3direxp  (none)
 
 These are normally empty, but may be set as needed.  For example,
 a vendor might choose the following settings:
 
   $prefix            /usr
   $siteprefix                /usr/local
   $vendorprefix      /usr
$prefix           /usr
$siteprefix       /usr/local
$vendorprefix     /usr
 
 This would have the effect of setting the following:
 
   $binexp            /usr/bin
   $scriptdirexp      /usr/bin
   $privlibexp                /usr/lib/perl5/$version
   $archlibexp        /usr/lib/perl5/$version/$archname
   $man1direxp                /usr/man/man1
   $man3direxp                /usr/man/man3
-
   $sitebinexp                /usr/local/bin
   $sitescriptexp     /usr/local/bin
   $sitelibexp                /usr/local/lib/perl5/site_perl/$version
   $sitearchexp       /usr/local/lib/perl5/site_perl/$version/$archname
   $siteman1direxp    /usr/local/man/man1
   $siteman3direxp    /usr/local/man/man3
-
   $vendorbinexp      /usr/bin
   $vendorscriptexp   /usr/bin
   $vendorlibexp      /usr/lib/perl5/vendor_perl/$version
   $vendorarchexp     /usr/lib/perl5/vendor_perl/$version/$archname
   $vendorman1direxp  /usr/man/man1
   $vendorman3direxp  /usr/man/man3
$binexp           /usr/bin
$scriptdirexp     /usr/bin
$privlibexp       /usr/lib/perl5/$version
$archlibexp       /usr/lib/perl5/$version/$archname
$man1direxp       /usr/man/man1
$man3direxp       /usr/man/man3
+
$sitebinexp       /usr/local/bin
$sitescriptexp    /usr/local/bin
$sitelibexp       /usr/local/lib/perl5/site_perl/$version
$sitearchexp      /usr/local/lib/perl5/site_perl/$version/$archname
$siteman1direxp   /usr/local/man/man1
$siteman3direxp   /usr/local/man/man3
+
$vendorbinexp     /usr/bin
$vendorscriptexp  /usr/bin
$vendorlibexp     /usr/lib/perl5/vendor_perl/$version
$vendorarchexp    /usr/lib/perl5/vendor_perl/$version/$archname
$vendorman1direxp /usr/man/man1
$vendorman3direxp /usr/man/man3
 
 Note how in this example, the vendor-supplied directories are in the
 /usr hierarchy, while the directories reserved for the end user are in
@@ -645,7 +682,7 @@ are stored locally on your own disk and use $vendorprefix for
 site-specific files that are stored elsewhere on your organization's
 network.  One way to do that would be something like
 
      sh Configure -Dsiteprefix=/usr/local -Dvendorprefix=/usr/share/perl
+ sh Configure -Dsiteprefix=/usr/local -Dvendorprefix=/usr/share/perl
 
 =item otherlibdirs
 
@@ -841,7 +878,7 @@ must contain a space separated list of directories under the site_perl
 directory, and has to include architecture-dependent directories separately,
 eg.
 
-       sh Configure -Dinc_version_list="5.15.6/x86_64-linux 5.14.0" ...
+       sh Configure -Dinc_version_list="5.16.0/x86_64-linux 5.16.0" ...
 
 When using the newer perl, you can add these paths again in the
 PERL5LIB environment variable or with perl's -I runtime option.
@@ -922,12 +959,12 @@ Removes -g from optimize, and -DDEBUGGING from ccflags.
 If you are using a shared libperl, see the warnings about multiple
 versions of perl under L<Building a shared Perl library>.
 
-Note that a perl built with -DDEBUGGING will be bigger and will run more
-slowly than a standard perl.
+Note that a perl built with -DDEBUGGING will be much bigger and will run
+much, much more slowly than a standard perl.
 
 =head2 DTrace support
 
-On platforms where DTrace is available, it may be enabled by 
+On platforms where DTrace is available, it may be enabled by
 using the -Dusedtrace option to Configure. DTrace probes are available for
 subroutine entry (sub-entry) and subroutine exit (sub-exit). Here's a
 simple D script that uses them:
@@ -1034,10 +1071,11 @@ BerkeleyDB shared libraries.
 It is possible to specify this from the command line (all on one
 line):
 
-    sh Configure -de \
-        -Dlocincpth='/usr/local/BerkeleyDB.4.7/include /usr/local/include' \
-        -Dloclibpth='/usr/local/BerkeleyDB.4.7/lib /usr/local/lib' \
-        -Aldflags='-R/usr/local/BerkeleyDB.4.7/lib'
+ sh Configure -de \
+    -Dlocincpth='/usr/local/BerkeleyDB.4.7/include             \
+                                           /usr/local/include' \
+    -Dloclibpth='/usr/local/BerkeleyDB.4.7/lib /usr/local/lib' \
+    -Aldflags='-R/usr/local/BerkeleyDB.4.7/lib'
 
 locincpth is a space-separated list of include directories to search.
 Configure will automatically add the appropriate -I directives.
@@ -1052,6 +1090,17 @@ system.
 
 =back
 
+=head2 Specifying a logical root directory
+
+If you are cross-compiling, or are using a compiler which has it's own
+headers and libraries in a nonstandard location, and your compiler
+understands the C<--sysroot> option, you can use the C<-Dsysroot> option to
+specify the logical root directory under which all libraries and headers
+are searched for. This patch adjusts Configure to search under $sysroot, instead of /.
+    
+--sysroot is added to ccflags and friends so that make in
+ExtUtils::MakeMaker, and other extensions, will use it.
+
 =head2 Overriding an old config.sh
 
 If you want to use an old config.sh produced by a previous run of
@@ -1265,10 +1314,17 @@ lost.
 
 If you have any additional changes to make to the C compiler command
 line, they can be made in cflags.SH.  For instance, to turn off the
-optimizer on toke.c, find the line in the switch structure for
-toke.c and put the command optimize='-g' before the ;; .  You
-can also edit cflags.SH directly, but beware that your changes will be
-lost the next time you run Configure.
+optimizer on toke.c, find the switch structure marked 'or customize here',
+and add a line for toke.c ahead of the catch-all *) so that it now reads:
+
+    : or customize here
+
+    case "$file" in
+    toke) optimize='-g' ;;
+    *) ;;
+
+You should not edit the generated file cflags directly, as your changes will
+be lost the next time you run Configure, or if you edit config.sh.
 
 To explore various ways of changing ccflags from within a hint file,
 see the file hints/README.hints.
@@ -1551,14 +1607,31 @@ and start from the very beginning.  This time, unless you are sure of
 what you are doing, accept the default list of libraries suggested by
 Configure.
 
+If the libs variable is missing -lm, there is a chance that libm.so.1
+is available, but the required (symbolic) link to libm.so is missing.
+(same could be the case for other libraries like libcrypt.so).  You
+should check your installation for packages that create that link, and
+if no package is installed that supplies that link or you cannot install
+them, make the symbolic link yourself e.g.:
+
+ $ rpm -qf /usr/lib64/libm.so
+ glibc-devel-2.15-22.17.1.x86_64
+ $ ls -lgo /usr/lib64/libm.so
+ lrwxrwxrwx 1 16 Jan  7  2013 /usr/lib64/libm.so -> /lib64/libm.so.6
+
+ or
+
+ $ sudo ln -s /lib64/libm.so.6 /lib64/libm.so
+
 If the libs variable looks correct, you might have the
 L<"nm extraction"> problem discussed above.
 
 If you still have missing routines or undefined symbols, you probably
-need to add some library or other, or you need to undefine some feature
-that Configure thought was there but is defective or incomplete.  If
-you used a hint file, see if it has any relevant advice.  You can also
-look through through config.h for likely suspects.
+need to add some library or other, make a symbolic link like described
+above, or you need to undefine some feature that Configure thought was
+there but is defective or incomplete.  If you used a hint file, see if
+it has any relevant advice.  You can also look through through config.h
+for likely suspects.
 
 =item toke.c
 
@@ -1703,19 +1776,20 @@ to avoid the BIND.
 =head2 Cross-compilation
 
 Perl can be cross-compiled.  It is just not trivial, cross-compilation
-rarely is.  Perl is routinely cross-compiled for many platforms (as of
-June 2005 at least PocketPC aka WinCE, Open Zaurus, EPOC, Symbian, and
-the IBM OS/400).  These platforms are known as the B<target> platforms,
-while the systems where the compilation takes place are the B<host>
-platforms.
+rarely is.  Perl is routinely cross-compiled for several platforms: as of
+January 2014, these include Android, Blackberry 10, PocketPC aka
+WinCE, ARM Linux, and Solaris.  Previous versions of
+Perl also provided support for Open Zaurus, Symbian, and
+the IBM OS/400, but it's unknown if those ports are still functional.
+These platforms are known as the B<target> platforms, while the systems where the compilation takes place are the B<host> platforms.
 
 What makes the situation difficult is that first of all,
 cross-compilation environments vary significantly in how they are set
 up and used, and secondly because the primary way of configuring Perl
 (using the rather large Unix-tool-dependent Configure script) is not
 awfully well suited for cross-compilation.  However, starting from
-version 5.8.0, the Configure script also knows one way of supporting
-cross-compilation support, so please keep reading.
+version 5.18.0, the Configure script also knows two ways of supporting
+cross-compilation, so please keep reading.
 
 See the following files for more information about compiling Perl for
 the particular platforms:
@@ -1724,23 +1798,23 @@ the particular platforms:
 
 =item WinCE/PocketPC
 
-README.ce
+L<README.ce or perlce|perlce>
 
-=item Open Zaurus
+=item Android
 
-Cross/README
+L<"Cross-compilation" in README.android or perlandroid|perlandroid/Cross-compilation>
 
-=item EPOC
+=item Blackberry
 
-README.epoc
+L<"Cross-compilation" in README.qnx or perlqnx|perlqnx/Cross-compilation>
 
-=item Symbian
+=item Solaris
 
-README.symbian
+L<"CROSS-COMPILATION" in README.solaris or perlsolaris|perlsolaris/CROSS-COMPILATION>
 
-=item OS/400
+=item Linux
 
-README.os400
+This document; See below.
 
 =back
 
@@ -1755,28 +1829,25 @@ For some cross-compilation environments the Configure option
 C<-Dinstallprefix=...> might be handy, see L<Changing the installation
 directory>.
 
-About the cross-compilation support of Configure: what is known to
-work is running Configure in a cross-compilation environment and
-building the miniperl executable.  What is known not to work is
-building the perl executable because that would require building
-extensions: Dynaloader statically and File::Glob dynamically, for
-extensions one needs MakeMaker and MakeMaker is not yet
-cross-compilation aware, and neither is the main Makefile.
+About the cross-compilation support of Configure: There's two forms.
+The more common one requires some way of transferring and running executables
+in the target system, such as an ssh connection; this is the
+C<./Configure -Dusecrosscompile -Dtargethost=...> route.  The second method
+doesn't need access to the target system, but requires you to provide 
+a config.sh, and and a canned Makefile; the rest of this section describes
+the former.
 
-The cross-compilation setup of Configure has successfully been used in
-at least two Linux cross-compilation environments.  The setups were
-both such that the host system was Intel Linux with a gcc built for
-cross-compiling into ARM Linux, and there was a SSH connection to the
-target system.
+This cross-compilation setup of Configure has successfully been used in
+a wide variety of setups, such as a 64-bit OS X host for an Android ARM target, or
+an amd64 Linux host targeting x86 Solaris, or even Windows.
 
 To run Configure in cross-compilation mode the basic switch that
-has to be used is C<-Dusecrosscompile>.
+has to be used is C<-Dusecrosscompile>:
 
    sh ./Configure -des -Dusecrosscompile -D...
 
 This will make the cpp symbol USE_CROSS_COMPILE and the %Config
-symbol C<usecrosscompile> available, and C<xconfig.h> will be used
-for cross-compilation.
+symbol C<usecrosscompile> available.
 
 During the Configure and build, certain helper scripts will be created
 into the Cross/ subdirectory.  The scripts are used to execute a
@@ -1799,28 +1870,49 @@ You can also specify a username to use for ssh/rsh logins
 
     -Dtargetuser=luser
 
-but in case you don't, "root" will be used.
+but in case you don't, "root" will be used.  Similarly, you can specify
+a non-standard (i.e. not 22) port for the connection, if applicable, through
+
+    -Dtargetport=2222
 
-Because this is a cross-compilation effort, you will also need to specify
-which target environment and which compilation environment to use.
-This includes the compiler, the header files, and the libraries.
-In the below we use the usual settings for the iPAQ cross-compilation
-environment:
+If the name of C<cc> has the usual GNU C semantics for cross
+compilers, that is, CPU-OS-gcc, the target architecture (C<targetarch>),
+plus names of the C<ar>, C<nm>, and C<ranlib> will also be automatically
+chosen to be CPU-OS-ar and so on.
+(The C<ld> requires more thought and will be chosen later by Configure
+as appropriate).  This will also aid in guessing the proper
+operating system name for the target, which has other repercussions, like
+better defaults and possibly critical fixes for the platform.  If Configure
+isn't guessing the OS name properly, you may need to either add a hint file
+redirecting Configure's guess, or modify Configure to make the correct choice.
+
+If your compiler doesn't follow that convention, you will also need to
+specify which target environment to use, as well as C<ar> and friends:
 
     -Dtargetarch=arm-linux
-    -Dcc=arm-linux-gcc
+    -Dcc=mycrossgcc
+    -Dar=...
+
+Additionally, a cross-compilation toolchain will usually install it's own
+logical system root somewhere -- that is, it'll create a directory somewhere
+which includes subdirectories like 'include' or 'lib'.  For example, you
+may end up with C</skiff/local/arm-linux>, where 
+C</skiff/local/arm-linux/bin> holds the binaries for cross-compilation,
+C</skiff/local/arm-linux/include> has the headers, and 
+C</skiff/local/arm-linux/lib> has the library files.
+If this is the case, and you are using a compiler that understands
+C<--sysroot>, like gcc or clang, you'll want to specify the
+C<-Dsysroot> option for Configure:
+
+    -Dsysroot=/skiff/local/arm-linux
+
+However, if your don't have a suitable directory to pass to C<-Dsysroot>,
+you will also need to specify which target environment to use:
+
     -Dusrinc=/skiff/local/arm-linux/include
     -Dincpth=/skiff/local/arm-linux/include
     -Dlibpth=/skiff/local/arm-linux/lib
 
-If the name of the C<cc> has the usual GNU C semantics for cross
-compilers, that is, CPU-OS-gcc, the names of the C<ar>, C<nm>, and
-C<ranlib> will also be automatically chosen to be CPU-OS-ar and so on.
-(The C<ld> requires more thought and will be chosen later by Configure
-as appropriate.)  Also, in this case the incpth, libpth, and usrinc
-will be guessed by Configure (unless explicitly set to something else,
-in which case Configure's guesses with be appended).
-
 In addition to the default execution/transfer methods you can also
 choose B<rsh> for execution, and B<rcp> or B<cp> for transfer,
 for example:
@@ -1831,13 +1923,11 @@ Putting it all together:
 
     sh ./Configure -des -Dusecrosscompile \
         -Dtargethost=so.me.ho.st \
-       -Dtargetdir=/tar/get/dir \
+        -Dtargetdir=/tar/get/dir \
         -Dtargetuser=root \
         -Dtargetarch=arm-linux \
         -Dcc=arm-linux-gcc \
-        -Dusrinc=/skiff/local/arm-linux/include \
-        -Dincpth=/skiff/local/arm-linux/include \
-        -Dlibpth=/skiff/local/arm-linux/lib \
+        -Dsysroot=/skiff/local/arm-linux \
         -D...
 
 or if you are happy with the defaults:
@@ -1853,15 +1943,39 @@ F</usr/local/arm/2.95.5>:
     sh ./Configure -des -Dusecrosscompile \
         -Dtargethost=so.me.ho.st \
         -Dcc=/usr/local/arm/2.95.5/bin/arm-linux-gcc \
-        -Dincpth=/usr/local/arm/2.95.5/include \
-        -Dusrinc=/usr/local/arm/2.95.5/include \
-        -Dlibpth=/usr/local/arm/2.95.5/lib
+        -Dsysroot=/usr/local/arm/2.95.5
+
+There is also a C<targetenv> option for Configure which can be used
+to modify the environment of the target just before testing begins
+during 'make test'.  For example, if the target system has a nonstandard
+/tmp location, you could do this:
+
+    -Dtargetenv="export TMPDIR=/other/tmp;"
+
+If you are planning on cross-compiling to several platforms, or some other
+thing that would involve running Configure several times, there are two
+options that can be used to speed things up considerably.
+As a bit of background, when you
+call Configure with C<-Dusecrosscompile>, it begins by actually partially
+building a miniperl on the host machine, as well as the generate_uudmap
+binary, and we end up using that during the build.
+So instead of building that new perl every single time, you can build it just
+once in a separate directory, and then pass the resulting binaries to
+Configure like this:
+
+    -Dhostperl=/path/to/second/build/dir/miniperl
+    -Dhostgenerate=/path/to/second/build/dir/generate_uudmap
+
+Much less commonly, if you are cross-compiling from an ASCII host to an
+EBCDIC target, or vise versa, you'll have to pass C<-Uhostgenerate> to
+Configure, to signify that you want to build a generate_uudmap binary
+that, during make, will be run on the target system.
 
 =head1 make test
 
 This will run the regression tests on the perl you just made.  If
 'make test' doesn't say "All tests successful" then something went
-wrong.  See the file t/README in the t subdirectory.
+wrong.
 
 Note that you can't run the tests in background if this disables
 opening of /dev/tty. You can use 'make test-notty' in that case but
@@ -1870,13 +1984,10 @@ a few tty tests will be skipped.
 =head2 What if make test doesn't work?
 
 If make test bombs out, just cd to the t directory and run ./TEST
-by hand to see if it makes any difference.  If individual tests
-bomb, you can run them by hand, e.g.,
+by hand to see if it makes any difference.
 
-       ./perl -MTestInit t/op/groups.t
-
-Another way to get more detailed information about failed tests and
-individual subtests is to cd to the t directory and run
+One way to get more detailed information about failed tests and
+individual subtests is to run the harness from the t directory:
 
        cd t ; ./perl harness <list of tests>
 
@@ -1884,12 +1995,20 @@ individual subtests is to cd to the t directory and run
 complicated constructs). If no list of tests is provided, harness
 will run all tests.
 
+If individual tests fail, you can often run them by hand (from the main
+perl directory), e.g.,
+
+       ./perl -MTestInit t/op/groups.t
+
 You should also read the individual tests to see if there are any helpful
 comments that apply to your system.  You may also need to setup your
 shared library path if you get errors like:
 
        /sbin/loader: Fatal Error: cannot map libperl.so
 
+The file t/README in the t subdirectory contains more information about
+running and modifying tests.
+
 See L</"Building a shared Perl library"> earlier in this document.
 
 =over 4
@@ -1944,7 +2063,7 @@ test 85 will fail if run under either t/TEST or t/harness.
 
 Try stopping other jobs on the system and then running the test by itself:
 
-       cd t; ./perl -MTestInit op/pat.t
+       ./perl -MTestInit t/op/pat.t
 
 to see if you have any better luck.  If your perl still fails this
 test, it does not necessarily mean you have a broken perl.  This test
@@ -2078,25 +2197,22 @@ make install will install the following:
        perl,
            perl5.n.n   where 5.n.n is the current release number.  This
                        will be a link to perl.
-       suidperl,
-           sperl5.n.n  If you requested setuid emulation.
        a2p             awk-to-perl translator.
 
     scripts
 
-       cppstdin        This is used by the deprecated switch perl -P, if
-                       your cc -E can't read from stdin.
-       c2ph, pstruct   Scripts for handling C structures in header files.
-       config_data     Manage Module::Build-like module configuration.
-       corelist        Shows versions of modules that come with different
+       cppstdin        This is used by the deprecated switch perl -P,
+                       if your cc -E can't read from stdin.
+       c2ph, pstruct   Scripts for handling C structures in header
+                        files.
+       corelist        Shows versions of modules that come with
+                        different
                        versions of perl.
        cpan            The CPAN shell.
-       cpan2dist       The CPANPLUS distribution creator.
-       cpanp           The CPANPLUS shell.
-       cpanp-run-perl  A helper for cpanp.
        enc2xs          Encoding module generator.
        find2perl       find-to-perl translator.
-       h2ph            Extract constants and simple macros from C headers.
+       h2ph            Extract constants and simple macros from C
+                        headers.
        h2xs            Converts C .h header files to Perl extensions.
        instmodsh       A shell to examine installed modules.
        libnetcfg       Configure libnet.
@@ -2107,7 +2223,6 @@ make install will install the following:
                        utility iconv.
        pl2pm           Convert Perl 4 .pl files to Perl 5 .pm modules.
        pod2html,       Converters from perl's pod documentation format
-       pod2latex,      to other useful formats.
        pod2man,
        pod2text,
        pod2usage
@@ -2122,7 +2237,7 @@ make install will install the following:
        shasum          A tool to print or check SHA checksums.
        splain          Describe Perl warnings and errors.
        xsubpp          Compiler to convert Perl XS code into C code.
-       zipdetails              display the internal structure of zip files
+       zipdetails      display the internal structure of zip files
 
     library files
 
@@ -2198,7 +2313,6 @@ perl documentation:
       --htmlroot=/perl/nmanual    \
       --splithead=pod/perlipc     \
       --splititem=pod/perlfunc    \
-      --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \
       --verbose
 
 See the documentation in installhtml for more details.  It can take
@@ -2229,7 +2343,9 @@ or
        make realclean
 
 The only difference between the two is that make distclean also removes
-your old config.sh and Policy.sh files.
+your old config.sh and Policy.sh files.  (A plain 'make clean' will not
+delete the makefiles used for rebuilding perl, and will also not delete
+a number of library and utility files extracted during the build process.)
 
 If you are upgrading from a previous version of perl, or if you
 change systems or compilers or make other significant changes, or if
@@ -2300,7 +2416,7 @@ http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
 
 =head1 Coexistence with earlier versions of perl 5
 
-Perl 5.15 is not binary compatible with earlier versions of Perl.
+Perl 5.21.1 is not binary compatible with earlier versions of Perl.
 In other words, you will have to recompile your XS modules.
 
 In general, you can usually safely upgrade from one version of Perl (e.g.
@@ -2374,9 +2490,9 @@ won't interfere with another version.  (The defaults guarantee this for
 libraries after 5.6.0, but not for executables. TODO?)  One convenient
 way to do this is by using a separate prefix for each version, such as
 
-       sh Configure -Dprefix=/opt/perl5.15.6
+       sh Configure -Dprefix=/opt/perl5.21.1
 
-and adding /opt/perl5.15.6/bin to the shell PATH variable.  Such users
+and adding /opt/perl5.21.1/bin to the shell PATH variable.  Such users
 may also wish to add a symbolic link /usr/local/bin/perl so that
 scripts can still start with #!/usr/local/bin/perl.
 
@@ -2389,13 +2505,13 @@ seriously consider using a separate directory, since development
 subversions may not have all the compatibility wrinkles ironed out
 yet.
 
-=head2 Upgrading from 5.15.5 or earlier
+=head2 Upgrading from 5.19.0 or earlier
 
-B<Perl 5.15.6 is binary incompatible with Perl 5.15.5 and any earlier
-Perl release.>  Perl modules having binary parts
+B<Perl 5.21.1 may not be binary compatible with Perl 5.19.11 or
+earlier Perl releases.>  Perl modules having binary parts
 (meaning that a C compiler is used) will have to be recompiled to be
-used with 5.15.6.  If you find you do need to rebuild an extension with
-5.15.6, you may safely do so without disturbing the older
+used with 5.21.1.  If you find you do need to rebuild an extension with
+5.21.1, you may safely do so without disturbing the older
 installations.  (See L<"Coexistence with earlier versions of perl 5">
 above.)
 
@@ -2428,107 +2544,102 @@ Firstly, the bare minimum to run this script
      print("$f\n");
   }
 
-in Linux is as follows (under $Config{prefix}):
+in Linux with perl-5.21.1 is as follows (under $Config{prefix}):
 
   ./bin/perl
-  ./lib/perl5/5.9.3/strict.pm
-  ./lib/perl5/5.9.3/warnings.pm
-  ./lib/perl5/5.9.3/i686-linux/File/Glob.pm
-  ./lib/perl5/5.9.3/i686-linux/XSLoader.pm
-  ./lib/perl5/5.9.3/i686-linux/auto/File/Glob/Glob.so
+  ./lib/perl5/5.21.1/strict.pm
+  ./lib/perl5/5.21.1/warnings.pm
+  ./lib/perl5/5.21.1/i686-linux/File/Glob.pm
+  ./lib/perl5/5.21.1/feature.pm
+  ./lib/perl5/5.21.1/XSLoader.pm
+  ./lib/perl5/5.21.1/i686-linux/auto/File/Glob/Glob.so
 
-Secondly, Debian perl-base package contains the following files,
-size about 1.9MB in its i386 version:
+Secondly, for perl-5.10.1, the Debian perl-base package contains 591 files,
+(of which 510 are for lib/unicore) totaling about 3.5MB in its i386 version.
+Omitting the lib/unicore/* files for brevity, the remaining files are:
 
   /usr/bin/perl
-  /usr/bin/perl5.8.4
-  /usr/lib/perl/5.8
-  /usr/lib/perl/5.8.4/B.pm
-  /usr/lib/perl/5.8.4/B/Deparse.pm
-  /usr/lib/perl/5.8.4/Config.pm
-  /usr/lib/perl/5.8.4/Cwd.pm
-  /usr/lib/perl/5.8.4/Data/Dumper.pm
-  /usr/lib/perl/5.8.4/DynaLoader.pm
-  /usr/lib/perl/5.8.4/Errno.pm
-  /usr/lib/perl/5.8.4/Fcntl.pm
-  /usr/lib/perl/5.8.4/File/Glob.pm
-  /usr/lib/perl/5.8.4/IO.pm
-  /usr/lib/perl/5.8.4/IO/File.pm
-  /usr/lib/perl/5.8.4/IO/Handle.pm
-  /usr/lib/perl/5.8.4/IO/Pipe.pm
-  /usr/lib/perl/5.8.4/IO/Seekable.pm
-  /usr/lib/perl/5.8.4/IO/Select.pm
-  /usr/lib/perl/5.8.4/IO/Socket.pm
-  /usr/lib/perl/5.8.4/POSIX.pm
-  /usr/lib/perl/5.8.4/Socket.pm
-  /usr/lib/perl/5.8.4/XSLoader.pm
-  /usr/lib/perl/5.8.4/auto/Cwd/Cwd.bs
-  /usr/lib/perl/5.8.4/auto/Cwd/Cwd.so
-  /usr/lib/perl/5.8.4/auto/Data/Dumper/Dumper.bs
-  /usr/lib/perl/5.8.4/auto/Data/Dumper/Dumper.so
-  /usr/lib/perl/5.8.4/auto/DynaLoader/DynaLoader.a
-  /usr/lib/perl/5.8.4/auto/DynaLoader/autosplit.ix
-  /usr/lib/perl/5.8.4/auto/DynaLoader/dl_expandspec.al
-  /usr/lib/perl/5.8.4/auto/DynaLoader/dl_find_symbol_anywhere.al
-  /usr/lib/perl/5.8.4/auto/DynaLoader/dl_findfile.al
-  /usr/lib/perl/5.8.4/auto/DynaLoader/extralibs.ld
-  /usr/lib/perl/5.8.4/auto/Fcntl/Fcntl.bs
-  /usr/lib/perl/5.8.4/auto/Fcntl/Fcntl.so
-  /usr/lib/perl/5.8.4/auto/File/Glob/Glob.bs
-  /usr/lib/perl/5.8.4/auto/File/Glob/Glob.so
-  /usr/lib/perl/5.8.4/auto/IO/IO.bs
-  /usr/lib/perl/5.8.4/auto/IO/IO.so
-  /usr/lib/perl/5.8.4/auto/POSIX/POSIX.bs
-  /usr/lib/perl/5.8.4/auto/POSIX/POSIX.so
-  /usr/lib/perl/5.8.4/auto/POSIX/autosplit.ix
-  /usr/lib/perl/5.8.4/auto/POSIX/load_imports.al
-  /usr/lib/perl/5.8.4/auto/Socket/Socket.bs
-  /usr/lib/perl/5.8.4/auto/Socket/Socket.so
-  /usr/lib/perl/5.8.4/lib.pm
-  /usr/lib/perl/5.8.4/re.pm
-  /usr/share/doc/perl-base
+  /usr/bin/perl5.10.1
+  /usr/lib/perl/5.10.1/Config.pm
+  /usr/lib/perl/5.10.1/Config_git.pl
+  /usr/lib/perl/5.10.1/Config_heavy.pl
+  /usr/lib/perl/5.10.1/Cwd.pm
+  /usr/lib/perl/5.10.1/DynaLoader.pm
+  /usr/lib/perl/5.10.1/Errno.pm
+  /usr/lib/perl/5.10.1/Fcntl.pm
+  /usr/lib/perl/5.10.1/File/Glob.pm
+  /usr/lib/perl/5.10.1/Hash/Util.pm
+  /usr/lib/perl/5.10.1/IO.pm
+  /usr/lib/perl/5.10.1/IO/File.pm
+  /usr/lib/perl/5.10.1/IO/Handle.pm
+  /usr/lib/perl/5.10.1/IO/Pipe.pm
+  /usr/lib/perl/5.10.1/IO/Seekable.pm
+  /usr/lib/perl/5.10.1/IO/Select.pm
+  /usr/lib/perl/5.10.1/IO/Socket.pm
+  /usr/lib/perl/5.10.1/IO/Socket/INET.pm
+  /usr/lib/perl/5.10.1/IO/Socket/UNIX.pm
+  /usr/lib/perl/5.10.1/List/Util.pm
+  /usr/lib/perl/5.10.1/POSIX.pm
+  /usr/lib/perl/5.10.1/Scalar/Util.pm
+  /usr/lib/perl/5.10.1/Socket.pm
+  /usr/lib/perl/5.10.1/XSLoader.pm
+  /usr/lib/perl/5.10.1/auto/Cwd/Cwd.so
+  /usr/lib/perl/5.10.1/auto/DynaLoader/autosplit.ix
+  /usr/lib/perl/5.10.1/auto/DynaLoader/dl_expandspec.al
+  /usr/lib/perl/5.10.1/auto/DynaLoader/dl_find_symbol_anywhere.al
+  /usr/lib/perl/5.10.1/auto/DynaLoader/dl_findfile.al
+  /usr/lib/perl/5.10.1/auto/Fcntl/Fcntl.so
+  /usr/lib/perl/5.10.1/auto/File/Glob/Glob.so
+  /usr/lib/perl/5.10.1/auto/Hash/Util/Util.so
+  /usr/lib/perl/5.10.1/auto/IO/IO.so
+  /usr/lib/perl/5.10.1/auto/List/Util/Util.so
+  /usr/lib/perl/5.10.1/auto/POSIX/POSIX.so
+  /usr/lib/perl/5.10.1/auto/POSIX/autosplit.ix
+  /usr/lib/perl/5.10.1/auto/POSIX/load_imports.al
+  /usr/lib/perl/5.10.1/auto/Socket/Socket.so
+  /usr/lib/perl/5.10.1/lib.pm
+  /usr/lib/perl/5.10.1/re.pm
   /usr/share/doc/perl/AUTHORS.gz
   /usr/share/doc/perl/Documentation
-  /usr/share/doc/perl/README.Debian.gz
+  /usr/share/doc/perl/README.Debian
   /usr/share/doc/perl/changelog.Debian.gz
   /usr/share/doc/perl/copyright
+  /usr/share/lintian/overrides/perl-base
   /usr/share/man/man1/perl.1.gz
-  /usr/share/perl/5.8
-  /usr/share/perl/5.8.4/AutoLoader.pm
-  /usr/share/perl/5.8.4/Carp.pm
-  /usr/share/perl/5.8.4/Carp/Heavy.pm
-  /usr/share/perl/5.8.4/Exporter.pm
-  /usr/share/perl/5.8.4/Exporter/Heavy.pm
-  /usr/share/perl/5.8.4/File/Spec.pm
-  /usr/share/perl/5.8.4/File/Spec/Unix.pm
-  /usr/share/perl/5.8.4/FileHandle.pm
-  /usr/share/perl/5.8.4/Getopt/Long.pm
-  /usr/share/perl/5.8.4/IO/Socket/INET.pm
-  /usr/share/perl/5.8.4/IO/Socket/UNIX.pm
-  /usr/share/perl/5.8.4/IPC/Open2.pm
-  /usr/share/perl/5.8.4/IPC/Open3.pm
-  /usr/share/perl/5.8.4/List/Util.pm
-  /usr/share/perl/5.8.4/Scalar/Util.pm
-  /usr/share/perl/5.8.4/SelectSaver.pm
-  /usr/share/perl/5.8.4/Symbol.pm
-  /usr/share/perl/5.8.4/Text/ParseWords.pm
-  /usr/share/perl/5.8.4/Text/Tabs.pm
-  /usr/share/perl/5.8.4/Text/Wrap.pm
-  /usr/share/perl/5.8.4/attributes.pm
-  /usr/share/perl/5.8.4/base.pm
-  /usr/share/perl/5.8.4/bytes.pm
-  /usr/share/perl/5.8.4/bytes_heavy.pl
-  /usr/share/perl/5.8.4/constant.pm
-  /usr/share/perl/5.8.4/fields.pm
-  /usr/share/perl/5.8.4/integer.pm
-  /usr/share/perl/5.8.4/locale.pm
-  /usr/share/perl/5.8.4/overload.pm
-  /usr/share/perl/5.8.4/strict.pm
-  /usr/share/perl/5.8.4/utf8.pm
-  /usr/share/perl/5.8.4/utf8_heavy.pl
-  /usr/share/perl/5.8.4/vars.pm
-  /usr/share/perl/5.8.4/warnings.pm
-  /usr/share/perl/5.8.4/warnings/register.pm
+  /usr/share/man/man1/perl5.10.1.1.gz
+  /usr/share/perl/5.10.1/AutoLoader.pm
+  /usr/share/perl/5.10.1/Carp.pm
+  /usr/share/perl/5.10.1/Carp/Heavy.pm
+  /usr/share/perl/5.10.1/Exporter.pm
+  /usr/share/perl/5.10.1/Exporter/Heavy.pm
+  /usr/share/perl/5.10.1/File/Spec.pm
+  /usr/share/perl/5.10.1/File/Spec/Unix.pm
+  /usr/share/perl/5.10.1/FileHandle.pm
+  /usr/share/perl/5.10.1/Getopt/Long.pm
+  /usr/share/perl/5.10.1/IPC/Open2.pm
+  /usr/share/perl/5.10.1/IPC/Open3.pm
+  /usr/share/perl/5.10.1/SelectSaver.pm
+  /usr/share/perl/5.10.1/Symbol.pm
+  /usr/share/perl/5.10.1/Text/ParseWords.pm
+  /usr/share/perl/5.10.1/Text/Tabs.pm
+  /usr/share/perl/5.10.1/Text/Wrap.pm
+  /usr/share/perl/5.10.1/Tie/Hash.pm
+  /usr/share/perl/5.10.1/attributes.pm
+  /usr/share/perl/5.10.1/base.pm
+  /usr/share/perl/5.10.1/bytes.pm
+  /usr/share/perl/5.10.1/bytes_heavy.pl
+  /usr/share/perl/5.10.1/constant.pm
+  /usr/share/perl/5.10.1/fields.pm
+  /usr/share/perl/5.10.1/integer.pm
+  /usr/share/perl/5.10.1/locale.pm
+  /usr/share/perl/5.10.1/overload.pm
+  /usr/share/perl/5.10.1/strict.pm
+  /usr/share/perl/5.10.1/unicore/*
+  /usr/share/perl/5.10.1/utf8.pm
+  /usr/share/perl/5.10.1/utf8_heavy.pl
+  /usr/share/perl/5.10.1/vars.pm
+  /usr/share/perl/5.10.1/warnings.pm
+  /usr/share/perl/5.10.1/warnings/register.pm
 
 A nice trick to find out the minimal set of Perl library files you will
 need to run a Perl program is
@@ -2539,7 +2650,8 @@ need to run a Perl program is
 it's a minimal set) and if you want to find out all the files you can
 use something like the below
 
-   strace perl -le 'do "x.pl"' 2>&1 | perl -nle '/^open\(\"(.+?)"/ && print $1'
+ strace perl -le 'do "x.pl"' 2>&1 \
+                             | perl -nle '/^open\(\"(.+?)"/ && print $1'
 
 (The 'strace' is Linux-specific, other similar utilities include 'truss'
 and 'ktrace'.)