This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Class::Struct has an incomplete tied array package
[perl5.git] / README.vms
CommitLineData
3bf5f72b 1Last Revised 21-July-1998 by Dan Sugalski <sugalskd@ous.edu>
fb73857a 2Originally by Charles Bailey <bailey@newman.upenn.edu>
3
97abc6ad
HM
4* Important safety tip
5
3a385817
GS
6The build and install procedures have changed significantly from the 5.004
7releases! Make sure you read the "Building Perl" and "Installing Perl"
8sections before you build or install.
97abc6ad 9
3bf5f72b
GS
10Also note that, as of 5.005, an ANSI C compliant compiler is required to
11build Perl. Vax C is *not* ANSI compliant, as it died a natural death some
12time before the standard was set. Therefore Vax C will not compile perl
135.005. Sorry about that.
14
15If you're stuck without Dec C (the Vax C license should be good for Dec C,
16but the media charges might prohibit an upgrade), consider getting Gnu C
17instead.
18
fb73857a 19* Intro
20
21The VMS port of Perl is as functionally complete as any other Perl port
22(and as complete as the ports on some Unix systems). The Perl binaries
23provide all the Perl system calls that are either available under VMS or
24reasonably emulated. There are some incompatibilites in process handling
25(e.g the fork/exec model for creating subprocesses doesn't do what you
26might expect under Unix), mainly because VMS and Unix handle processes and
27sub-processes very differently.
28
29There are still some unimplemented system functions, and of coursse we
30could use modules implementing useful VMS system services, so if you'd like
31to lend a hand we'd love to have you. Join the Perl Porting Team Now!
32
33The current sources and build procedures have been tested on a VAX using
34VaxC and Dec C, and on an AXP using Dec C. If you run into problems with
35other compilers, please let us know.
36
37There are issues with varions versions of Dec C, so if you're not running a
38relatively modern version, check the Dec C issues section later on in this
39document.
40
41* Other required software
42
43In addition to VMS, you'll need:
3bf5f72b 44 1) A C compiler. Dec C for AXP, or Dec C, or gcc for the VAX.
fb73857a 45 2) A make tool. Dec's MMS (v2.6 or later), or MadGoat's free MMS
46 analog MMK (available from ftp.madgoat.com/madgoat) both work
47 just fine. Gnu Make might work, but it's been so long since
48 anyone's tested it that we're not sure. MMK's free, though, so
49 go ahead and use that.
50
51
52If you want to include socket support, you'll need a TCP stack and either
53Dec C, or socket libraries. See the Socket Support topic for more details.
54
97abc6ad 55* Building Perl
fb73857a 56
97abc6ad 57Building perl has two steps, configuration and compilation.
fb73857a 58
97abc6ad 59To configure perl (a necessary first step), issue the command
fb73857a 60
97abc6ad 61@CONFIGURE
fb73857a 62
97abc6ad
HM
63from the top of an unpacked perl directory. You'll be asked a series of
64questions, and the answers to them (along with the capabilities of your C
65compiler and network stack) will determine how perl's built.
fb73857a 66
97abc6ad 67If you've got multiple C compilers installed, you'll have your choice of
3bf5f72b
GS
68which one to use. Various older versions of Dec C had some gotchas, so if
69you're using a version older than 5.2, check the Dec C Issues section.
fb73857a 70
97abc6ad
HM
71The configuration script will print out, at the very end, the MMS or MMK
72command you need to compile perl. Issue it (exactly as printed) to start
73the build.
fb73857a 74
75Once you issue your MMS command, sit back and wait. Perl should build and
76link without a problem. If it doesn't, check the Gotchas to watch out for
77section. If that doesn't help, send some mail to the VMSPERL mailing list.
78Instructions are in the Mailing Lists section.
79
97abc6ad
HM
80As a handy shortcut, the command:
81
82@CONFIGURE "-des"
83
84(note the quotes and case) will choose reasonable defaults. (It takes Dec C
3bf5f72b 85over Gnu C, Dec C sockets over SOCKETSHR sockets, and either over no sockets)
97abc6ad 86
fb73857a 87* Testing Perl
88
89Once Perl has built cleanly, you need to test it to make sure things work.
90This step is very important--there are always things that can go wrong
91somehow and get you a dysfunctional Perl.
92
93Testing is very easy, though, as there's a full test suite in the perl
94distribution. To run the tests, enter the *exact* MMS line you used to
95compile Perl and add the word "test" to the end, like this:
96
97Compile Command:
98
97abc6ad 99$MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1")
fb73857a 100
101Test Command:
102
97abc6ad 103$MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1") test
fb73857a 104
105MMS will run all the tests. This may take some time, as there are a lot of
106tests. If any tests fail, there will be a note made on-screen. At the end
107of all the tests, a summary of the tests, the number passed and failed, and
108the time taken will be displayed.
109
110If any tests fail, it means something's wrong with Perl. If the test suite
111hangs (some tests can take upwards of two or three minutes, or more if
112you're on an especially slow machine, depending on you machine speed, so
113don't be hasty), then the test *after* the last one displayed failed. Don't
114install Perl unless you're confident that you're OK. Regardless of how
115confident you are, make a bug report to the VMSPerl mailing list.
116
117If one or more tests fail, you can get more info on the failure by issuing
118this command sequence:
119
97abc6ad 120$ @[.VMS]TEST .typ "-v" [.subdir]test.T
fb73857a 121
122where ".typ" is the file type of the Perl images you just built (if you
123didn't do anything special, use .EXE), and "[.subdir]test.T" is the test
124that failed. For example, with a normal Perl build, if the test indicated
125that [.op]time failed, then you'd do this:
126
97abc6ad 127$ @[.VMS]TEST .EXE "-v" [.OP]TIME.T
fb73857a 128
129When you send in a bug report for failed tests, please include the output
130from this command, which is run from the main source directory:
131
132MCR []MINIPERL "-V"
133
134Note that "-V" really is a capital V in double quotes. This will dump out a
135couple of screens worth of config info, and can help us diagnose the problem.
136
137* Cleaning up and starting fresh
138
139If you need to recompile from scratch, you have to make sure you clean up
140first. There's a procedure to do it--enter the *exact* MMS line you used to
141compile and add "realclean" at the end, like this:
142
143Compile Command:
144
97abc6ad 145$MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1")
fb73857a 146
147Cleanup Command:
148
97abc6ad 149$MMS/Macro=("__AXP__=1","decc=1","DECCRTL_SOCKETS=1") realclean
fb73857a 150
151If you don't do this, things may behave erratically. They might not, too,
152so it's best to be sure and do it.
153
154* Installing Perl
155
156There are several steps you need to take to get Perl installed and
3a385817 157running.
fb73857a 158
1591) Create a directory somewhere and define the concealed logical PERL_ROOT
160to point to it. For example, DEFINE/TRANS=(CONC,TERM) PERL_ROOT dka200:[perl.]
161
3a385817 1622) Run the install script via:
fb73857a 163
3a385817 164MMS install
fb73857a 165
3a385817 166or
fb73857a 167
3a385817
GS
168MMK install
169
170If for some reason it complains about target INSTALL being up to date,
171throw a /FORCE switch on the MMS or MMK command.
172
1733) Either define the symbol PERL somewhere, such as
fb73857a 174SYS$MANAGER:SYLOGIN.COM, to be "PERL :== $PERL_ROOT:[000000]PERL.EXE", or
3a385817 175install Perl into DCLTABLES.EXE (Check out the section "Installing Perl
fb73857a 176into DCLTABLES" for more info), or put the image in a directory that's in
177your DCL$PATH (if you're using VMS 6.2 or higher).
178
3a385817 1794) Optionally define the command PERLDOC as
85988417 180PERLDOC :== "$PERL_ROOT:[000000]PERL PERL_ROOT:[LIB.POD]PERLDOC.COM -T"
491527d0
GS
181Note that if you wish to use most as a pager please see
182ftp://space.mit.edu/pub/davis/ for both most and slang.
fb73857a 183
3a385817 1845) Optionally define the command PERLBUG (the Perl bug report generator) as
85988417 185PERLBUG :== "$PERL_ROOT:[000000]PERL PERL_ROOT:[LIB]PERLBUG.COM"
fb73857a 186
3a385817 1876) Optionally define the command POD2MAN (Converts POD files to nroff
491527d0
GS
188source suitable for converting to man pages. Also quiets complaints during
189module builds) as
190
191DEFINE/NOLOG POD2MAN PERL_ROOT:[LIB.POD]POD2MAN.COM
85988417
GS
192POD2MAN :== "$PERL_ROOT:[000000]PERL POD2MAN"
193
1947) Optionally define the command POD2TEXT (Converts POD files to text,
195which is required for perldoc -f to work properly) as
196
197DEFINE/NOLOG POD2TEXT PERL_ROOT:[LIB.POD]POD2TEXT.COM
198POD2TEXT :== "$PERL_ROOT:[000000]PERL POD2TEXT"
199
200In all these cases, if you've got PERL defined as a foreign command, you
201can replace $PERL_ROOT:[000000]PERL with ''perl'. If you've installed perl
202into DCLTABLES, replace it with just perl.
491527d0 203
fb73857a 204* Installing Perl into DCLTABLES
205
9ef4b0a6
BH
206Execute the following command file to define PERL as a DCL command.
207You'll need CMKRNL priv to install the new dcltables.exe.
fb73857a 208
9ef4b0a6
BH
209$ create perl.cld
210!
211! modify to reflect location of your perl.exe
212!
fb73857a 213define verb perl
9ef4b0a6
BH
214 image perl_root:[000000]perl.exe
215 cliflags (foreign)
216$!
fb73857a 217$ set command perl /table=sys$common:[syslib]dcltables.exe -
218 /output=sys$common:[syslib]dcltables.exe
219$ install replace sys$common:[syslib]dcltables.exe
9ef4b0a6 220$ exit
fb73857a 221
222* Changing compile-time things
223
224Most of the user-definable features of Perl are enabled or disabled in
225[.VMS]CONFIG.VMS. There's code in there to Do The Right Thing, but that may
226end up being the wrong thing for you. Make sure you understand what you're
227doing, since changes here can get you a busted perl.
228
229Odds are that there's nothing here to change, unless you're on a version of
230VMS later than 6.2 and Dec C later than 5.6. Even if you are, the correct
231values will still be chosen, most likely. Poking around here should be
232unnecessary.
233
234The one exception is the various *DIR install locations. Changing those
235requires changes in genconfig.pl as well. Be really careful if you need to
236change these,a s they can cause some fairly subtle problems.
237
238* Extra things in the Perl distribution
239
240In addition to the standard stuff that gets installed, there are two
241optional extensions, DCLSYM and STDIO, that are handy. Instructions for
242these two modules are in [.VMS.EXT.DCLSYM] and [.VMS.EXT.STDIO],
243respectively.
244
245* Socket Support
246
247Perl includes a number of functions for IP sockets, which are available if
248you choose to compile Perl with socket support. (See the section Compiling
249Perl for more info on selecting a socket stack) Since IP networking is an
250optional addition to VMS, there are several different IP stacks
251available. How well integrated they are into the system depends on the
252stack, your version of VMS, and the version of your C compiler.
253
254The most portable solution uses the SOCKETSHR library. In combination with
255either UCX or NetLib, this supports all the major TCP stacks (Multinet,
256Pathways, TCPWare, UCX, and CMU) on all versions of VMS Perl runs on, with
257all the compilers on both VAX and Alpha. The socket interface is also
258consistent across versions of VMS and C compilers. It has a problem with
259UDP sockets when used with Multinet, though, so you should be aware of
260that.
261
262The other solution available is to use the socket routines built into Dec
263C. Which routines are available depend on the version of VMS you're
264running, and require proper UCX emulation by your TCP/IP vendor.
265Relatively current versions of Multinet, TCPWare, Pathway, and UCX all
266provide the required libraries--check your manuals or release notes to see
267if your version is new enough.
268
269* Reporting Bugs
270
271If you come across what you think might be a bug in Perl, please report
272it. There's a script in PERL_ROOT:[UTILS], perlbug, that walks you through
273the process of creating a bug report. This script includes details of your
274installation, and is very handy. Completed bug reports should go to
275PERLBUG@PERL.COM.
276
277* Gotchas to watch out for
278
279Probably the single biggest gotcha in compiling Perl is giving the wrong
97abc6ad
HM
280switches to MMS/MMK when you build. Use *exactly* what the configure script
281prints!
fb73857a 282
283The next big gotcha is directory depth. Perl can create directories four
284and five levels deep during the build, so you don't have to be too deep to
285start to hit the RMS 8 level point. It's best to do a
286$DEFINE/TRANS=(CONC,TERM) PERLSRC disk:[dir.dir.dir.perldir.]" (note the
287trailing period) and $SET DEFAULT PERLSRC:[000000] before building. Perl
97abc6ad
HM
288modules can be just as bad (or worse), so watch out for them, too. The
289configuration script will warn if it thinks you're too deep.
fb73857a 290
291Finally, the third thing that bites people is leftover pieces from a failed
292build. If things go wrong, make sure you do a "(MMK|MMS|make) realclean"
293before you rebuild.
294
295* Dec C issues
296
297Note to DECC users: Some early versions (pre-5.2, some pre-4. If you're Dec
298C 5.x or higher, with current patches if anym you're fine) of the DECCRTL
299contained a few bugs which affect Perl performance:
300 - Newlines are lost on I/O through pipes, causing lines to run together.
301 This shows up as RMS RTB errors when reading from a pipe. You can
302 work around this by having one process write data to a file, and
303 then having the other read the file, instead of the pipe. This is
304 fixed in version 4 of DECC.
305 - The modf() routine returns a non-integral value for some values above
306 INT_MAX; the Perl "int" operator will return a non-integral value in
307 these cases. This is fixed in version 4 of DECC.
308 - On the AXP, if SYSNAM privilege is enabled, the CRTL chdir() routine
309 changes the process default device and directory permanently, even
310 though the call specified that the change should not persist after
311 Perl exited. This is fixed by DEC CSC patch AXPACRT04_061.
312
313* Mailing Lists
314
315There are several mailing lists available to the Perl porter. For VMS
316specific issues (including both Perl questions and installation problems)
317there is the VMSPERL mailing list. It's usually a low-volume (10-12
318messages a week) mailing list.
319
320The subscription address is VMSPERL-REQUEST@NEWMAN.UPENN.EDU. Send a mail
321message with just the words SUBSCRIBE VMSPERL in the body of the message.
322
323The VMSPERL mailing list address is VMSPERL@NEWMAN.UPENN.EDU. Any mail
324sent there gets echoed to all subscribers of the list.
325
326The Perl5-Porters list is for anyone involved in porting Perl to a
327platform. This includes you, if you want to participate. It's a high-volume
328list (60-100 messages a day during active development times), so be sure
329you want to be there. The subscription address is
330Perl5-Porters-request@perl.org. Send a message with just the word SUBSCRIBE
331in the body. The posting address is Perl5-Porters@perl.org.
332
333* Acknowledgements
334
335A real big thanks needs to go to Charles Bailey
336<bailey@newman.upenn.edu>, who is ultimately responsible for Perl 5.004
337running on VMS. Without him, nothing the rest of us have done would be at
338all important.
339
340There are, of course, far too many people involved in the porting and testing
341of Perl to mention everyone who deserves it, so please forgive us if we've
342missed someone. That said, special thanks are due to the following:
343 Tim Adye <T.J.Adye@rl.ac.uk>
344 for the VMS emulations of getpw*()
345 David Denholm <denholm@conmat.phys.soton.ac.uk>
346 for extensive testing and provision of pipe and SocketShr code,
347 Mark Pizzolato <mark@infocomm.com>
348 for the getredirection() code
349 Rich Salz <rsalz@bbn.com>
350 for readdir() and related routines
351 Peter Prymmer <pvhp@lns62.lns.cornell.edu)
352 for extensive testing, as well as development work on
353 configuration and documentation for VMS Perl,
354 Dan Sugalski <sugalsd@stargate.lbcc.cc.or.us>
355 for extensive contributions to recent version support,
356 development of VMS-specific extensions, and dissemination
357 of information about VMS Perl,
358 the Stanford Synchrotron Radiation Laboratory and the
359 Laboratory of Nuclear Studies at Cornell University for
360 the the opportunity to test and develop for the AXP,
361and to the entire VMSperl group for useful advice and suggestions. In
362addition the perl5-porters deserve credit for their creativity and
363willingness to work with the VMS newcomers. Finally, the greatest debt of
364gratitude is due to Larry Wall <larry@wall.org>, for having the ideas which
365have made our sleepless nights possible.
366
367Thanks,
368The VMSperl group