Perl 5.8.4 for OpenVMS VAX 7.3 -- source kit, 30-SEP-2026
==========================================================

Douglas P. Fields, Jr. (symbolics@lisp.engineer)

Everything needed to rebuild the two binary kits (PERL584_VAX_20260930.BCK
and PERL584_VAX_DEBUG_20260930.BCK) from the original source.


1. CONTENTS

  original/source.zip     The Perl 5.8.4 release, unmodified (3508
                          entries, 13,596,160 bytes).
  patches/                The changes, as unified diffs (section 3).
  patched/                The eight patched source files in full, in
                          their places in the tree, for a VAX without a
                          "patch" program.
  licences/               ARTISTIC.TXT, COPYING.TXT, README.TXT and
                          README.VMS.TXT, copied unchanged from
                          source.zip (artistic, copying, readme,
                          readme.vms).
  configure/              CONFIGURE_CORE.COM, CONFIGURE_TREE.COM: the
                          Configure command and answers. CONFIG_DBG.SH,
                          CONFIG_NODBG.SH: the config.sh each produced.
  build/                  BUILD_TREE.COM (configure, then MMS, as a batch
                          job), BUILD_INVENTORY.COM.
  suite/                  The driver used to run Perl's whole test suite
                          in 19 chunks: CHUNK.COM, ALLCHUNKS.COM,
                          RUNCHUNK.PL, the chunk lists, and
                          COMPARE_SUITE.PY (compares two transcripts,
                          runs on any host with Python 3).
  kit/                    MAKE_KIT.COM (builds a saveset from a built
                          tree), the installer and uninstaller, and the
                          BACKUP/LIST of each saveset.
  SHA256SUMS.TXT          SHA-256 of every file in this kit.


2. THE ORIGINAL SOURCE

source.zip is the member perlbuild584/source.zip of Craig A. Berry's VMS
build kit perlbuild584.zip (23-May-2004), from the DECUS/OpenVMS freeware
mirror:

    https://www.digiater.nl/openvms/decus/perl/perlbuild584.zip

  perlbuild584.zip   15,607,296 bytes
    SHA-256 68ad062e6f24205744486945bd80a1534cbeaac2baf5a0612d7e2803b350f2cf
  source.zip         13,596,160 bytes
    SHA-256 2f5b409461d4cd81eb8d601c06a8b7336aa6043a55c7b0e7605c87cd1852729c

Only source.zip was used. The other members of perlbuild584.zip (its
build procedure and its CPAN modules) were not.

Perl may be copied under the Artistic License or the GNU General Public
License, at your choice: see licences/.


3. THE CHANGES

patches/VAXFP_OVERFLOW.DIFF -- the VAX floating point patch. Eight files:

  numeric.c              Converting a literal or string: the result
                         saturates at the largest number instead of
                         faulting, and every value up to the largest
                         number converts exactly. hex(), oct() and binary
                         literals past the largest number saturate, with a
                         warning.
  perl.h                 PERL_NV_SATURATE (defined on VMS without IEEE
                         floating point), the exact overflow test for
                         addition, the warning.
  pp_hot.c               + and += saturate, with a warning.
  pp.c                   - * / and the integer-power loop of ** saturate,
                         with a warning. exp() and the general ** are left
                         alone: the C library already saturates them.
  ext/List/Util/Util.xs  sum saturates, with a warning.
  vms/vms.c              Perl_vms_fpe_handler: a VMS condition handler
  vms/vmsish.h           that turns any other floating overflow, floating
                         divide by zero or reserved operand fault into a
                         Perl error that eval can catch.
  scope.h                JMPENV_PUSH establishes that handler in every
                         frame Perl can longjmp back to.

All of it is conditional on "VMS without IEEE floating point", uses
NV_MAX and frexp rather than any D_FLOAT constant, and changes nothing on
other systems.

patches/NUMERIC_C_DFLOAT_OVERFLOW.DIFF -- the first, smaller fix
(conversion only). Kept for the record. VAXFP_OVERFLOW.DIFF includes it;
do not apply both.

patches/PERL_SETUP_COM_ROOT.DIFF -- one line of the GENERATED file
PERL_SETUP.COM. Configure writes
    define/translation=concealed perl_root SYS$COMMON:[SYSLIB.PERL584.]
but SYS$COMMON is itself a concealed root, and RMS rejects a root inside
a root (%RMS-F-DEV at install time). The fixed line names the same
directory as SYS$SYSDEVICE:[VMS$COMMON.SYSLIB.PERL584.]. MAKE_KIT.COM
applies it.

Checked: VAXFP_OVERFLOW.DIFF applies cleanly (patch -p0) to the eight
files of source.zip and gives exactly the files in patched/, which are
the files that were built. One thing to know on a case-sensitive host:
source.zip stores ext/list/util/util.xs in lower case, and the diff names
it ext/List/Util/Util.xs. On VMS that makes no difference.


4. REBUILDING

