The first cut at fixing Perl extensions written in C++ in AIX,
[p5sagit/p5-mst-13.2.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index 2e8512e..8014a41 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ Install - Build and Installation guide for perl5.
 The basic steps to build and install perl5 on a Unix system are:
 
        rm -f config.sh Policy.sh
-       sh Configure
+       sh Configure -de
        make
        make test
        make install
@@ -19,6 +19,17 @@ The basic steps to build and install perl5 on a Unix system are:
 
 Each of these is explained in further detail below.
 
+The above commands will install Perl to /usr/local or /opt, depending
+on the platform.  If that's not okay with you, use
+
+       rm -f config.sh Policy.sh
+       sh Configure
+       make
+       make test
+       make install
+
+Full configuration instructions can be found in the INSTALL file.
+
 For information on non-Unix systems, see the section on
 L<"Porting information"> below.
 
@@ -30,11 +41,18 @@ pod/perldelta.pod file.  For more detailed information about specific
 changes, see the Changes file.
 
 IMPORTANT NOTE:  5.005_53 and later releases do not export unadorned
-global symbols anymore.  This means most CPAN modules probably won't
-build under this release without adding '-DPERL_POLLUTE' to ccflags
-in config.sh.  This is not the default because we want the modules
-to get fixed *before* the 5.006 release.  pod/perldelta.pod contains
-additional notes about this.
+global symbols anymore.  This means you may need to build older
+extensions that have not been updated for the new naming convention
+with:
+
+       perl Makefile.PL POLLUTE=1
+       
+Alternatively, you can enable CPP symbol pollution wholesale by
+building perl itself with:
+
+       sh Configure -Accflags=-DPERL_POLLUTE
+
+pod/perldelta.pod contains more details about this.
 
 =head1 DESCRIPTION
 
@@ -60,18 +78,26 @@ system.  (Unixware users should use the svr4.sh hint file.)  If
 there is a README file for your platform, then you should read
 that too.  Additional information is in the Porting/ directory.
 
-=head1 WARNING:  This version is not binary compatible with Perl 5.005.
+=head1 WARNING:  This version may not be binary compatible with Perl 5.005.
+
+Using the default Configure options for building perl should get you
+a perl that will be binary compatible with the 5.005 release.
+
+However, if you run Configure with any custom options, such as
+-Dusethreads, -Dusemultiplicity, -Dusemymalloc, -Ubincompat5005 etc.,
+the resulting perl will not be binary compatible.  Under these
+circumstances, if you have dynamically loaded extensions that were
+built under perl 5.005, you will need to rebuild and reinstall all
+those extensions to use them with 5.6.
 
-If you have dynamically loaded extensions that you built under perl
-5.005, you will need to rebuild and reinstall those extensions to use
-them with 5.006.  Pure perl modules should continue to work just fine
-without reinstallation.  See the discussions below on L<"Coexistence
-with earlier versions of perl5"> and L<"Upgrading from 5.005 to
-5.006"> for more details.
+Pure perl modules without XS or C code should continue to work fine
+without reinstallation.  See the discussions below on
+L<"Coexistence with earlier versions of perl5"> and
+L<"Upgrading from 5.005 to 5.6"> for more details.
 
 The standard extensions supplied with Perl will be handled automatically.
 
-In a related issue, old modules may possibly be affected by the
+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 (and pod/perl500Xdelta.pod) for a description of
 what's changed.  See also your installed copy of the perllocal.pod
@@ -169,6 +195,21 @@ defaults from then on.
 After it runs, Configure will perform variable substitution on all the
 *.SH files and offer to run make depend.
 
+=head2 Altering config.sh variables for C compiler switches etc.
+
+For most users, all of the Configure defaults are fine.  Configure
+also has several convenient options which are all described below.
+However, if Configure doesn't have an option to do what you want,
+you can change Configure variables after the platform hints have been
+run, by using Configure's -A switch.  For example, here's how to add
+a couple of extra flags to C compiler invocations:
+
+       sh Configure -Accflags="-DPERL_Y2KWARN -DPERL_POLLUTE_MALLOC"
+
+For more help on Configure switches, run:
+
+       sh Configure -h
+
 =head2 Common Configure options
 
 Configure supports a number of useful options.  Run B<Configure -h> to
@@ -290,9 +331,9 @@ 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.006.
+By default, Configure will use the following directories for 5.6.
 $version is the full perl version number, including subversion, e.g.
-5.006 or 5.00601, and $archname is a string like sun4-sunos,
+5.6 or 5.6.1, and $archname is a string like sun4-sunos,
 determined by Configure.  The full definitions of all Configure
 variables are in the file Porting/Glossary.
 
@@ -318,7 +359,7 @@ the common style is shown here.
 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.  $apiversion
-is the perl version number (without subversion), e.g. 5.006.
+is the perl version number (without subversion), e.g. 5.6.
 
     Configure variable Default value
     $siteprefix                $prefix
@@ -416,7 +457,7 @@ without resetting MANPATH.
 
 You can continue to use the old default from the command line with
 
-       sh Configure -Dman3dir=/usr/local/lib/perl5/5.006/man/man3
+       sh Configure -Dman3dir=/usr/local/lib/perl5/5.6/man/man3
 
 Some users also prefer to use a .3pm suffix.  You can do that with
 
@@ -454,13 +495,13 @@ library directory structure is slightly simplified.  Instead of
 suggesting $prefix/lib/perl5/, Configure will suggest $prefix/lib.
 
 Thus, for example, if you Configure with
--Dprefix=/opt/perl, then the default library directories for 5.006 are
+-Dprefix=/opt/perl, then the default library directories for 5.6 are
 
     Configure variable Default value
-       $privlib        /opt/perl/lib/5.006
-       $archlib        /opt/perl/lib/5.006/$archname
-       $sitelib        /opt/perl/lib/site_perl/5.006
-       $sitearch       /opt/perl/lib/site_perl/5.006/$archname
+       $privlib        /opt/perl/lib/5.6
+       $archlib        /opt/perl/lib/5.6/$archname
+       $sitelib        /opt/perl/lib/site_perl/5.6
+       $sitearch       /opt/perl/lib/site_perl/5.6/$archname
 
 =head2 Changing the installation directory
 
@@ -536,7 +577,7 @@ If the generated Policy.sh file is unsuitable, you may freely edit it
 to contain any valid shell commands.  It will be run just after the
 platform-specific hints files.
 
-Note:  Since the directory hierarchy for 5.006 contains a number of
+Note:  Since the directory hierarchy for 5.6 contains a number of
 new vendor* and site* entries, your Policy.sh file will probably not
 set them to your desired values.  I encourage you to run Configure
 interactively to be sure it puts things where you want them.
@@ -678,7 +719,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/Rhapsody, LIBRARY_PATH for BeOS, SHLIB_PATH for
-HP-UX, LIBPATH for AIX, PATH for cygwin32) must be set up to include
+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.
@@ -755,12 +796,22 @@ or you can answer 'n' at the appropriate interactive Configure prompt.
 
 =item -DPERL_POLLUTE_MALLOC
 
