perl 5.003_05: lib/AnyDBM_File.pm
[p5sagit/p5-mst-13.2.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index fb38c46..bb00e4e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Install - Build and Installation guide for perl5.
 
 =head1 SYNOPSIS
 
-The basic steps to build and install perl5 are:
+The basic steps to build and install perl5 on a Unix system are:
 
        rm -f config.sh
        sh Configure
@@ -14,6 +14,9 @@ The basic steps to build and install perl5 are:
 
 Each of these is explained in further detail below.
 
+For information on non-Unix systems, see the section on
+L<"Porting Information">, below.
+
 =head1 DESCRIPTION
 
 You should probably at least skim through this entire document before
@@ -118,6 +121,7 @@ to turn off each extension:
     Fcntl              (Always included by default)
     FileHandle         (Always included by default)
     GDBM_File          i_gdbm
+    IO                 (Always included by default)
     NDBM_File          i_ndbm
     ODBM_File          i_dbm
     POSIX              useposix
@@ -354,33 +358,33 @@ installed on multiple systems.  Here's one way to do that:
     cd /usr/local  # Or wherever you specified as $prefix
     tar xvf perl5-archive.tar
 
-=head2 Building a shared libperl5.so Perl library.
+=head2 Building a shared libperl.so Perl library.
 
 Currently, for most systems, the main perl executable is built by
 linking the "perl library" libperl.a with perlmain.o, your static
 extensions (usually just DynaLoader.a) and various extra libraries,
 such as -lm.
 
-On systems that support dynamic loading, it may be possible to replace
-libperl.a with a shared libperl5.so.  If you anticipate building
+On some systems that support dynamic loading, it may be possible to
+replace libperl.a with a shared libperl.so.  If you anticipate building
 several different perl binaries (e.g. by embedding libperl into
 different programs, or by using the optional compiler extension), then
-you might wish to build a shared libperl5.so so that all your binaries
+you might wish to build a shared libperl.so so that all your binaries
 can share the same library.
 
 The disadvantages are that there may be a significant performance
-penalty associated with the shared libperl5.so, and that the overall
+penalty associated with the shared libperl.so, and that the overall
 meachanism is still rather fragile with respect to different versions
 and upgrades.
 
 In terms of performance, on my test system (Solaris 2.5_x86) the perl
-test suite took roughly 15% longer to run with the shared libperl5.so.
+test suite took roughly 15% longer to run with the shared libperl.so.
 Your system and typical applications may well give quite different
 results.
 
 The default name for the shared library is typically something like
-libperl5.so.3.2 (for perl5.003_02) or libperl5.so.302 or simply
-libperl5.so.  Configure tries to guess a sensible naming convention
+libperl.so.3.2 (for perl5.003_02) or libperl.so.302 or simply
+libperl.so.  Configure tries to guess a sensible naming convention
 based on your C library name.  Since the library gets installed in a
 version-specific architecture-dependent directory, the exact name
 isn't very important anyway, as long as your linker is happy.
@@ -406,9 +410,28 @@ for Csh-style shells.  You *MUST* do this before running make.
 Folks running NeXT OPENSTEP must substitute DYLD_LIBRARY_PATH for
 LD_LIBRARY_PATH above.
 
+There is also an potential problem with the shared perl library if you
+want to have more than one "flavor" of the same version of perl (e.g.
+with and without -DDEBUGGING).  For example, suppose you build and
+install a standard perl5.004 with a shared library.  Then, suppose you
+try to build perl5.004 with -DDEBUGGING enabled, but everything else
+the same, including all the installation directories.  How can you
+ensure that your newly built perl will link with your newly built
+libperl.so.4 rather with the installed libperl.so.4?  The answer is
+that you might not be able to.  The installation directory is encoded
+in the perl binary with the LD_RUN_PATH environment variable.  On
+Solaris, you can override that with LD_LIBRARY_PATH; on Linux you
+can't.
+
+The only reliable answer is that you should specify a different
+directory for the architecture-dependent library for your -DDEBUGGING
+version of perl.  You can do this with by changing all the *archlib*
+variables in config.sh, namely archlib, archlib_exp, and
+installarchlib, to point to your new architecture-dependent library.
+
 =head2 Selecting File IO mechanisms
 
-Previous version of perl used the standard IO mechanisms as defined in
+Previous versions of perl used the standard IO mechanisms as defined in
 <stdio.h>.  Versions 5.003_02 and later of perl allow alternate IO
 mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still
 the default and is the only supported mechanism.
@@ -542,7 +565,11 @@ B<gcc>, you should almost always remove your old config.sh.
 =item Propagating your changes to config.sh
 
 If you later make any changes to F<config.sh>, you should propagate
-them to all the .SH files by running  B<sh Configure -S>.
+them to all the .SH files by running  B<sh Configure -S>.  You will
+then have to rebuild by running
+
+       make depend
+       make
 
 =item config.over
 
@@ -550,7 +577,7 @@ You can also supply a shell script config.over to over-ride Configure's
 guesses.  It will get loaded up at the very end, just before config.sh
 is created.  You have to be careful with this, however, as Configure
 does no checking that your changes make sense.  See the section on
-changing the installation directory for an example.
+L<"Changing the installation directory"> for an example.
 
 =item config.h
 
@@ -589,6 +616,10 @@ corresponing subdirectories.  Additional information, including
 a glossary of all those config.sh variables, is in the Porting
 subdirectory.
 
+Ports for other systems may also be available.  You should check out
+L<"http:/www.perl.com/CPAN/ports"> for current information on ports to
+various other operating systems.
+
 =back
 
 =head1 make depend
@@ -610,6 +641,16 @@ explicitly above.
 This will attempt to make perl in the current directory.
 
 If you can't compile successfully, try some of the following ideas.
+If none of them help, and careful reading of the error message and
+the relevant manual pages on your system doesn't help, you can
+send a message to either the comp.lang.perl.misc newsgroup or to
+perlbug@perl.com with an accurate description of your problem.
+Please include the I<output> of the B<./myconfig> shell script
+that comes with the distribution.
+
+[The B<perlbug> program that comes with the perl distribution is
+useful for sending in such reports, but you need to have
+perl compiled and installed before you can use it.]
 
 =over 4
 
@@ -631,14 +672,15 @@ to test your version of miniperl.
 
 If you get duplicates upon linking for malloc et al, say -DHIDEMYMALLOC.
 
-=item *
+=item varargs
 
 If you get varargs problems with gcc, be sure that gcc is installed
 correctly.  When using gcc, you should probably have i_stdarg='define'
 and i_varargs='undef' in config.sh.  The problem is usually solved by
 running fixincludes correctly.  If you do change config.sh, don't
-forget to propagate your changes with C<sh Configure -S>.  See also the
-vsprintf item below.
+forget to propagate your changes (see
+L<"Propagating your changes to config.sh"> below).
+See also the L<"vsprintf"> item below.
 
 =item *
 
@@ -650,9 +692,9 @@ numbers will vary in different versions of perl):
     proto.h:45: prototype declaration
 
 it might well be a symptom of the gcc "varargs problem".  See the