You need OpenVMS VAX V7.3, Compaq C V6.4, MMS, an UnZip for VMS, roughly
300,000 free blocks per build tree (an estimate, not measured), and an
account whose page file quota
(PGFLQUOTA) is above 100,000: 131072 was used, with the system parameter
VIRTUALPAGECNT at 196608.

The scripts assume everything is under SYS$SYSDEVICE:[HOME.SYSTEM.PERL]
(edit them for another place), with source.zip as SOURCE.ZIP there:

  $ CREATE/DIRECTORY SYS$SYSDEVICE:[HOME.SYSTEM.PERL.BLD_NODBG]
  $ DEFINE/TRANSLATION=CONCEALED PERL_BUILD -
        SYS$SYSDEVICE:[HOME.SYSTEM.PERL.BLD_NODBG.]
  $ SET DEFAULT PERL_BUILD:[000000]
  $ UNZIP -q SYS$SYSDEVICE:[HOME.SYSTEM.PERL]SOURCE.ZIP
  $ ! copy the eight files of patched/ over the ones in [.SOURCE...]
  $ SUBMIT/NOPRINTER/NAME=BLD_NODBG -
        /LOG=SYS$SYSDEVICE:[HOME.SYSTEM.PERL]BUILD_BLD_NODBG.LOG -
        /PARAMETERS=(BLD_NODBG,NODEBUG) -
        SYS$SYSDEVICE:[HOME.SYSTEM.PERL]BUILD_TREE.COM

BUILD_TREE.COM runs CONFIGURE_TREE.COM and then MMS. CONFIGURE_TREE.COM
and BUILD_TREE.COM must be in [HOME.SYSTEM.PERL]. The Configure command
is

  $ @CONFIGURE "-des" "-Dprefix=SYS$COMMON:[SYSLIB.PERL584.]" -
        "-Dcf_email=..."

(the scripts carry my address as cf_email; put your own there) and
NODEBUG adds "-Duseperldebug=n". DEBUG (the VMS default) gives the
DEBUGGING kit. The two config.sh files differ in three lines: cf_time,
config_args and usedebugging_perl.

The tree is deeper than the eight directory levels ODS-2 allows in one
file specification, which is why everything goes through concealed
logical names (PERL_BUILD, PERLSRC, PERL_ROOT).

Then, to make a saveset (installperl into a staging directory, BACKUP
through a concealed root so the saved directory names are relative):

  $ @MAKE_KIT BLD_NODBG PERL584_VAX_20260930


5. TESTING

Before the suite, in the source root, once:

  $ MMS [.t.lib]vmsfspec.t,[.t.lib]vms_dclsym.t,[.t.lib]vms_stdio.t

(three VMS test files that "MMS TEST" would copy into place). Then, with
the suite/ files in [HOME.SYSTEM.PERL.CHUNKS]:

  $ @SYS$SYSDEVICE:[HOME.SYSTEM.PERL.CHUNKS]ALLCHUNKS BLD_NODBG

Result for both builds: 871 test files, 767 ok, 96 skipped, 8 failed:

  t/run/switchpx           perl -P: the DCL command is too long when the
                           build tree's path is long (%DCL-W-TKNOVF). Not
                           a Perl fault.
  lib/Math/BigInt/t/bare_mbi, bigintpm, sub_mbi (test 2666 of 2832 each)
                           1e+129 is beyond D_FLOAT and becomes the
                           largest number.
  lib/Math/BigInt/t/bigroot
                           All 8 tests pass. One overflow warning on
                           stderr is counted by t/TEST as a ninth test.
  lib/Math/BigRat/t/bigrat (test 131 of 174), bigratup (test 5 of 5)
                           bsqrt of a 40-digit fraction needs a number
                           beyond D_FLOAT, and gets a wrong result.
  lib/Time/Local (test 1)  The test's own two-digit year, read in 2026 as
                           2070, past 32-bit time_t. Fails everywhere.


6. MEASURED

On a simulated MicroVAX 3900 (SIMH), which is much faster than a real
VAXstation:

  Configure                      about 1 min 10 s
  MMS, DEBUGGING build           38 min 31 s and 37 min 34 s (two builds)
  MMS, build without DEBUGGING   34 min 36 s
  Whole test suite               40 to 43 minutes
  installperl + BACKUP           about 2 minutes

On a VAXstation 4000/60 (80 MB), for the earlier unpatched build: about
6 hours 40 minutes for the build, and about 8 hours 46 minutes of test
time for the suite (the sum of the 19 chunks, some of them slowed by
other work on the machine).


7. NAMES IN THE SCRIPTS

The scripts are byte for byte the ones that were used, so their comments
mention my machines: VAX60 (the VAXstation 4000/60), VAX96 (the
VAXstation 4000/96), VSIM1 and VSIM3 (simulated MicroVAX 3900s), and
"AGENT_MISTAKES", a notes file of mine that is not part of this kit.
The email addresses in licences/ and patched/ are those of the original
authors: the licence files are copied unchanged from the Perl release,
and the patched files are release files that differ from it only by the
patch.