+NOTE: This flag is enabled automatically on some platforms if you
+asked for binary compatibility with version 5.005, or if you just
+run Configure to accept all the defaults on those platforms.  You
+can refuse the automatic binary compatibility flags wholesale by
+running:
+
+       sh Configure -Ubincompat5005
+
+or by answering 'n' at the appropriate prompt.
+
 Perl's malloc family of functions are called Perl_malloc(),
-Perl_realloc(), Perl_calloc() and Perl_mfree().  The names do not clash
-with the system versions of these functions.
+Perl_realloc(), Perl_calloc() and Perl_mfree().  When this flag is
+not enabled, the names do not clash with the system versions of
+these functions.
 
-If you add -DPERL_POLLUTE_MALLOC to your ccflags variable in
-config.sh, then Perl's malloc family of functions will have the same
+If enabled, Perl's malloc family of functions will have the same
 names as the system versions.  This may be sometimes required when you
 have libraries that like to free() data that may have been allocated
 by Perl_malloc() and vice versa.
@@ -798,16 +849,6 @@ it's convenient to have both.
 If you are using a shared libperl, see the warnings about multiple
 versions of perl under L<Building a shared libperl.so Perl library>.
 
-=head2 Other Compiler Flags
-
-For most users, all of the Configure defaults are fine.  However, you
-can change a number of factors in the way perl is built by adding
-appropriate -D directives to your ccflags variable in config.sh.
-
-You should also run Configure interactively to verify that a hint file
-doesn't inadvertently override your ccflags setting.  (Hints files
-shouldn't do that, but some might.)
-
 =head2 Extensions
 
 By default, Configure will offer to build every extension which appears
@@ -1119,12 +1160,17 @@ libgdbm under HP-UX 11.
 Specific information for the OS/2, Plan9, VMS and Win32 ports is in the
 corresponding README files and subdirectories.  Additional information,
 including a glossary of all those config.sh variables, is in the Porting
-subdirectory.
+subdirectory.  Especially Porting/Glossary should come in handy. 
 
 Ports for other systems may also be available.  You should check out
 http://www.perl.com/CPAN/ports for current information on ports to
 various other operating systems.
 
+If you plan to port Perl to a new architecture study carefully the
+section titled "Philosophical Issues in Patching and Porting Perl"
+in the file Porting/pumpkin.pod and the file Porting/patching.pod.
+Study also how other non-UNIX ports have solved problems.
+
 =back
 
 =head1 make depend
@@ -1333,10 +1379,13 @@ with B<make depend; make>.
 
 =item CRIPPLED_CC
 