-previous item.
+previous L<"varargs"> item.
 
-=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
@@ -663,6 +705,12 @@ environment variable to ensure that Sun's as and ld are used.  Consult
 your gcc documentation for further information on the B<-B> option and
 the GCC_EXEC_PREFIX variable.
 
+=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 *
 
 If you run into dynamic loading problems, check your setting of
@@ -694,7 +742,7 @@ or by answering the nm extraction question interactively.
 If you have previously run Configure, you should I<not> reuse your old
 config.sh.
 
-=item *
+=item vsprintf
 
 If you run into problems with vsprintf in compiling util.c, the
 problem is probably that Configure failed to detect your system's
@@ -710,13 +758,31 @@ re-running Configure without using nm extraction (see previous item).
 
 =item *
 
+If you can't compile successfully, try turning off your compiler's
+optimizier.  Edit config.sh and change the line
+
+       optimize='-O'
+
+to something like
+
+       optimize=' '
+
+then propagate your changes with B<sh Configure -S> and rebuild
+with B<make depend; make>.
+
+=item *
+
 If you can't compile successfully, try adding a C<-DCRIPPLED_CC> flag.
 (Just because you get no errors doesn't mean it compiled right!)
 This simplifies some complicated expressions for compilers that
-get indigestion easily.  If that has no effect, try turning off
-optimization.  If you have missing routines, 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.
+get indigestion easily.
+
+=item Missing functions
+
+If you have missing routines, 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.  Look through config.h for
+likely suspects.
 
 =item *
 
@@ -727,11 +793,36 @@ F<cflags>.  It's okay to insert rules for specific files into
 F<makefile> since a default rule only takes effect in the absence of a
 specific rule.
 
-=item *
+=item Missing dbmclose
 
 SCO prior to 3.2.4 may be missing dbmclose().  An upgrade to 3.2.4
 that includes libdbm.nfs (which includes dbmclose()) may be available.
 
+=item Warning (will try anyway): No library found for -lposix
+
+If you see such a message during the building of an extension, but
+the extension passes its tests anyway (see L<"make test"> below),
+then don't worry about the warning message.  The extension
+Makefile.PL goes looking for various libraries needed on various
+systems; few systems will need all the possible libries listed.
+For example, a system may have -lcposix or -lposix, but it's
+unlikely to have both, so most users will see warnings for the one
+they don't have.  The message 'will try anyway' is intended to
+reassure you that the process is continuing.
+
+On the other hand, if you are building GDBM_File and you get the
+message
+
+    Warning (will try anyway): No library found for -lgdbm
+
+then it's likely you're going to run into trouble somewhere along
+the line, since it's hard to see how you can use the GDBM_File
+extension without the -lgdbm library.
+
+It is true that, in principle, Configure could have figured all of
+this out, but Configure and the extension building process are not
+quite that tightly coordinated.
+
 =item *
 
 Some additional things that have been reported for either perl4 or perl5:
@@ -746,6 +837,7 @@ If you get syntax errors on '(', try -DCRIPPLED_CC.
 
 Machines with half-implemented dbm routines will need to #undef I_ODBM
 
+
 =back
 
 =head1 make test
@@ -955,4 +1047,15 @@ from the original README by Larry Wall.
 
 =head1 LAST MODIFIED
 
-21 August 1996
+6 September 1996
+
+> > Warning (will try anyway): No library found for -lucb
+> Don't worry about these.  It tried anyway and succeeded.  If you can think
+> of a better way to word the message, please feel free to suggest one.
+
+I figured that Configure should be able to figure out that there are no
+-lucb/-lposix/-lcposix libraries so that ExtUtils::Liblist won't have
+to check for them.  Okay, I'll stop worrying. :)
+
+Thank you!
+Dan