1 Last revised: 09-Oct-1994 by Charles Bailey bailey@genetics.upenn.edu
3 The VMS port of perl5 is still under development. At this time, the perl
4 binaries built under VMS handle internal operations properly, for the most
5 part, as well as most of the system calls which have close equivalents under
6 VMS. There are still some incompatibilities in process handling (e.g the
7 fork/exec model for creating subprocesses doesn't do what you might expect
8 under Unix), and there remain some file handling differences from Unix. There
9 is a VMS implementation of the DynaLoader, but it hasn't been tested much, so
10 it may still have some bugs in it. Over the longer term, we'll try to get many
11 of the useful VMS system services integrated as well, depending on time and
12 people available. Of course, if you'd like to add something yourself, or join
13 the porting team, we'd love to have you!
15 The current sources and build procedures have been tested on a VAX using VAXC
16 and on an AXP using DECC. IF you run into problems with other compilers,
20 * Other software required
22 At the moment, in addition to basic VMS, you'll need two things:
23 - a C compiler: VAXC, DECC, or gcc for the VAX; DECC for the AXP
24 - a make tool: DEC's MMS or the free analog MMK (available from ftp.spc.edu)
25 or a standard make utility (e.g. GNU make, also available from
27 In addition, you may include socket support if you have a IP stack running
28 on your system. See the topic "Socket support" for more information.
32 Perl5 includes a number of IP socket routines among its builtin functions,
33 which are available if you choose to compile perl with socket support. Since
34 IP networking is an optional addition to VMS, there are several different IP
35 stacks available, it's difficult to automate the process of building perl5 with
36 socket support in a way which will work on all systems.
38 By default, perl5 is built without IP socket support. If you define the macro
39 SOCKET when invoking MMS, however, socket support will be included. As
40 distributed, perl5 for VMS includes support for the SOCKETSHR socket library,
41 which is layered on MadGoat software's vendor-independent NETLIB interface.
42 This provides support for all socket calls used by perl5 except the
43 [g|s]et*ent() routines, which are replaced for the moment by stubs which
44 generate a fatal error if a perl script attempts to call one of these routines.
45 If you'd like to link perl directly to your IP stack to take advantage of these
46 routines or to eliminate the intermediate NETLIB, then make the following
48 - In Descrip.MMS, locate the section beginning with .ifdef SOCKET, and
49 change the SOCKLIB macro so that it translates to the filespec of your
50 IP stack's socket library. This will be added to the RTL options file.
51 - Edit the file SockAdapt.H in the [.VMS] subdirectory so that it
52 includes the In.H, NetDb.H, and, if necessary, Errno.H header files
53 for your IP stack, or so that it declares the standard TCP/IP data
54 structures appropriately (see the distributed copy of SockAdapt.H
55 for a collection of the structures needed by perl.) You should also
56 define any logical names necessary to find these files before invoking
58 - Edit the file SockAdapt.C in the [.VMS] subdirectory so that it
59 contains routines which substitute for any IP library routines
60 required by perl which your IP stack does not provide. This may
61 require a little trial and error; we'll try to compile a complete
62 list soon of socket routines required by perl5.
64 * Building perl under VMS
66 Since you're reading this, presumable you've unpacked the perl distribution
67 into its directory tree, in which you will find a [.vms] subdirectory below
68 the directory in which this file is found. If this isn't the case, then you'll
69 need to unpack the distribution properly, or manually edit Descrip.MMS or
70 the VMS Makefile. to alter directory paths as necessary. (I'd advise using the
71 `normal' directory tree, at least for the first time through.) This
72 subdirectory contains several files, among which are the following:
73 Config.VMS - A template C header file set up for VMS.
74 Descrip.MMS - The MMS/MMK dependency file for building perl
75 GenConfig.Pl - A perl script to generate Config.SH retrospectively
76 from Config.VMS, since the Configure shell script which
77 normally generates Config.SH doesn't run under VMS.
78 GenOpt.Com - A little DCL procedure used to write some linker options
79 files, since not all make utilities can do this easily.
80 Gen_ShrFls.Pl - A perl script which generates linker options files and
81 MACRO declarations for PerlShr.Exe.
82 Makefile. - The make dependency file for building perl
83 MMS2Make.Pl - A perl script used to generate Makefile. from Descrip.MMS
84 VMSish.H - C header file containing VMS-specific definitions
85 VMS.C - C source code for VMS-specific routines
86 WriteMain.Pl - A perl script used to generate perlmain.c during the build.
87 There may also be other files pertaining to features under development; for the
88 most part, you can ignore them.
90 Config.VMS and Decrip.MMS/Makefile. are set up to build a version of perl which
91 includes all features known to work when this release was assembled. If you
92 have code at your site which would support additional features (e.g. emulation
93 of Unix system calls), feel free to make the appropriate changes to these
94 files. (Note: Do not use or edit config.h in the main perl source directory;
95 it is superseded by the current Config.VMS during the build.) You may also
96 wish to make site-specific changes to Descrip.MMS or Makefile. to reflect local
97 conventions for naming of files, etc.
99 At the moment, system-specific information which becomes part of the perl5
100 Config extension is hard-coded into the file genconfig.pl in the vms
101 subdirectory. Before you build perl, you should make any changes to the list
102 at the end of this file necessary to reflect your system (e.g your hostname and
105 Examine the information at the beginning of Descrip.MMS for information about
106 specifying alternate C compilers or building a version of perl with debugging
107 support. For instance, if you want to use DECC, you'll need to include the
108 /macro="decc=1" qualifier to MMS (If you're using make, these options are not
109 supported.) If you're on an AXP system, define the macro __AXP__ (MMK does
110 this for you), and DECC will automatically be selected.
112 To start the build, set default to the main source directory.
113 Then, if you are using MMS or MMK, issue the command
114 $ MMS/Descrip=[.VMS] ! or MMK
115 If you are using make, issue the command
116 $ Make -f [.VMS]Makefile.
117 Note that the Makefile. doesn't support conditional compilation, and is
118 set up to use VAXC on a VAX, and does not include socket support. You can
119 either edit the Makefile. by hand, using Descrip.MMS as a guide, or use the
120 Makefile. to build Miniperl.Exe, and then run the Perl script MMS@Make.pl,
121 found in the [.VMS] subdirectory, to generate a new Makefile with the options
122 appropriate to your site.
124 Note for sites using early versions of DECC: A bug in some versions of the
125 DECC RTL causes newlines to be lost when writing to a pipe. This causes
126 Gen_ShrFls.pl to fail, since it can't read the preprocessor output to identify
127 global variables and routines. You can work around this problem by defining
128 the macro DECC_PIPES_BROKEN when you invoke MMS or MMK.
130 This will build the following files:
131 Miniperl.Exe - a stand-alone version of without any extensions.
132 Miniperl has all the intrinsic capabilities of perl,
133 but cannot make use of the DynaLoader or any
134 extensions which use XS code.
135 PerlShr.Exe - a shareable image containing most of perl's internal
136 routines and global variables. Perl.Exe is linked to
137 this image, as are all dynamic extensions, so everyone's
138 using the same set of global variables and routines.
139 Perl.Exe - the main perl executable image. It's contains the
140 main() routine, plus code for any statically linked
142 PerlShr_Attr.Opt - A linker options file which specifies psect attributes
143 matching those in PerlShr.Exe. It should be used when
144 linking images against PerlShr.Exe
145 [.Lib]Config.pm - the perl extension which saves configuration information
146 about perl and your system.
147 [.lib]DynaLoader.pm - The perl extension which performs dynamic linking of
148 shareable images for extensions.
149 There are, of course, a number of other files created for use during the build.
150 Once you've got the binaries built, you may wish to `build' the `tidy' or
151 `clean' targets to remove extra files.
154 * Installing perl once it's built
156 Once the build is complete, you'll need to do the following:
157 - Put PerlShr.Exe in a common directory, and make it world-readable.
158 If you place it in a location other than Sys$Share, you'll need to
159 define the logical name PerlShr to point to the image.
160 - Put Perl.Exe in a common directory, and make it world executable
161 - Define a foreign command to invoke perl, using a statement like
162 $ Perl == "$dev:[dir]Perl.Exe"
163 - Create a world-readable directory tree for perl library modules,
164 scripts, and what-have-you, and define PERL_ROOT as a rooted logical
165 name pointing to the top of this tree (i.e. if your perl files were
166 going to live in DKA1:[Perl5...], then you should
167 $ Define/Translation=Concealed Perl_Root DKA1:[Perl5.]
168 - Define the logical name PERLSHR as the full file specification of
169 PERLSHR.EXE, so executable images linked to it can find it. Alternatively,
170 you can justput PERLSHR.EXE int SYS$SHARE.
171 - Place the files from the [.lib] subdirectory in the distribution package
172 into a [.lib] subdirectory off the root directory described above.
173 - Most of the perl5 documentation lives in the [.pod] subdirectory, and
174 is written in a simple markup format which can be easily read. In this
175 directory as well are pod2man and pod2html translators to reformat the
176 docs for common display engines; a pod2hlp translator is under development.
177 Information on perl5 can also be gleaned from the files in the [.doc]
178 subdirectory (internals documents and summaries of changes), and from
179 the test scripts in the [.t...] subdirectories.
183 * For more information
185 If you're interested in more information on perl in general, consult the Usenet
186 newsgroup comp.lang.perl. The FAQ for that group provides pointers to other
187 online sources of information, as well as books describing perl in depth.
189 If you're interested in up-to-date information on perl5 development and
190 internals, you might want to subscribe to the perl5-porters mailing list. You
191 can do this by sending a message to perl5-porters-request@isi.edu, containing
193 subscribe perl5-porters Your Name Here
194 This is a moderately high-volume list at the moment (25-50 messages/day).
196 Finally, if you're interested in ongoing information about the VMS port, you
197 can subscribe to the VMSperl mailing list by sending a request to
198 bailey@genetics.upenn.edu (it's to a human, not a list server - this is a small
199 operation at the moment). And, as always, we welcome any help or code you'd
200 like to offer - you can send mail to bailey@genetics.upenn.edu or directly to
201 the VMSperl list at vmsperl@genetics.upenn.edu.
203 Good luck using perl. Please let us know how it works for you - we can't
204 guarantee that we'll be able to fix bugs quickly, but we'll try, and we'd
205 certainly like to know they're out there.
210 There are, of course, far too many people involved in the porting and testing
211 of perl5 to mention everyone who deserves it, so please forgive us if we've
212 missed someone. That said, special thanks are due to the following:
213 David Denholm <denholm@conmat.phys.soton.ac.uk>
214 for extensive testing and provision of pipe and SocketShr code,
215 Mark Pizzolato <mark@infocomm.com>
216 for the getredirection() code
217 Rich Salz <rsalz@bbn.com>
218 for readdir() and related routines
219 Denis Haskin <DWH@epub.ziff.com>
220 for work on a pod-to-hlp translator for the perl5 documentation
221 Richard Dyson <dyson@blaze.physics.uiowa.edu> and
222 Kent Covert <kacovert@miavx1.acs.muohio.edu>
223 for additional testing on the AXP.
224 and to the entire VMSperl group for useful advice and suggestions. In addition
225 the perl5-porters, especially Andy Dougherty <doughera@lafcol.lafayette.edu>
226 and Tim Bunce <Tim.Bunce@ig.co.uk>, deserve credit for their creativity and
227 willingness to work with the VMS newcomers. Finally, the greatest debt of
228 gratitude is due to Larry Wall <lwall@netlabs.com>, for having the ideas which
229 have made our sleepless nights possible.