-If you still can't compile successfully, try adding a -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 you still can't compile successfully, try:
+
+       sh Configure -Accflags=-DCRIPPLED_CC
+
+This flag simplifies some complicated expressions for compilers that get
+indigestion easily.  (Just because you get no errors doesn't mean it
+compiled right!)
 
 =item Missing functions
 
@@ -1625,13 +1674,13 @@ searched by 5.005_03 are
        /usr/local/lib/perl5/site_perl/5.005/$archname
        /usr/local/lib/perl5/site_perl/5.005
 
-Now, suppose you install version 5.006.  The directories searched by
-version 5.006 will be
+Now, suppose you install version 5.6.  The directories searched by
+version 5.6 will be
 
-       /usr/local/lib/perl5/5.006/$archname
-       /usr/local/lib/perl5/5.006
-       /usr/local/lib/perl5/site_perl/5.006/$archname
-       /usr/local/lib/perl5/site_perl/5.006
+       /usr/local/lib/perl5/5.6/$archname
+       /usr/local/lib/perl5/5.6
+       /usr/local/lib/perl5/site_perl/5.6/$archname
+       /usr/local/lib/perl5/site_perl/5.6
 
        /usr/local/lib/perl5/site_perl/5.005/$archname
        /usr/local/lib/perl5/site_perl/5.005
@@ -1639,25 +1688,25 @@ version 5.006 will be
 Notice the last two entries -- Perl understands the default structure
 of the $sitelib directories and will look back in older, compatible
 directories.  This way, modules installed under 5.005_03 will continue
-to be usable by 5.005_03 but will also accessible to 5.006.  Further,
+to be usable by 5.005_03 but will also accessible to 5.6.  Further,
 suppose that you upgrade a module to one which requires features
-present only in 5.006.  That new module will get installed into
-/usr/local/lib/perl5/site_perl/5.006 and will be available to 5.006,
+present only in 5.6.  That new module will get installed into
+/usr/local/lib/perl5/site_perl/5.6 and will be available to 5.6,
 but will not interfere with the 5.005_03 version.
 
-Also, by default, 5.006 will look in
+Also, by default, 5.6 will look in
 
        /usr/local/lib/perl5/site_perl/
 
 for 5.004-era pure perl modules.
 
-Lastly, suppose you now install version 5.006_01.  The directories
-searched by 5.006_01 will be
+Lastly, suppose you now install version 5.6.1.  The directories
+searched by 5.6.1 will be
 
-       /usr/local/lib/perl5/5.00601/$archname
-       /usr/local/lib/perl5/5.00601
-       /usr/local/lib/perl5/site_perl/5.006/$archname
-       /usr/local/lib/perl5/site_perl/5.006
+       /usr/local/lib/perl5/5.6.1/$archname
+       /usr/local/lib/perl5/5.6.1
+       /usr/local/lib/perl5/site_perl/5.6/$archname
+       /usr/local/lib/perl5/site_perl/5.6
 
        /usr/local/lib/perl5/site_perl/5.005/$archname
        /usr/local/lib/perl5/site_perl/5.005
@@ -1665,8 +1714,8 @@ searched by 5.006_01 will be
 
 When you install an add-on extension, it gets installed into $sitelib (or
 $sitearch if it is architecture-specific).  This directory deliberately
-does NOT include the sub-version number (01) so that both 5.006 and
-5.006_01 can use the extension.
+does NOT include the sub-version number (01) so that both 5.6 and
+5.6.1 can use the extension.
 
 However, if you do run into problems, and you want to continue to use the
 old version of perl along with your extension, move those extension files
@@ -1675,7 +1724,7 @@ to the appropriate version directory, such as $privlib (or $archlib).
 extension.  For the Tk extension, for example, the list of files installed
 is in $sitearch/auto/Tk/.packlist.)  Then use your newer version of perl
 to rebuild and re-install the extension into $sitelib.  This way, Perl
-5.006 will find your files in the 5.006 directory, and newer versions
+5.6 will find your files in the 5.6 directory, and newer versions
 of perl will find your newer extension in the $sitelib directory.
 (This is also why perl searches the site-specific libraries last.)
 
@@ -1705,13 +1754,13 @@ seriously consider using a separate directory, since development
 subversions may not have all the compatibility wrinkles ironed out
 yet.
 
-=head2 Upgrading from 5.005 to 5.006
+=head2 Upgrading from 5.005 to 5.6
 
 Extensions built and installed with versions of perl prior to 5.005_50
 will need to be recompiled to be used with 5.005_50 and later.  You will,
-however, be able to continue using 5.005 even after you install 5.006.
+however, be able to continue using 5.005 even after you install 5.6.
 The 5.005 binary will still be able to find the modules built under
-5.005; the 5.006 binary will look in the new $sitearch and $sitelib
+5.005; the 5.6 binary will look in the new $sitearch and $sitelib
 directories, and will not find them.  See also your installed copy
 of the perllocal.pod file for a (possibly incomplete) list of locally
 installed modules.  Note that you want perllocal.pod not perllocale.pod