make test
make install
-For information on non-Unix systems, see the section on
-L<"Porting information"> below.
+For information on non-Unix systems, see the section on L<"Porting
+information"> below.
+
+If "make install" just says "`install' is up to date" or something
+similar, you may be on case-preserving filesystems such as Mac's HFS+
+and you should say "make install-all". (This confusion brought to you
+by the Perl distribution having a file called INSTALL.)
If you have problems, corrections, or questions, please see
L<"Reporting Problems"> below.
with:
perl Makefile.PL POLLUTE=1
-
+
Alternatively, you can enable CPP symbol pollution wholesale by
building perl itself with:
=head1 Space Requirements
-The complete perl5 source tree takes up about 20 MB of disk space.
-After completing make, it takes up roughly 30 MB, though the actual
+The complete perl5 source tree takes up about 35 MB of disk space.
+After completing make, it takes up roughly 50 MB, though the actual
total is likely to be quite system-dependent. The installation
-directories need something on the order of 20 MB, though again that
+directories need something on the order of 30 MB, though again that
value is system-dependent.
=head1 Start with a Fresh Distribution
sh Configure -h
+=head2 Building Perl outside of the source directory
+
+Sometimes it is desirable to build Perl in a directory different from
+where the sources are, for example if you want to keep your sources
+read-only, or if you want to share the sources between different binary
+architectures.
+
+Starting from Perl 5.6.1 you can do this (if your file system supports
+symbolic links) by
+
+ mkdir /tmp/perl/build/directory
+ cd /tmp/perl/build/directory
+ sh /path/to/perl/source/Configure -Dmksymlinks ...
+
+This will create in /tmp/perl/build/directory a tree of symbolic links
+pointing to files in /path/to/perl/source. The original files are left
+unaffected. After Configure has finished you can just say
+
+ make all test
+
+and Perl will be built and tested, all in /tmp/perl/build/directory.
+
=head2 Common Configure options
Configure supports a number of useful options. Run B<Configure -h> to
Perl will search these directories (including architecture and
version-specific subdirectories) for add-on modules and extensions.
+=item APPLLIB_EXP
+
+There is one other way of adding paths to @INC at perl build time, and
+that is by setting the APPLLIB_EXP C pre-processor token to a colon-
+separated list of directories, like this
+
+ sh Configure -Accflags='-DAPPLLIB_EXP=\"/usr/libperl\"'
+
+The directories defined by APPLLIB_EXP get added to @INC I<first>,
+ahead of any others, and so provide a way to override the standard perl
+modules should you, for example, want to distribute fixes without
+touching the perl distribution proper. And, like otherlib dirs,
+version and architecture specific subdirectories are also searched, if
+present, at run time. Of course, you can still search other @INC
+directories ahead of those in APPLLIB_EXP by using any of the standard
+run-time methods: $PERLLIB, $PERL5LIB, -I, use lib, etc.
+
=item Man Pages
In versions 5.005_57 and earlier, the default was to store module man
Eventually (by perl v5.6.0) this internal confusion ought to disappear,
and these options may disappear as well.
+=head2 Large file support.
+
+Since Perl 5.6.0 Perl has supported large files (files larger than
+2 gigabytes), and in many common platforms like Linux or Solaris this
+support is on by default.
+
+This is both good and bad. It is good in that you can use large files,
+seek(), stat(), and -s them. It is bad if you are interfacing Perl
+using some extension, also the components you are connecting to must
+be large file aware: if Perl thinks files can be large but the other
+parts of the software puzzle do not understand the concept, bad things
+will happen. One popular extension suffering from this ailment is the
+Apache extension mod_perl.
+
+There's also one known limitation with the current large files
+implementation: unless you also have 64-bit integers (see the next
+section), you cannot use the printf/sprintf non-decimal integer
+formats like C<%x> to print filesizes. You can use C<%d>, though.
+
=head2 64 bit support.
-If your platform does not have 64 bits natively, but can simulate them with
-compiler flags and/or C<long long> or C<int64_t>, you can build a perl that
-uses 64 bits.
+If your platform does not have 64 bits natively, but can simulate them
+with compiler flags and/or C<long long> or C<int64_t>, you can build a
+perl that uses 64 bits.
There are actually two modes of 64-bitness: the first one is achieved
using Configure -Duse64bitint and the second one using Configure
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, SHLIB_PATH for
-HP-UX, LIBPATH for AIX, PATH for Cygwin) must be set up to include
+NeXTSTEP/OPENSTEP/Darwin, LIBRARY_PATH for BeOS, 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
library search settings.
=back
+=head2 Building DB, NDBM, and ODBM interfaces with Berkeley DB 3
+
+Perl interface for DB3 is part of Berkeley DB, but if you want to
+compile standard Perl DB/ODBM/NDBM interfaces, you must follow
+following instructions.
+
+Berkeley DB3 from Sleepycat Software is by default installed without
+DB1 compatibility code (needed for DB_File interface) and without
+links to compatibility files. So if you want to use packages written
+for DB/ODBM/NDBM interfaces, you need to configure DB3 with
+--enable-compat185 (and optionally with --enable-dump185) and create
+additional references (suppose you are installing DB3 with
+--prefix=/usr):
+
+ ln -s libdb-3.so /usr/lib/libdbm.so
+ ln -s libdb-3.so /usr/lib/libndbm.so
+ echo '#define DB_DBM_HSEARCH 1' >dbm.h
+ echo '#include <db.h>' >>dbm.h
+ install -m 0644 dbm.h /usr/include/dbm.h
+ install -m 0644 dbm.h /usr/include/ndbm.h
+
+Optionally, if you have compiled with --enable-compat185 (not needed
+for ODBM/NDBM):
+
+ ln -s libdb-3.so /usr/lib/libdb1.so
+ ln -s libdb-3.so /usr/lib/libdb.so
+
+ODBM emulation seems not to be perfect, but is quite usable,
+using DB 3.1.17:
+
+ lib/odbm.............FAILED at test 9
+ Failed 1/64 tests, 98.44% okay
+
=head2 What if it doesn't work?
If you run into problems, try some of the following ideas.
=back
+=head1 suidperl
+
+suiperl is an optional component, which is built or installed by default.
+From perlfaq1:
+
+ On some systems, setuid and setgid scripts (scripts written
+ in the C shell, Bourne shell, or Perl, for example, with the
+ set user or group ID permissions enabled) are insecure due to
+ a race condition in the kernel. For those systems, Perl versions
+ 5 and 4 attempt to work around this vulnerability with an optional
+ component, a special program named suidperl, also known as sperl.
+ This program attempts to emulate the set-user-ID and set-group-ID
+ features of the kernel.
+
+Because of the buggy history of suidperl, and the difficulty
+of properly security auditing as large and complex piece of
+software as Perl, we cannot recommend using suidperl and the feature
+should be considered deprecated.
+Instead use for example 'sudo': http://www.courtesan.com/sudo/
+
=head1 make depend
This will look for all the includes. The output is stored in makefile.
it might well be a symptom of the gcc "varargs problem". See the
previous L<"varargs"> item.
-=item Solaris and SunOS dynamic loading
-
-If you have problems with dynamic loading using gcc on SunOS or
-Solaris, and you are using GNU as and GNU ld, you may need to add
--B/bin/ (for SunOS) or -B/usr/ccs/bin/ (for Solaris) to your
-$ccflags, $ldflags, and $lddlflags so that the system's versions of as
-and ld are used. Note that the trailing '/' is required.
-Alternatively, you can use the GCC_EXEC_PREFIX
-environment variable to ensure that Sun's as and ld are used. Consult
-your gcc documentation for further information on the -B option and
-the GCC_EXEC_PREFIX variable.
-
-One convenient way to ensure you are not using GNU as and ld is to
-invoke Configure with
-
- sh Configure -Dcc='gcc -B/usr/ccs/bin/'
-
-for Solaris systems. For a SunOS system, you must use -B/bin/
-instead.
-
-Alternatively, recent versions of GNU ld reportedly work if you
-include C<-Wl,-export-dynamic> in the ccdlflags variable in
-config.sh.
-
-=item ld.so.1: ./perl: fatal: relocation error:
-
-If you get this message on SunOS or Solaris, and you're using gcc,
-it's probably the GNU as or GNU ld problem in the previous item
-L<"Solaris and SunOS dynamic loading">.
-
=item LD_LIBRARY_PATH
If you run into dynamic loading problems, check your setting of
fine with LD_LIBRARY_PATH unset, though that may depend on details
of your local set-up.
-=item dlopen: stub interception failed
-
-The primary cause of the 'dlopen: stub interception failed' message is
-that the LD_LIBRARY_PATH environment variable includes a directory
-which is a symlink to /usr/lib (such as /lib).
-
-The reason this causes a problem is quite subtle. The file libdl.so.1.0
-actually *only* contains functions which generate 'stub interception
-failed' errors! The runtime linker intercepts links to
-"/usr/lib/libdl.so.1.0" and links in internal implementation of those
-functions instead. [Thanks to Tim Bunce for this explanation.]
-
=item nm extraction
If Configure seems to be having trouble finding library functions,
that any site is carrying a corrupted or incomplete source code
archive, please report it to the site's maintainer.
-This message can also be a symptom of using (say) a GNU tar compiled
-for SunOS4 on Solaris. When you run SunOS4 binaries on Solaris the
-run-time system magically alters pathnames matching m#lib/locale# - so
-when tar tries to create lib/locale.pm a differently-named file gets
-created instead.
-
-You may find the file under its assumed name and be able to rename it
-back. Or use Sun's tar to do the extract.
-
=item invalid token: ##
You are using a non-ANSI-compliant C compiler. See L<WARNING: This
version requires a compiler that supports ANSI C>.
-=item lib/locale.pm: No such file or directory
-
-See L<THIS PACKAGE SEEMS TO BE INCOMPLETE>.
-
=item Miscellaneous
Some additional things that have been reported for either perl4 or perl5:
make install will install the following:
+ binaries
+
perl,
perl5.nnn where nnn is the current release number. This
will be a link to perl.
suidperl,
sperl5.nnn If you requested setuid emulation.
a2p awk-to-perl translator
+
+ scripts
+
cppstdin This is used by perl -P, if your cc -E can't
read from stdin.
c2ph, pstruct Scripts for handling C structures in header files.
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, and
- pod2text
+ pod2man,
+ pod2text,
+ pod2checker,
+ pod2select,
+ pod2usage
splain Describe Perl warnings and errors
dprofpp Perl code profile post-processor
- library files in $privlib and $archlib specified to
+ library files
+
+ in $privlib and $archlib specified to
Configure, usually under /usr/local/lib/perl5/.
+
+ documentation
+
man pages in $man1dir, usually /usr/local/man/man1.
module man
pages in $man3dir, usually /usr/local/man/man3.
Installperl will also create the directories listed above
in L<"Installation Directories">.
-Perl's *.h header files and the libperl.a library are also installed
+Perl's *.h header files and the libperl library are also installed
under $archlib so that any user may later build new modules, run the
optional Perl compiler, or embed the perl interpreter into another
program even if the Perl source is no longer available.
+Sometimes you only want to install the version-specific parts of the perl
+installation. For example, you may wish to install a newer version of
+perl alongside an already installed production version of perl without
+disabling installation of new modules for the production version.
+To only install the version-specific parts of the perl installation, run
+
+ Configure -Dversiononly
+
+or answer 'y' to the appropriate Configure prompt. Alternatively,
+you can just manually run
+
+ ./perl installperl -v
+
+and skip installman altogether.
+See also L<"Maintaining completely separate versions"> for another
+approach.
+
=head1 Coexistence with earlier versions of perl5
In general, you can usually safely upgrade from one version of Perl (e.g.