This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
5.004_58, move intuition tests
[perl5.git] / README.vms
CommitLineData
fb73857a 1Last Revised 11-September-1997 by Dan Sugalski <sugalsd@lbcc.cc.or.us>
2Originally by Charles Bailey <bailey@newman.upenn.edu>
3
4* Intro
5
6The VMS port of Perl is as functionally complete as any other Perl port
7(and as complete as the ports on some Unix systems). The Perl binaries
8provide all the Perl system calls that are either available under VMS or
9reasonably emulated. There are some incompatibilites in process handling
10(e.g the fork/exec model for creating subprocesses doesn't do what you
11might expect under Unix), mainly because VMS and Unix handle processes and
12sub-processes very differently.
13
14There are still some unimplemented system functions, and of coursse we
15could use modules implementing useful VMS system services, so if you'd like
16to lend a hand we'd love to have you. Join the Perl Porting Team Now!
17
18The current sources and build procedures have been tested on a VAX using
19VaxC and Dec C, and on an AXP using Dec C. If you run into problems with
20other compilers, please let us know.
21
22There are issues with varions versions of Dec C, so if you're not running a
23relatively modern version, check the Dec C issues section later on in this
24document.
25
26* Other required software
27
28In addition to VMS, you'll need:
29 1) A C compiler. Dec C for AXP, or VAX C, Dec C, or gcc for the
30 VAX.
31 2) A make tool. Dec's MMS (v2.6 or later), or MadGoat's free MMS
32 analog MMK (available from ftp.madgoat.com/madgoat) both work
33 just fine. Gnu Make might work, but it's been so long since
34 anyone's tested it that we're not sure. MMK's free, though, so
35 go ahead and use that.
36
37
38If you want to include socket support, you'll need a TCP stack and either
39Dec C, or socket libraries. See the Socket Support topic for more details.
40
41* Compiling Perl
42
43>From the top level of the Perl source directory, do this:
44
45MMS/DESCRIP=[.VMS]DESCRIP.MMS
46
47If you're on an Alpha, add /Macro=("__AXP__=1","decc=1")
48If you're using Dec C as your C compiler (you are on all alphas), add
49/Macro=("decc=1")
50If Vac C is your default C compiler and you want to use Dec C, add
51/Macro=("CC=CC/DECC") (Don't forget the /macro=("decc=1")
52If Dec C is your default C compiler and you want to use Vax C, add
53/Macro=("CC=CC/VAXC")
54If you want Socket support and are using the SOCKETSHR socket library, add
55/Macro=("SOCKETSHR_SOCKETS=1")
56If you want Socket support and are using the Dec C RTL socket interface
57(You must be using Dec C for this), add /Macro=("DECC_SOCKETS=1")
58
59If you have multiple /macro= items, combine them together in one /Macro=()
60switch, with all the options inside the parentheses separated by commas.
61
62Samples:
63
64VMS AXP, with Socketshr sockets:
65
66$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("decc=1","__AXP__=1","SOCKETSHR_SOCKETS=1")
67
68VMS AXP with no sockets
69
70$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("decc=1","__AXP__=1")
71
72VMS AXP with the Dec C RTL sockets
73
74$MMS/DESCRIP=[.VMS]/Macro=("decc=1","__AXP__=1","DECC_SOCKETS=1")
75
76VMS VAX with default system compiler, no sockets
77
78$MMS/DESCRIP=[.VMS]DESCRIP.MMS
79
80VMS VAX with Dec C compiler, no sockets
81
82$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("CC=CC/DECC","decc=1")
83
84VMS VAX with Dec C compiler, Dec C RTL sockets
85
86$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("CC=CC/DECC","decc=1","DECC_SOCKETS=1")
87
88VMS VAX with Dec C compiler, Socketshr sockets
89
90$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("CC=CC/DECC","decc=1","SOCKETSHR_SOCKETS=1")
91
92Using Dec C is recommended over Vax C. The compiler is newer, and
93supported. (Vax C was decommisioned around 1993) Various older versions had
94some gotchas, so if you're using a version older than 5.2, check the Dec C
95Issues section.
96
97We'll also point out that Dec C will get you at least a ten-fold increase
98in line-oriented IO over Vax C. The optimizer is amazingly better, too. If
99you can use Dec C, then you *really*, *really* should.
100
101
102Once you issue your MMS command, sit back and wait. Perl should build and
103link without a problem. If it doesn't, check the Gotchas to watch out for
104section. If that doesn't help, send some mail to the VMSPERL mailing list.
105Instructions are in the Mailing Lists section.
106
107* Testing Perl
108
109Once Perl has built cleanly, you need to test it to make sure things work.
110This step is very important--there are always things that can go wrong
111somehow and get you a dysfunctional Perl.
112
113Testing is very easy, though, as there's a full test suite in the perl
114distribution. To run the tests, enter the *exact* MMS line you used to
115compile Perl and add the word "test" to the end, like this:
116
117Compile Command:
118
119$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1")
120
121Test Command:
122
123$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1") test
124
125MMS will run all the tests. This may take some time, as there are a lot of
126tests. If any tests fail, there will be a note made on-screen. At the end
127of all the tests, a summary of the tests, the number passed and failed, and
128the time taken will be displayed.
129
130If any tests fail, it means something's wrong with Perl. If the test suite
131hangs (some tests can take upwards of two or three minutes, or more if
132you're on an especially slow machine, depending on you machine speed, so
133don't be hasty), then the test *after* the last one displayed failed. Don't
134install Perl unless you're confident that you're OK. Regardless of how
135confident you are, make a bug report to the VMSPerl mailing list.
136
137If one or more tests fail, you can get more info on the failure by issuing
138this command sequence:
139
140$ SET DEFAULT [.T]
141$ @[-.VMS]TEST .typ -v [.subdir]test.T
142
143where ".typ" is the file type of the Perl images you just built (if you
144didn't do anything special, use .EXE), and "[.subdir]test.T" is the test
145that failed. For example, with a normal Perl build, if the test indicated
146that [.op]time failed, then you'd do this:
147
148$ SET DEFAULT [.T]
149$ @[-.VMS]TEST .EXE -v [.OP]TIME.T
150
151When you send in a bug report for failed tests, please include the output
152from this command, which is run from the main source directory:
153
154MCR []MINIPERL "-V"
155
156Note that "-V" really is a capital V in double quotes. This will dump out a
157couple of screens worth of config info, and can help us diagnose the problem.
158
159* Cleaning up and starting fresh
160
161If you need to recompile from scratch, you have to make sure you clean up
162first. There's a procedure to do it--enter the *exact* MMS line you used to
163compile and add "realclean" at the end, like this:
164
165Compile Command:
166
167$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1")
168
169Cleanup Command:
170
171$MMS/DESCRIP=[.VMS]DESCRIP.MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1") realclean
172
173If you don't do this, things may behave erratically. They might not, too,
174so it's best to be sure and do it.
175
176* Installing Perl
177
178There are several steps you need to take to get Perl installed and
179running. At some point we'll have a working install in DESCRIP.MMS, but for
180right now the procedure's manual, and goes like this.
181
1821) Create a directory somewhere and define the concealed logical PERL_ROOT
183to point to it. For example, DEFINE/TRANS=(CONC,TERM) PERL_ROOT dka200:[perl.]
184
1852) Copy perl.exe into PERL_ROOT:[000000]
186
1873) Copy everything in [.LIB] and [.UTILS] (including all the
188subdirectories!) to PERL_ROOT:[LIB] and PERL_ROOT:[UTILS].
189
1904) Either copy PERLSHR.EXE to SYS$SHARE, or to somewhere globally accessble
191and define the logical PERLSHR to point to it (DEFINE PERLSHR
192PERL_ROOT:[000000]PERLSHR.EXE or something like that). The PerlShr image
193should have W:RE protections on it. (Just W:E triggers increased security in
194the image activator. Not a huge problem, but Perl will need to have any
195other shared image it accesses INSTALLed. It's a huge pain, so don't unless
196you know what you're doing)
197
1985) Either define the symbol PERL somewhere, such as
199SYS$MANAGER:SYLOGIN.COM, to be "PERL :== $PERL_ROOT:[000000]PERL.EXE", or
200install Perl into DCLTABLES.EXE )Check out the section "Installing Perl
201into DCLTABLES" for more info), or put the image in a directory that's in
202your DCL$PATH (if you're using VMS 6.2 or higher).
203
2046) Optionally define the command PERLDOC as
205PERLDOC :== $PERL_ROOT:[000000]PERL PERL_ROOT:[LIB.POD]PERLDOC.COM -T
206
2077) Optionally define the command PERLBUG (the Perl bug report generator) as
208PERLBUG :== $PERL_ROOT:[000000]PERL PERL_ROOT:[LIB]PERLBUG.COM"
209
210* Installing Perl into DCLTABLES
211
212Courtesy of Brad Hughes:
213
214Put the following, modified to reflect where your .exe is, in PERL.CLD:
215
216define verb perl
217image perl_root:[exe]perl.exe
218cliflags (foreign)
219
220and then
221
222$ set command perl /table=sys$common:[syslib]dcltables.exe -
223 /output=sys$common:[syslib]dcltables.exe
224$ install replace sys$common:[syslib]dcltables.exe
225
226and you don't need perl :== $perl_root:[exe]perl.exe.
227
228* Changing compile-time things
229
230Most of the user-definable features of Perl are enabled or disabled in
231[.VMS]CONFIG.VMS. There's code in there to Do The Right Thing, but that may
232end up being the wrong thing for you. Make sure you understand what you're
233doing, since changes here can get you a busted perl.
234
235Odds are that there's nothing here to change, unless you're on a version of
236VMS later than 6.2 and Dec C later than 5.6. Even if you are, the correct
237values will still be chosen, most likely. Poking around here should be
238unnecessary.
239
240The one exception is the various *DIR install locations. Changing those
241requires changes in genconfig.pl as well. Be really careful if you need to
242change these,a s they can cause some fairly subtle problems.
243
244* Extra things in the Perl distribution
245
246In addition to the standard stuff that gets installed, there are two
247optional extensions, DCLSYM and STDIO, that are handy. Instructions for
248these two modules are in [.VMS.EXT.DCLSYM] and [.VMS.EXT.STDIO],
249respectively.
250
251* Socket Support
252
253Perl includes a number of functions for IP sockets, which are available if
254you choose to compile Perl with socket support. (See the section Compiling
255Perl for more info on selecting a socket stack) Since IP networking is an
256optional addition to VMS, there are several different IP stacks
257available. How well integrated they are into the system depends on the
258stack, your version of VMS, and the version of your C compiler.
259
260The most portable solution uses the SOCKETSHR library. In combination with
261either UCX or NetLib, this supports all the major TCP stacks (Multinet,
262Pathways, TCPWare, UCX, and CMU) on all versions of VMS Perl runs on, with
263all the compilers on both VAX and Alpha. The socket interface is also
264consistent across versions of VMS and C compilers. It has a problem with
265UDP sockets when used with Multinet, though, so you should be aware of
266that.
267
268The other solution available is to use the socket routines built into Dec
269C. Which routines are available depend on the version of VMS you're
270running, and require proper UCX emulation by your TCP/IP vendor.
271Relatively current versions of Multinet, TCPWare, Pathway, and UCX all
272provide the required libraries--check your manuals or release notes to see
273if your version is new enough.
274
275* Reporting Bugs
276
277If you come across what you think might be a bug in Perl, please report
278it. There's a script in PERL_ROOT:[UTILS], perlbug, that walks you through
279the process of creating a bug report. This script includes details of your
280installation, and is very handy. Completed bug reports should go to
281PERLBUG@PERL.COM.
282
283* Gotchas to watch out for
284
285Probably the single biggest gotcha in compiling Perl is giving the wrong
286switches to MMS/MMK when you build. If Perl's building oddly, double-check
287your switches. If you're on a VAX, be sure to add a /Macro=("decc=1") if
288you're using Dec C, and if you're on an alpha and using MMS, you'll need a
289/Macro=("__AXP__=1")
290
291The next big gotcha is directory depth. Perl can create directories four
292and five levels deep during the build, so you don't have to be too deep to
293start to hit the RMS 8 level point. It's best to do a
294$DEFINE/TRANS=(CONC,TERM) PERLSRC disk:[dir.dir.dir.perldir.]" (note the
295trailing period) and $SET DEFAULT PERLSRC:[000000] before building. Perl
296modules can be just as bad (or worse), so watch out for them, too.
297
298Finally, the third thing that bites people is leftover pieces from a failed
299build. If things go wrong, make sure you do a "(MMK|MMS|make) realclean"
300before you rebuild.
301
302* Dec C issues
303
304Note to DECC users: Some early versions (pre-5.2, some pre-4. If you're Dec
305C 5.x or higher, with current patches if anym you're fine) of the DECCRTL
306contained a few bugs which affect Perl performance:
307 - Newlines are lost on I/O through pipes, causing lines to run together.
308 This shows up as RMS RTB errors when reading from a pipe. You can
309 work around this by having one process write data to a file, and
310 then having the other read the file, instead of the pipe. This is
311 fixed in version 4 of DECC.
312 - The modf() routine returns a non-integral value for some values above
313 INT_MAX; the Perl "int" operator will return a non-integral value in
314 these cases. This is fixed in version 4 of DECC.
315 - On the AXP, if SYSNAM privilege is enabled, the CRTL chdir() routine
316 changes the process default device and directory permanently, even
317 though the call specified that the change should not persist after
318 Perl exited. This is fixed by DEC CSC patch AXPACRT04_061.
319
320* Mailing Lists
321
322There are several mailing lists available to the Perl porter. For VMS
323specific issues (including both Perl questions and installation problems)
324there is the VMSPERL mailing list. It's usually a low-volume (10-12
325messages a week) mailing list.
326
327The subscription address is VMSPERL-REQUEST@NEWMAN.UPENN.EDU. Send a mail
328message with just the words SUBSCRIBE VMSPERL in the body of the message.
329
330The VMSPERL mailing list address is VMSPERL@NEWMAN.UPENN.EDU. Any mail
331sent there gets echoed to all subscribers of the list.
332
333The Perl5-Porters list is for anyone involved in porting Perl to a
334platform. This includes you, if you want to participate. It's a high-volume
335list (60-100 messages a day during active development times), so be sure
336you want to be there. The subscription address is
337Perl5-Porters-request@perl.org. Send a message with just the word SUBSCRIBE
338in the body. The posting address is Perl5-Porters@perl.org.
339
340* Acknowledgements
341
342A real big thanks needs to go to Charles Bailey
343<bailey@newman.upenn.edu>, who is ultimately responsible for Perl 5.004
344running on VMS. Without him, nothing the rest of us have done would be at
345all important.
346
347There are, of course, far too many people involved in the porting and testing
348of Perl to mention everyone who deserves it, so please forgive us if we've
349missed someone. That said, special thanks are due to the following:
350 Tim Adye <T.J.Adye@rl.ac.uk>
351 for the VMS emulations of getpw*()
352 David Denholm <denholm@conmat.phys.soton.ac.uk>
353 for extensive testing and provision of pipe and SocketShr code,
354 Mark Pizzolato <mark@infocomm.com>
355 for the getredirection() code
356 Rich Salz <rsalz@bbn.com>
357 for readdir() and related routines
358 Peter Prymmer <pvhp@lns62.lns.cornell.edu)
359 for extensive testing, as well as development work on
360 configuration and documentation for VMS Perl,
361 Dan Sugalski <sugalsd@stargate.lbcc.cc.or.us>
362 for extensive contributions to recent version support,
363 development of VMS-specific extensions, and dissemination
364 of information about VMS Perl,
365 the Stanford Synchrotron Radiation Laboratory and the
366 Laboratory of Nuclear Studies at Cornell University for
367 the the opportunity to test and develop for the AXP,
368and to the entire VMSperl group for useful advice and suggestions. In
369addition the perl5-porters deserve credit for their creativity and
370willingness to work with the VMS newcomers. Finally, the greatest debt of
371gratitude is due to Larry Wall <larry@wall.org>, for having the ideas which
372have made our sleepless nights possible.
373
374Thanks,
375The VMSperl group
376
377
378---------------------------------------------------------------------------
379[Here's the pre-5.004_04 version of README.vms, for the record.]
380
c07a80fd 381Last revised: 19-Jan-1996 by Charles Bailey bailey@genetics.upenn.edu
a0d0e21e 382
748a9306 383The VMS port of Perl is still under development. At this time, the Perl
a0d0e21e
LW
384binaries built under VMS handle internal operations properly, for the most
385part, as well as most of the system calls which have close equivalents under
386VMS. There are still some incompatibilities in process handling (e.g the
387fork/exec model for creating subprocesses doesn't do what you might expect
748a9306
LW
388under Unix), and there remain some file handling differences from Unix. Over
389the longer term, we'll try to get many of the useful VMS system services
390integrated as well, depending on time and people available. Of course, if
391you'd like to add something yourself, or join the porting team, we'd love to
392have you!
a0d0e21e
LW
393
394The current sources and build procedures have been tested on a VAX using VAXC
c07a80fd 395and DECC, and on an AXP using DECC. If you run into problems with other
396compilers, please let us know.
a0d0e21e 397
748a9306
LW
398Note to DECC users: Some early versions of the DECCRTL contained a few bugs
399which affect Perl performance:
400 - Newlines are lost on I/O through pipes, causing lines to run together.
401 This shows up as RMS RTB errors when reading from a pipe. You can
402 work around this by having one process write data to a file, and
4633a7c4
LW
403 then having the other read the file, instead of the pipe. This is
404 fixed in version 4 of DECC.
748a9306
LW
405 - The modf() routine returns a non-integral value for some values above
406 INT_MAX; the Perl "int" operator will return a non-integral value in
4633a7c4
LW
407 these cases. This is fixed in version 4 of DECC.
408 - On the AXP, if SYSNAM privilege is enabled, the CRTL chdir() routine
409 changes the process default device and directory permanently, even
410 though the call specified that the change should not persist after
411 Perl exited. This is fixed by DEC CSC patch AXPACRT04_061.
a0d0e21e
LW
412
413* Other software required
414
415At the moment, in addition to basic VMS, you'll need two things:
416 - a C compiler: VAXC, DECC, or gcc for the VAX; DECC for the AXP
eacfb5f1 417 - a make tool: DEC's MMS (version 2.6 or later) or the free analog MMK
418 (available from ftp.spc.edu), or a standard make utility (e.g. GNU make,
419 also available from ftp.spc.edu).
420In addition, you may include socket support if you have an IP stack running
a0d0e21e
LW
421on your system. See the topic "Socket support" for more information.
422
423* Socket support
424
748a9306
LW
425Perl includes a number of IP socket routines among its builtin functions,
426which are available if you choose to compile Perl with socket support. Since
a0d0e21e 427IP networking is an optional addition to VMS, there are several different IP
eacfb5f1 428stacks available, so it's difficult to automate the process of building Perl
429with socket support in a way which will work on all systems.
a0d0e21e 430
748a9306 431By default, Perl is built without IP socket support. If you define the macro
c07a80fd 432SOCKET when invoking MMK, however, socket support will be included. As
748a9306 433distributed, Perl for VMS includes support for the SOCKETSHR socket library,
a0d0e21e 434which is layered on MadGoat software's vendor-independent NETLIB interface.
748a9306 435This provides support for all socket calls used by Perl except the
4633a7c4 436[g|s]etnet*() routines, which are replaced for the moment by stubs which
748a9306 437generate a fatal error if a Perl script attempts to call one of these routines.
eacfb5f1 438Both SOCKETSHR and NETLIB are available from MadGoat ftp sites, such as
439ftp.spc.edu or ftp.wku.edu.
440
4633a7c4
LW
441You can link Perl directly to your TCP/IP stack's library, *as long as* it
442supplies shims for stdio routines which will properly handle both sockets and
443normal file descriptors. This is necessary because Perl does not distinguish
444between the two, and will try to make normal stdio calls such as read() and
445getc() on socket file descriptors. If you'd like to link Perl directly to
446your IP stack, then make the following changes:
a0d0e21e
LW
447 - In Descrip.MMS, locate the section beginning with .ifdef SOCKET, and
448 change the SOCKLIB macro so that it translates to the filespec of your
449 IP stack's socket library. This will be added to the RTL options file.
450 - Edit the file SockAdapt.H in the [.VMS] subdirectory so that it
eacfb5f1 451 includes the Socket.H, In.H, Inet.H, NetDb.H, and, if necessary,
4633a7c4
LW
452 Errno.H header files for your IP stack, or so that it declares the
453 standard TCP/IP constants and data structures appropriately. (See
454 the distributed copy of SockAdapt.H for a collection of the structures
455 needed by Perl itself, and [.ext.Socket]Socket.xs for a list of the
456 constants used by the Socket extension, if you elect to built it.)
457 You should also define any logical names necessary for your C compiler
458 to find these files before invoking MM[KS] to build Perl.
a0d0e21e
LW
459 - Edit the file SockAdapt.C in the [.VMS] subdirectory so that it
460 contains routines which substitute for any IP library routines
748a9306 461 required by Perl which your IP stack does not provide. This may
a0d0e21e 462 require a little trial and error; we'll try to compile a complete
748a9306 463 list soon of socket routines required by Perl.
a0d0e21e 464
4633a7c4 465
748a9306 466* Building Perl under VMS
a0d0e21e 467
748a9306 468Since you're reading this, presumably you've unpacked the Perl distribution
a0d0e21e
LW
469into its directory tree, in which you will find a [.vms] subdirectory below
470the directory in which this file is found. If this isn't the case, then you'll
471need to unpack the distribution properly, or manually edit Descrip.MMS or
748a9306 472the VMS Makefile to alter directory paths as necessary. (I'd advise using the
a0d0e21e
LW
473`normal' directory tree, at least for the first time through.) This
474subdirectory contains several files, among which are the following:
eacfb5f1 475 Config.VMS - A template Config.H set up for VMS.
748a9306
LW
476 Descrip.MMS - The MMS/MMK dependency file for building Perl
477 GenConfig.Pl - A Perl script to generate Config.SH retrospectively
a0d0e21e
LW
478 from Config.VMS, since the Configure shell script which
479 normally generates Config.SH doesn't run under VMS.
480 GenOpt.Com - A little DCL procedure used to write some linker options
481 files, since not all make utilities can do this easily.
748a9306 482 Gen_ShrFls.Pl - A Perl script which generates linker options files and
a0d0e21e 483 MACRO declarations for PerlShr.Exe.
eacfb5f1 484 Makefile - The make dependency file for building Perl
748a9306 485 MMS2Make.Pl - A Perl script used to generate Makefile from Descrip.MMS
eacfb5f1 486 PerlVMS.pod - Documentation for VMS-specific behavior of Perl
487 Perly_[CH].VMS - Versions of the byacc output from Perl's grammar,
488 modified to include VMS-specific C compiler options
489 SockAdapt.[CH] - C source code used to integrate VMS TCP/IP support
490 Test.Com - DCL driver for Perl regression tests
a0d0e21e
LW
491 VMSish.H - C header file containing VMS-specific definitions
492 VMS.C - C source code for VMS-specific routines
eacfb5f1 493 VMS_Yfix.Pl - Perl script to convert Perly.[CH] to Perly_[CH].VMS
494 WriteMain.Pl - Perl script to generate Perlmain.C
495The [.Ext...] directories contain VMS-specific extensions distributed with
496Perl. There may also be other files in [.VMS...] pertaining to features under
c07a80fd 497development; for the most part, you can ignore them. Note that packages in
498[.ext.*] are not built with Perl by default; you build the ones you want
499once the basic Perl build is complete (see the perlvms docs for instructions
500on building extensions.)
a0d0e21e 501
748a9306 502Config.VMS and Decrip.MMS/Makefile are set up to build a version of Perl which
a0d0e21e
LW
503includes all features known to work when this release was assembled. If you
504have code at your site which would support additional features (e.g. emulation
505of Unix system calls), feel free to make the appropriate changes to these
748a9306 506files. (Note: Do not use or edit config.h in the main Perl source directory;
a0d0e21e 507it is superseded by the current Config.VMS during the build.) You may also
748a9306 508wish to make site-specific changes to Descrip.MMS or Makefile to reflect local
a0d0e21e
LW
509conventions for naming of files, etc.
510
eacfb5f1 511There are several pieces of system-specific information which become part of
512the Perl Config extension. Under VMS, the data for Config are generated by the
513script GenConfig.Pl in the [.VMS] subdirectory. It tries to ascertain the
514necessary information from various files, or from the system itself, and
515generally does the right thing. There is a list of hard-coded values at the
516end of this script which specifies items that are correct for most VMS systems,
517but may be incorrect for you, if your site is set up in an unusual fashion. If
518you're familiar with Perl's Config extension, feel free to edit these values as
519necessary. If this doesn't mean much to you, don't worry -- the information is
520probably correct, and even if it's not, none of these parameters affect your
521ability to build or run Perl. You'll only get the wrong answer if you ask for
522it specifically from Config.
a0d0e21e
LW
523
524Examine the information at the beginning of Descrip.MMS for information about
748a9306 525specifying alternate C compilers or building a version of Perl with debugging
a0d0e21e 526support. For instance, if you want to use DECC, you'll need to include the
c07a80fd 527/macro="decc=1" qualifier to MMK (If you're using make, these options are not
a0d0e21e
LW
528supported.) If you're on an AXP system, define the macro __AXP__ (MMK does
529this for you), and DECC will automatically be selected.
530
748a9306
LW
531To start the build, set default to the main source directory. Since
532Descrip.MMS assumes that VMS commands have their usual meaning, and makes use
533of command-line macros, you may want to be certain that you haven't defined DCL
534symbols which would interfere with the build. Then, if you are using MMS or
535MMK, say
a0d0e21e 536$ MMS/Descrip=[.VMS] ! or MMK
eacfb5f1 537(N.B. If you are using MMS, you must use version 2.6 or later; a bug in
538earlier versions produces malformed cc command lines.) If you are using a
539version of make, say
748a9306
LW
540$ Make -f [.VMS]Makefile
541Note that the Makefile doesn't support conditional compilation, is
a0d0e21e 542set up to use VAXC on a VAX, and does not include socket support. You can
748a9306
LW
543either edit the Makefile by hand, using Descrip.MMS as a guide, or use the
544Makefile to build Miniperl.Exe, and then run the Perl script MMS2Make.pl,
a0d0e21e 545found in the [.VMS] subdirectory, to generate a new Makefile with the options
2114d1da 546appropriate to your site.
547
548If you are using MM[SK], and you decide to rebuild Perl with a different set
549of parameters (e.g. changing the C compiler, or adding socket support), be
550sure to say
c07a80fd 551$ MMK/Descrip=[.VMS] realclean
552first, in order to remove files generated during the previous build. If
553you omit this step, you risk ending up with a copy of Perl which
554composed partially of old files and partially of new ones, which may lead
555to strange effects when you try to run Perl.
a0d0e21e 556
a5f75d66
AD
557A bug in some early versions of the DECC RTL on the AXP causes newlines
558to be lost when writing to a pipe. A different bug in some patched versions
559of DECC 4.0 for VAX can also scramble preprocessor output. Finally, gcc 2.7.2
560has yet another preprocessor bug, which causes line breaks to be inserted
561into the output at inopportune times. Each of these bugs causes Gen_ShrFls.pl
562to fail, since it can't parse the preprocessor output to identify global
563variables and routines. This problem is generally manifested as missing
564global symbols when linking PerlShr.Exe or Perl.Exe. You can work around
565it by defining the macro PIPES_BROKEN when you invoke MMS or MMK.
566
a0d0e21e
LW
567
568This will build the following files:
569 Miniperl.Exe - a stand-alone version of without any extensions.
748a9306 570 Miniperl has all the intrinsic capabilities of Perl,
a0d0e21e
LW
571 but cannot make use of the DynaLoader or any
572 extensions which use XS code.
748a9306 573 PerlShr.Exe - a shareable image containing most of Perl's internal
a0d0e21e
LW
574 routines and global variables. Perl.Exe is linked to
575 this image, as are all dynamic extensions, so everyone's
576 using the same set of global variables and routines.
748a9306 577 Perl.Exe - the main Perl executable image. It's contains the
a0d0e21e
LW
578 main() routine, plus code for any statically linked
579 extensions.
580 PerlShr_Attr.Opt - A linker options file which specifies psect attributes
581 matching those in PerlShr.Exe. It should be used when
582 linking images against PerlShr.Exe
748a9306
LW
583 PerlShr_Bld.Opt - A linker options file which specifies various things
584 used to build PerlShr.Exe. It should be used when
585 rebuilding PerlShr.Exe via MakeMaker-produced
586 Descrip.MMS files for static extensions.
c07a80fd 587 c2ph - Perl program which generates template code to access
588 C struct members from Perl.
589 h2ph - Perl program which generates template code to access
590 #defined constants in a C header file from Perl,
591 using the "old-style" interface. (Largely supplanted
592 by h2xs.)
593 h2xs - Perl program which generates template files for creating
594 XSUB extensions, optionally beginning with the #defined
595 constants in a C header file.
2114d1da 596 [.lib.pod]perldoc - A Perl program which locates and displays documentation
c07a80fd 597 for Perl and its extensions.
748a9306
LW
598 [.Lib]Config.pm - the Perl extension which saves configuration information
599 about Perl and your system.
eacfb5f1 600 [.Lib]DynaLoader.pm - The Perl extension which performs dynamic linking of
a0d0e21e 601 shareable images for extensions.
eacfb5f1 602 Several subdirectories under [.Lib] containing preprocessed files or
603 site-specific files.
a0d0e21e
LW
604There are, of course, a number of other files created for use during the build.
605Once you've got the binaries built, you may wish to `build' the `tidy' or
606`clean' targets to remove extra files.
607
c07a80fd 608If you run into problems during the build, you can get help from the VMSPerl
609or perl5-porters mailing lists (see below). When you report the problem,
610please include the following information:
611 - The version of Perl you're trying to build. Please include any
612 "letter" patchlevel, in addition to the version number. If the
613 build successfully created Miniperl.Exe, you can check this by
614 saying '$ MCR Sys$Disk:[]Miniperl -v'. Also, please mention
615 where you obtained the distribution kit; in particular, note
616 whether you were using a basic Perl kit or the VMS test kit
617 (see below).
618 - The exact command you issued to build Perl.
619 - A copy of all error messages which were generated during the build.
620 Please include enough of the build log to establish the context of
621 the error messages.
622 - A summary of your configuration. If the build progressed far enough
623 to generate Miniperl.Exe and [.Lib]Config.pm, you can obtain this
624 by saying '$ MCR Sys$Disk:[]Miniperl "-V"' (note the "" around -V).
625 If not, then you can say '$ MMK/Descrip=[.VMS] printconfig' to
626 produce the summary.
627This may sound like a lot of information to send, but it'll often make
628it easier for someone to spot the problem, instead of having to give
629a spectrum of possibilities.
630
631
a0d0e21e 632
748a9306 633* Installing Perl once it's built
a0d0e21e
LW
634
635Once the build is complete, you'll need to do the following:
636 - Put PerlShr.Exe in a common directory, and make it world-readable.
637 If you place it in a location other than Sys$Share, you'll need to
2114d1da 638 define the logical name PerlShr to point to the image. (If you're
639 installing on a VMScluster, be sure that each node is using the
640 copy of PerlShr you expect [e.g. if you put PerlShr.Exe in Sys$Share,
641 do they all share Sys$Share?]).
eacfb5f1 642 - Put Perl.Exe in a common directory, and make it world-executable.
748a9306 643 - Define a foreign command to invoke Perl, using a statement like
a0d0e21e 644 $ Perl == "$dev:[dir]Perl.Exe"
748a9306 645 - Create a world-readable directory tree for Perl library modules,
a0d0e21e 646 scripts, and what-have-you, and define PERL_ROOT as a rooted logical
748a9306
LW
647 name pointing to the top of this tree (i.e. if your Perl files were
648 going to live in DKA1:[Util.Perl5...], then you should
649 $ Define/Translation=Concealed Perl_Root DKA1:[Util.Perl5.]
650 (Be careful to follow the rules for rooted logical names; in particular,
651 remember that a rooted logical name cannot have as its device portion
652 another rooted logical name - you've got to supply the actual device name
653 and directory path to the root directory.)
4633a7c4
LW
654 - Place the files from the [.lib...] directory tree in the distribution
655 package into a [.lib...] directory tree off the root directory described
656 above.
748a9306 657 - Most of the Perl documentation lives in the [.pod] subdirectory, and
a0d0e21e
LW
658 is written in a simple markup format which can be easily read. In this
659 directory as well are pod2man and pod2html translators to reformat the
660 docs for common display engines; a pod2hlp translator is under development.
c07a80fd 661 These files are copied to [.lib.pod] during the installation.
662 - Define a foreign command to execute perldoc, such as
663 $ Perldoc == "''Perl' Perl_Root:[lib.pod]Perldoc -t"
664 This will allow users to retrieve documentation using Perldoc. For
665 more details, say "perldoc perldoc".
eacfb5f1 666That's it.
a0d0e21e 667
c07a80fd 668If you run into a bug in Perl, please submit a bug report. The PerlBug
669program, found in the [.lib] directory, will walk you through the process
670of assembling the necessary information into a bug report, and sending
671of to the Perl bug reporting address, perlbug@perl.com.
a0d0e21e
LW
672
673* For more information
674
740ce14c 675If you're interested in more information on Perl in general, you may wish to
676consult the Usenet newsgroups comp.lang.perl.announce and comp.lang.perl.misc.
677The FAQ for these groups provides pointers to other online sources of
678information, as well as books describing Perl in depth.
a0d0e21e 679
748a9306 680If you're interested in up-to-date information on Perl development and
a0d0e21e 681internals, you might want to subscribe to the perl5-porters mailing list. You
748a9306 682can do this by sending a message to perl5-porters-request@nicoh.com, containing
a0d0e21e 683the single line
16d20bd9 684subscribe perl5-porters
2114d1da 685This is a high-volume list at the moment (>50 messages/day).
a0d0e21e 686
4633a7c4 687If you're interested in ongoing information about the VMS port, you can
740ce14c 688subscribe to the VMSPerl mailing list by sending a request to
689vmsperl-request@genetics.upenn.edu, containing the single line
690subscribe VMSPerl
691as the body of the message. And, as always, we welcome any help or code you'd
a0d0e21e 692like to offer - you can send mail to bailey@genetics.upenn.edu or directly to
740ce14c 693the VMSPerl list at vmsperl@genetics.upenn.edu.
a0d0e21e 694
4633a7c4
LW
695Finally, if you'd like to try out the latest changes to VMS Perl, you can
696retrieve a test distribution kit by anonymous ftp from genetics.upenn.edu, in
697the file [.perl5]perl5_ppp_yymmddx.zip, where "ppp" is the current Perl
698patchlevel, and "yymmddx" is a sequence number indicating the date that
eacfb5f1 699particular kit was assembled. In order to make retrieval convenient, this
700kit is also available by the name Perl5_VMSTest.Zip. These test kits contain
701"unofficial" patches from the perl5-porters group, test patches for important
702bugs, and VMS-specific fixes and improvements which have occurred since the
703last Perl release. Most of these changes will be incorporated in the next
704release of Perl, but until Larry Wall's looked at them and said they're OK,
705none of them should be considered official.
4633a7c4 706
748a9306 707Good luck using Perl. Please let us know how it works for you - we can't
a0d0e21e
LW
708guarantee that we'll be able to fix bugs quickly, but we'll try, and we'd
709certainly like to know they're out there.
710
711
712* Acknowledgements
713
714There are, of course, far too many people involved in the porting and testing
748a9306 715of Perl to mention everyone who deserves it, so please forgive us if we've
a0d0e21e 716missed someone. That said, special thanks are due to the following:
748a9306
LW
717 Tim Adye <T.J.Adye@rl.ac.uk>
718 for the VMS emulations of getpw*()
a0d0e21e
LW
719 David Denholm <denholm@conmat.phys.soton.ac.uk>
720 for extensive testing and provision of pipe and SocketShr code,
721 Mark Pizzolato <mark@infocomm.com>
722 for the getredirection() code
723 Rich Salz <rsalz@bbn.com>
724 for readdir() and related routines
740ce14c 725 Peter Prymmer <pvhp@lns62.lns.cornell.edu)
726 for extensive testing, as well as development work on
727 configuration and documentation for VMS Perl,
728 the Stanford Synchrotron Radiation Laboratory and the
729 Laboratory of Nuclear Studies at Cornell University for
730 the the opportunity to test and develop for the AXP,
a0d0e21e
LW
731and to the entire VMSperl group for useful advice and suggestions. In addition
732the perl5-porters, especially Andy Dougherty <doughera@lafcol.lafayette.edu>
733and Tim Bunce <Tim.Bunce@ig.co.uk>, deserve credit for their creativity and
734willingness to work with the VMS newcomers. Finally, the greatest debt of
740ce14c 735gratitude is due to Larry Wall <larry@wall.org>, for having the ideas which
a0d0e21e
LW
736have made our sleepless nights possible.
737
738Thanks,
739The VMSperl group