Compiling and installing Perl 5.004_03 on VMS 6.1 and up

A step by step guide

This guide is a step-by-step set of instructions for building and installing Perl 5.004_03 on OpenVMS 6.1 and up. The instructions should work for OpenVMS Vax 5.5-x, but may need some local modifications.

We're going to assume that you already have the perl source archive from one of the archive sites, as well as all the tools you'll need to unpack and build. These include gzip, an un-tar program, MMS or MMK, and a C compiler. (You can head over to the One Stop Shopping page for links to these tools) The C compiler we're going to use is Dec C. Vax C and Gnu C are options if you're running on OpenVMS Vax. Both work, though Vax C is getting pretty long in the tooth.

You'll also need to have a TCP/IP stack installed, the SOCKETSHR library installed, and possibly NETLIB installed.

Important note! Currently UDP sockets do not work for the SOCKETSHR, NETLIB, Multinet combination. If you're using Multinet, compile with the Dec C Sockets option.

Another important note! SOCKETSHR for VAX comes pre-compiled with VAX C. If you're compiling Perl with Dec C (which you should if you've got the option), you'll need to recompile SOCKETSHR!

Create a directory to start from

You should be as close to the top of your directory tree as possible, as the build creates subdirectories five and six levels deep. I recommend creating a logical like this:

$ DEFINE/TRANS=(CONC,TERM) PERLSRC DISK:[DIR.DIR.DIR.]

where DISK:[DIR.DIR.DIR.] is where you're going to start the perl compilation. Then SET DEFAULT PERLSRC:[000000]

Get the archive on your VMS machine

There are a bunch of ways to do this, FTP being the easiest. The latest version of perl is always available on CPAN as latest.tar.gz. The rest of this page will assume the file is named latest.tgz on your VMS machine.

Uncompress the archive

$gzip -d latest.tgz

Unpack the archive

Untar the archive. We're assuming that the tar program is VMSTAR--yours may be different.

$ VMSTAR xvf latest.tar

You'll get a directory [.PERL5_004_03] with a whole slew of stuff in it.

SET DEFAULT into the perl source directory

$ SET DEFAULT [.PERL5_004_03]

Build Perl

You'd think this would be tricky, but it's amazingly simple. If you're using MMK instead of MMS, just substitute MMK for MMS in the following. (Simple, huh?)

On OpenVMS Alpha

$MMS/DESC=[.VMS]/MACRO=("decc=1","__AXP__=1","SOCKETSHR_SOCKETS=1")

On OpenVMS VAX, Dec C

$MMS/DESC=[.VMS]/MACRO=("decc=1","cc=CC/DECC","SOCKETSHR_SOCKETS=1")

On OpenVMS Vax, VAX C

$MMS/DESC=[.VMS]/MACRO=("cc=CC/VAXC","SOCKETSHR_SOCKETS=1")

On OpenVMS Vax, GNU C

$MMS/DESC=[.VMS]/MACRO=("gnuc=1","SOCKETSHR_SOCKETS=1")

However you start it, Perl should build. It takes quite a while, and does a whole heap 'o things. If it ends abruptly, check out the Perl Install FAQ.

Test Perl

There's a comprehensive test suite for Perl.

$MMS/DESC=[.VMS] /MACRO=("SOCKETSHR_SOCKETS=1") test

will invoke the test suite. You should get no errors from the tests. If you do, that means there's something amiss. Check the Perl Install FAQ, and if there's no help there, try the VMSPerl mailing list

Install Perl

Once Perl's been built and successfully tested, you need to install it.

  1. Figure out where Perl wants to live

    Perl's gotta go somewhere, and now's the time to figure out where. It's not all that important exactly where it goes, as long as it's somewhere other than where you built it, and within 8 levels of the root directory of the disk.

  2. Create a PERL_ROOT logical

    It should get defined in SYS$MANAGER:SYLOGICALS.COM as

    $ DEFINE/SYSTEM/TRANS=(CONC,TERM) DISK:[DIR.DIR.]

    where DISK:[DIR.DIR.] is the actual location that Perl's going to live. Note that trailing period--it's important!

  3. Copy PERLSRC:[PERL5_004_03]PERLSHR.EXE to SYS$SHARE

    This is the shareable library, and almost all of Perl actually lives in here. If you choose not to put it in SYS$SHARE, define a logical PERLSHR that points to it.

  4. Copy PERLSRC:[PERL5_004_03]PERL.EXE to PERL_ROOT:[000000]

    PERL.EXE is the perl executable. It needs to be world-executable, or at least executable by anyone who needs to execute it.

  5. Copy PERLSRC:[PERL5_004_03.LIB...]*.* to PERL_ROOT:[LIB...]*.*

    Everything should go over. Make sure it's all world-readable, and the executables are world-execute.

  6. Make PERL a valid command

    You can either define it as a symbol somewhere (usually SYS$MANGER:SYLOGIN.COM) like:

    PERL :== "$PERL_ROOT:[000000]PERL.EXE"

    or define it system-wide as a foreign command. See the VMSPerl FAQ for more details.

Optional things to do

There are a few optional, but real handy, things to do. In PERLSRC:[PERL5_004_03.VMS.EXT], there are two extension sub-directories, DCLSYM and STDIO. Both of these are optional modules for Perl. The directories have READMEs in them--check them out if you're interested.


Last updated 09-September-1997
Questions or comments?
Write the Webmaster