Show
Ignore:
Timestamp:
02/09/04 14:10:55 (6 years ago)
Author:
zacheiss
Message:

Import perl 5.8.3.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/vendor/third/perl/INSTALL

    r18449 r20074  
    8383If there is a hint file for your system (in the hints/ directory) you 
    8484should also read that hint file for specific information for your 
    85 system.  (Unixware users should use the svr4.sh hint file.) 
     85system.  (Unixware users should use the svr4.sh or the svr5.sh hint file.) 
    8686Additional information is in the Porting/ directory. 
    8787 
     
    320320/usr/local/bin/perl be symlinks to the actual binary.  Be especially 
    321321careful, however, not to overwrite a version of perl supplied by your 
    322 vendor unless you are sure you know what you are doing. 
    323  
    324 By default, Configure will arrange for /usr/bin/perl to be linked to 
    325 the current version of perl.  You can turn off that behavior by running 
    326  
    327         Configure -Uinstallusrbinperl 
    328  
    329 or by answering 'no' to the appropriate Configure prompt. 
     322vendor unless you are sure you know what you are doing.  If you insist 
     323on replacing your vendor's perl, useful information on how it was 
     324configured may be found with 
     325 
     326        perl -V:config_args 
     327 
     328(Check the output carefully, however, since this doesn't preserve 
     329spaces in arguments to Configure.  For that, you have to look 
     330carefully at config_arg1, config_arg2, etc.) 
     331 
     332By default, Configure will not try to link /usr/bin/perl to 
     333the current version of perl.  You can turn on that behavior by running 
     334 
     335        Configure -Dinstallusrbinperl 
     336 
     337or by answering 'yes' to the appropriate Configure prompt. 
     338(Note that before perl 5.8.1, the default behavior was to create 
     339or overwrite /usr/bin/perl even if it already existed.) 
    330340 
    331341In any case, system administrators are strongly encouraged to 
     
    439449    $sitelib            $siteprefix/lib/perl5/site_perl/$version 
    440450    $sitearch           $siteprefix/lib/perl5/site_perl/$version/$archname 
    441     $siteman1           $siteprefix/man/man1 
    442     $siteman3           $siteprefix/man/man3 
    443     $sitehtml1          (none) 
    444     $sitehtml3          (none) 
     451    $siteman1dir        $siteprefix/man/man1 
     452    $siteman3dir        $siteprefix/man/man3 
     453    $sitehtml1dir       (none) 
     454    $sitehtml3dir       (none) 
    445455 
    446456By default, ExtUtils::MakeMaker will install architecture-independent 
     
    460470    $vendorlib          $vendorprefix/lib/perl5/vendor_perl/$version 
    461471    $vendorarch         $vendorprefix/lib/perl5/vendor_perl/$version/$archname 
    462     $vendorman1         $vendorprefix/man/man1 
    463     $vendorman3         $vendorprefix/man/man3 
    464     $vendorhtml1        (none) 
    465     $vendorhtml3        (none) 
     472    $vendorman1dir      $vendorprefix/man/man1 
     473    $vendorman3dir      $vendorprefix/man/man3 
     474    $vendorhtml1dir     (none) 
     475    $vendorhtml3dir     (none) 
    466476 
    467477These are normally empty, but may be set as needed.  For example, 
     
    485495        $sitelib        /usr/local/lib/perl5/site_perl/$version 
    486496        $sitearch       /usr/local/lib/perl5/site_perl/$version/$archname 
    487         $siteman1       /usr/local/man/man1 
    488         $siteman3       /usr/local/man/man3 
     497        $siteman1dir    /usr/local/man/man1 
     498        $siteman3dir    /usr/local/man/man3 
    489499 
    490500        $vendorbin      /usr/bin 
     
    492502        $vendorlib      /usr/lib/perl5/vendor_perl/$version 
    493503        $vendorarch     /usr/lib/perl5/vendor_perl/$version/$archname 
    494         $vendorman1     /usr/man/man1 
    495         $vendorman3     /usr/man/man3 
     504        $vendorman1dir  /usr/man/man1 
     505        $vendorman3dir  /usr/man/man3 
    496506 
    497507Note how in this example, the vendor-supplied directories are in the 
     
    651661    tar xvf perl5-archive.tar 
    652662 
     663Alternatively, the DESTDIR variable is honored during C<make install>. 
     664The DESTDIR is automatically prepended to all the installation paths 
     665(and there is no need to edit anything).  With DESTDIR, the above 
     666example can we written as: 
     667 
     668    sh Configure -Dprefix=/opt/perl -des 
     669    make 
     670    make test 
     671    make install DESTDIR=/tmp/perl5 
     672    cd /tmp/perl5/opt/perl 
     673    tar cvf /tmp/perl5-archive.tar . 
     674 
    653675=head2 Site-wide Policy settings 
    654676 
     
    712734and the 'Thread' module offers an interface to both 5005threads and 
    713735ithreads (whichever has been configured). 
     736 
     737When building threaded for certain library calls like the getgr*() and 
     738the getpw*() there is a dynamically sized result buffer: the buffer 
     739starts small but Perl will keep growing the buffer until the result fits. 
     740To get a fixed upper limit you will have to recompile Perl with 
     741PERL_REENTRANT_MAXSIZE defined to be the number of bytes you want. 
     742One way to do this is to run Configure with 
     743C<-Accflags=-DPERL_REENTRANT_MAXSIZE=65536> 
    714744 
    715745=head2 Large file support. 
     
    828858_exit vs. exit.  If you have this problem, the fix is to go back to 
    829859your sfio sources and correct iffe's guess about atexit. 
     860 
     861=head2 Algorithmic Complexity Attacks on Hashes 
     862 
     863In Perls 5.8.0 and earlier it was easy to create degenerate hashes. 
     864Processing such hashes would consume large amounts of CPU time, 
     865enabling a "Denial of Service" attack against Perl.  Such hashes may be 
     866a problem for example for mod_perl sites, sites with Perl CGI scripts 
     867and web services, that process data originating from external sources. 
     868 
     869In Perl 5.8.1 a security feature was introduced to make it harder 
     870to create such degenerate hashes. 
     871 
     872Because of this feature the keys(), values(), and each() functions may 
     873return the hash elements in different order between different runs of 
     874Perl even with the same data.  One can still revert to the old 
     875repeatable order by setting the environment variable PERL_HASH_SEED, 
     876see L<perlrun/PERL_HASH_SEED>.  Another option is to add 
     877-DUSE_HASH_SEED_EXPLICIT to the compilation flags (for example by 
     878using C<Configure -Accflags=-DUSE_HAS_SEED_EXPLICIT>), in which case 
     879one has to explicitly set the PERL_HASH_SEED environment variable to 
     880enable the security feature, or by adding -DNO_HASH_SEED to the compilation 
     881flags to completely disable the randomisation feature. 
     882 
     883B<Perl has never guaranteed any ordering of the hash keys>, and the 
     884ordering has already changed several times during the lifetime of 
     885Perl 5.  Also, the ordering of hash keys has always been, and 
     886continues to be, affected by the insertion order. 
     887 
     888Note that because of this randomisation for example the Data::Dumper 
     889results will be different between different runs of Perl since 
     890Data::Dumper by default dumps hashes "unordered".  The use of the 
     891Data::Dumper C<Sortkeys> option is recommended. 
    830892 
    831893=head2 SOCKS 
     
    930992in the perl binary with the LD_RUN_PATH environment variable (or 
    931993equivalent ld command-line option).  On Solaris, you can override that 
    932 with LD_LIBRARY_PATH; on Linux you can't.  On Digital Unix, you can 
    933 override LD_LIBRARY_PATH by setting the _RLD_ROOT environment variable 
    934 to point to the perl build directory. 
    935  
    936 The only reliable answer is that you should specify a different 
    937 directory for the architecture-dependent library for your -DDEBUGGING 
    938 version of perl.  You can do this by changing all the *archlib* 
    939 variables in config.sh to point to your new architecture-dependent library. 
     994with LD_LIBRARY_PATH; on Linux, you can only override at runtime via 
     995LD_PRELOAD, specifying the exact filename you wish to be used; and on 
     996Digital Unix, you can override LD_LIBRARY_PATH by setting the 
     997_RLD_ROOT environment variable to point to the perl build directory. 
     998 
     999In other words, it is generally not a good idea to try to build a perl 
     1000with a shared library if $archlib/CORE/$libperl already exists from a 
     1001previous build. 
     1002 
     1003A good workaround is to specify a different directory for the 
     1004architecture-dependent library for your -DDEBUGGING version of perl. 
     1005You can do this by changing all the *archlib* variables in config.sh to 
     1006point to your new architecture-dependent library. 
    9401007 
    9411008=head2 Malloc Issues 
     
    9811048does not allow its malloc functions to be fully replaced with custom 
    9821049versions. 
     1050 
     1051=item -DPERL_DEBUGGING_MSTATS 
     1052 
     1053This flag enables debugging mstats, which is required to use the 
     1054Devel::Peek::mstat() function. You cannot enable this unless you are 
     1055using Perl's malloc, so a typical Configure command would be 
     1056 
     1057       sh Configure -Accflags=-DPERL_DEBUGGING_MSTATS -Dusemymalloc='y' 
     1058 
     1059to enable this option. 
    9831060 
    9841061=back 
     
    10081085 
    10091086If you are using a shared libperl, see the warnings about multiple 
    1010 versions of perl under L<Building a shared libperl.so Perl library>. 
     1087versions of perl under L<Building a shared Perl library>. 
    10111088 
    10121089=head2 Extensions 
     
    10331110dynamic loading.  See lib/ExtUtils/MakeMaker.pm for more details.) 
    10341111 
     1112If you have dynamic loading, another way of specifying extra modules 
     1113is described in L<"Adding extra modules to the build"> below. 
     1114 
    10351115You can learn more about each of the supplied extensions by consulting the 
    10361116documentation in the individual .pm modules, located under the 
     
    10411121version.  (Configure will suggest this as the default.) 
    10421122 
    1043 In summary, here are the Configure command-line variables you can set 
    1044 to turn off various extensions.  All others are included by default. 
     1123To disable certain extensions so that they are not built, use 
     1124the -Dnoextensions=... and -Donlyextensions=... options.  They both 
     1125accept a space-separated list of extensions.  The extensions listed 
     1126in C<noextensions> are removed from the list of extensions to build, 
     1127while the C<onlyextensions> is rather more severe and builds only 
     1128the listed extensions.  The latter should be used with extreme caution 
     1129since certain extensions are used by many other extensions and modules: 
     1130such modules include Fcntl and IO.  The order of processing these 
     1131options is first C<only> (if present), then C<no> (if present). 
     1132 
     1133Another, older way to turn off various extensions (which is still good 
     1134to know if you have to work with older Perl) exists.  Here are the 
     1135Configure command-line variables you can set to turn off various 
     1136extensions.  All others are included by default. 
    10451137 
    10461138    DB_File             i_db 
     
    13831475then answer "Compress::Zlib Bundle::LWP DBI" to the 'Extras?' question. 
    13841476The module or the bundle names are as for the CPAN module 'install' command. 
     1477This will only work if those modules are to be built as dynamic 
     1478extensions.  If you wish to include those extra modules as static 
     1479extensions, see L<"Extensions"> above. 
    13851480 
    13861481Notice that because the CPAN module will be used to fetch the extra 
     
    14321527This will attempt to make perl in the current directory. 
    14331528 
     1529=head2 Expected errors 
     1530 
     1531These errors are normal, and can be ignored: 
     1532 
     1533  ... 
     1534  make: [extra.pods] Error 1 (ignored) 
     1535  ... 
     1536  make: [extras.make] Error 1 (ignored) 
     1537 
    14341538=head2 What if it doesn't work? 
    14351539 
     
    15511655these symbols.  Versions of BIND later than 8.1 do not install inet.h 
    15521656in that location and avoid the errors.  You should probably update to a 
    1553 newer version of BIND.  If you can't, you can either link with the 
    1554 updated resolver library provided with BIND 8.1 or rename 
    1555 /usr/local/bin/arpa/inet.h during the Perl build and test process to 
    1556 avoid the problem. 
     1657newer version of BIND (and remove the files the old one left behind). 
     1658If you can't, you can either link with the updated resolver library provided 
     1659with BIND 8.1 or rename /usr/local/bin/arpa/inet.h during the Perl build and 
     1660test process to avoid the problem. 
     1661 
     1662=item *_r() prototype NOT found 
     1663 
     1664On a related note, if you see a bunch of complaints like the above about 
     1665reentrant functions - specifically networking-related ones - being present 
     1666but without prototypes available, check to see if BIND 8.1 (or possibly 
     1667other BIND 8 versions) is (or has been) installed. They install 
     1668header files such as netdb.h into places such as /usr/local/include (or into 
     1669another directory as specified at build/install time), at least optionally. 
     1670Remove them or put them in someplace that isn't in the C preprocessor's  
     1671header file include search path (determined by -I options plus defaults, 
     1672normally /usr/include). 
    15571673 
    15581674=item #error "No DATAMODEL_NATIVE specified" 
     
    16421758=item Bad arg length for semctl, is XX, should be ZZZ 
    16431759 
    1644 If you get this error message from the lib/ipc_sysv test, your System 
     1760If you get this error message from the ext/IPC/SysV/t/sem test, your System 
    16451761V IPC may be broken.  The XX typically is 20, and that is what ZZZ 
    16461762also should be.  Consider upgrading your OS, or reconfiguring your OS 
    16471763to include the System V semaphores. 
    16481764 
    1649 =item lib/ipc_sysv........semget: No space left on device 
     1765=item ext/IPC/SysV/t/sem........semget: No space left on device 
    16501766 
    16511767Either your account or the whole system has run out of semaphores.  Or 
     
    16811797 
    16821798You are using a non-ANSI-compliant C compiler.  See L<WARNING:  This 
    1683 version requires a compiler that supports ANSI C>. 
     1799version requires a compiler that supports ANSI C.> 
    16841800 
    16851801=item Miscellaneous 
     
    16931809UTS may need one or more of -K or -g, and undef LSTAT. 
    16941810 
    1695 FreeBSD can fail the lib/ipc_sysv.t test if SysV IPC has not been 
     1811FreeBSD can fail the ext/IPC/SysV/t/sem.t test if SysV IPC has not been 
    16961812configured in the kernel.  Perl tries to detect this, though, and 
    16971813you will get a message telling what to do. 
     
    17021818break utime() so that over NFS the timestamps do not get changed 
    17031819(on local filesystems utime() still works). 
     1820 
     1821Building Perl on a system that has also BIND (headers and libraries) 
     1822installed may run into troubles because BIND installs its own netdb.h 
     1823and socket.h, which may not agree with the operating system's ideas of 
     1824the same files.  Similarly, including -lbind may conflict with libc's 
     1825view of the world.  You may have to tweak -Dlocincpth and -Dloclibpth 
     1826to avoid the BIND. 
    17041827 
    17051828=back 
     
    17231846 
    17241847    NOTE: Perl is routinely built using cross-compilation 
    1725     in the EPOC environment but the solutions from there 
    1726     can't directly be used elsewhere. 
    1727  
    1728 The one environment where cross-compilation has successfully been used 
    1729 as of this writing is the Compaq iPAQ running ARM Linux.  The build 
    1730 host was Intel Linux, the networking setup was PPP + SSH.  The exact 
    1731 setup details are beyond the scope of this document, see 
    1732 http://www.handhelds.org/ for more information. 
     1848    in the EPOC environment, in the WinCE, and in the OpenZaurus 
     1849    project, but all those use something slightly different setup 
     1850    than what described here.  For the WinCE setup, read the 
     1851    wince/README.compile.  For the OpenZaurus setup, read the 
     1852    Cross/README. 
     1853 
     1854The one environment where this cross-compilation setup has 
     1855successfully been used as of this writing is the Compaq iPAQ running 
     1856ARM Linux.  The build host was Intel Linux, the networking setup was 
     1857PPP + SSH.  The exact setup details are beyond the scope of this 
     1858document, see http://www.handhelds.org/ for more information. 
    17331859 
    17341860To run Configure in cross-compilation mode the basic switch is 
     
    19052031and may well be far more demanding than your normal usage. 
    19062032 
    1907 =item Test failures from lib/ftmp-security saying "system possibly insecure" 
    1908  
    1909 Firstly, test failures from the ftmp-security are not necessarily 
    1910 serious or indicative of a real security threat.  That being said, 
    1911 they bear investigating. 
    1912  
    1913 The tests may fail for the following reasons.   Note that each of the 
    1914 tests is run both in the building directory and the temporary 
    1915 directory, as returned by File::Spec->tmpdir(). 
    1916  
    1917 (1) If the directory the tests are being run is owned by somebody else 
    1918 than the user running the tests, or root (uid 0).  This failure can 
    1919 happen if the Perl source code distribution is unpacked in a way that 
    1920 the user ids in the distribution package are used as-is.  Some tar 
    1921 programs do this. 
    1922  
    1923 (2) If the directory the tests are being run in is writable by group 
    1924 or by others (remember: with UNIX/POSIX semantics, write access to 
    1925 a directory means the right to add/remove files in that directory), 
    1926 and there is no sticky bit set in the directory.  'Sticky bit' is 
    1927 a feature used in some UNIXes to give extra protection to files: if 
    1928 the bit is on a directory, no one but the owner (or the root) can remove 
    1929 that file even if the permissions of the directory would allow file 
    1930 removal by others.  This failure can happen if the permissions in the 
    1931 directory simply are a bit too liberal for the tests' liking.  This 
    1932 may or may not be a real problem: it depends on the permissions policy 
    1933 used on this particular directory/project/system/site.  This failure 
    1934 can also happen if the system either doesn't support the sticky bit 
    1935 (this is the case with many non-UNIX platforms: in principle 
    1936 File::Temp should know about these platforms and skip the tests), or 
    1937 if the system supports the sticky bit but for some reason or reasons 
    1938 it is not being used.  This is for example the case with HP-UX: as of 
    1939 HP-UX release 11.00, the sticky bit is very much supported, but HP-UX 
    1940 doesn't use it on its /tmp directory as shipped.  Also, as with the 
    1941 permissions, some local policy might dictate that the stickiness is 
    1942 not used. 
     2033=item Failures from lib/File/Temp/t/security saying "system possibly insecure" 
     2034 
     2035First, such warnings are not necessarily serious or indicative of a 
     2036real security threat.  That being said, they bear investigating. 
     2037 
     2038Note that each of the tests is run twice.  The first time is in the 
     2039directory returned by File::Spec->tmpdir() (often /tmp on Unix 
     2040systems), and the second time in the directory from which the test was 
     2041run (usually the 't' directory, if the test was run as part of 'make 
     2042test'). 
     2043 
     2044The tests may fail for the following reasons: 
     2045 
     2046(1) If the directory the tests are being run in is owned by somebody 
     2047other than the user running the tests, or by root (uid 0). 
     2048 
     2049This failure can happen if the Perl source code distribution is 
     2050unpacked in such a way that the user ids in the distribution package 
     2051are used as-is.  Some tar programs do this. 
     2052 
     2053(2) If the directory the tests are being run in is writable by group or 
     2054by others, and there is no sticky bit set for the directory.  (With 
     2055UNIX/POSIX semantics, write access to a directory means the right to 
     2056add or remove files in that directory.  The 'sticky bit' is a feature 
     2057used in some UNIXes to give extra protection to files: if the bit is 
     2058set for a directory, no one but the owner (or root) can remove that 
     2059file even if the permissions would otherwise allow file removal by 
     2060others.) 
     2061 
     2062This failure may or may not be a real problem: it depends on the 
     2063permissions policy used on this particular system.  This failure can 
     2064also happen if the system either doesn't support the sticky bit (this 
     2065is the case with many non-UNIX platforms: in principle File::Temp 
     2066should know about these platforms and skip the tests), or if the system 
     2067supports the sticky bit but for some reason or reasons it is not being 
     2068used.  This is, for example, the case with HP-UX: as of HP-UX release 
     206911.00, the sticky bit is very much supported, but HP-UX doesn't use it 
     2070on its /tmp directory as shipped.  Also, as with the permissions, some 
     2071local policy might dictate that the stickiness is not used. 
    19432072 
    19442073(3) If the system supports the POSIX 'chown giveaway' feature and if 
    19452074any of the parent directories of the temporary file back to the root 
    19462075directory are 'unsafe', using the definitions given above in (1) and 
    1947 (2). 
     2076(2).  For Unix systems, this is usually not an issue if you are 
     2077building on a local disk.  See the documentation for the File::Temp 
     2078module for more information about 'chown giveaway'. 
    19482079 
    19492080See the documentation for the File::Temp module for more information 
    1950 about the various security aspects. 
     2081about the various security aspects of temporary files. 
    19512082 
    19522083=back