Install Perl 5.8.8
[msysgit.git] / mingw / html / pod / perlvms.html
blobc89440765ffdbc0fb942e789ebe48afc9f54245e
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>README.vms - Configuring, building, testing, and installing perl on VMS</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;README.vms - Configuring, building, testing, and installing perl on VMS</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <ul>
27 <li><a href="#important_safety_tip">Important safety tip</a></li>
28 <li><a href="#introduction_to_perl_on_vms">Introduction to Perl on VMS</a></li>
29 <li><a href="#other_required_software_for_compiling_perl_on_vms">Other required software for Compiling Perl on VMS</a></li>
30 <li><a href="#additional_software_that_is_optional_for_perl_on_vms">Additional software that is optional for Perl on VMS</a></li>
31 </ul>
33 <li><a href="#unpacking_the_perl_source_code">Unpacking the Perl source code</a></li>
34 <li><a href="#configuring_the_perl_build">Configuring the Perl build</a></li>
35 <ul>
37 <li><a href="#changing_compiletime_options__optional__for_perl_on_vms">Changing compile-time options (optional) for Perl on VMS</a></li>
38 <li><a href="#socket_support__optional__for_perl_on_vms">Socket Support (optional) for Perl on VMS</a></li>
39 </ul>
41 <li><a href="#building_perl">Building Perl</a></li>
42 <li><a href="#testing_perl">Testing Perl</a></li>
43 <ul>
45 <li><a href="#cleaning_up_and_starting_fresh__optional__installing_perl_on_vms">Cleaning up and starting fresh (optional) installing Perl on VMS</a></li>
46 </ul>
48 <li><a href="#installing_perl">Installing Perl</a></li>
49 <ul>
51 <li><a href="#installing_perl_into_dcltables__optional__on_vms">Installing Perl into DCLTABLES (optional) on VMS</a></li>
52 <li><a href="#installing_perl_images__optional__on_vms">INSTALLing Perl images (optional) on VMS</a></li>
53 <li><a href="#running_h2ph_to_create_perl_header_files__optional__on_vms">Running h2ph to create perl header files (optional) on VMS</a></li>
54 </ul>
56 <li><a href="#reporting_bugs">Reporting Bugs</a></li>
57 <li><a href="#caveats">CAVEATS</a></li>
58 <ul>
60 <li><a href="#dec_c_issues_with_perl_on_vms">DEC C issues with Perl on VMS</a></li>
61 <li><a href="#gnu_issues_with_perl_on_vms">GNU issues with Perl on VMS</a></li>
62 <li><a href="#floating_point_considerations">Floating Point Considerations</a></li>
63 <li><a href="#multinet_issues_with_perl_on_vms">Multinet issues with Perl on VMS</a></li>
64 </ul>
66 <li><a href="#mailing_lists">Mailing Lists</a></li>
67 <ul>
69 <li><a href="#web_sites_for_perl_on_vms">Web sites for Perl on VMS</a></li>
70 </ul>
72 <li><a href="#see_also">SEE ALSO</a></li>
73 <li><a href="#authors">AUTHORS</a></li>
74 <li><a href="#acknowledgements">ACKNOWLEDGEMENTS</a></li>
75 </ul>
76 <!-- INDEX END -->
78 <hr />
79 <p>
80 </p>
81 <h1><a name="name">NAME</a></h1>
82 <p>README.vms - Configuring, building, testing, and installing perl on VMS</p>
83 <p>
84 </p>
85 <hr />
86 <h1><a name="synopsis">SYNOPSIS</a></h1>
87 <p>To configure, build, test, and install perl on VMS:</p>
88 <pre>
89 @ Configure
90 mms
91 mms test
92 mms install</pre>
93 <p>mmk may be used in place of mms in the last three steps.</p>
94 <p>
95 </p>
96 <hr />
97 <h1><a name="description">DESCRIPTION</a></h1>
98 <p>
99 </p>
100 <h2><a name="important_safety_tip">Important safety tip</a></h2>
101 <p>The build and install procedures have changed significantly from the 5.004
102 releases! Make sure you read the ``Configuring the Perl Build'', ``Building
103 Perl'', and ``Installing Perl'' sections of this document before you build or
104 install. Also please note other changes in the current release by having
105 a look at <a href="file://C|\msysgit\mingw\html/pod/perldelta.html#vms">VMS in the perldelta manpage</a>.</p>
106 <p>Also note that, as of Perl version 5.005 and later, an ANSI C compliant
107 compiler is required to build Perl. VAX C is *not* ANSI compliant, as it
108 died a natural death some time before the standard was set. Therefore
109 VAX C will not compile Perl 5.005 or later. We are sorry about that.</p>
110 <p>If you are stuck without Compaq (formerly DEC) C consider trying Gnu C
111 instead, though there have been no recent reports of builds using Gnu C.
112 There is minimal support for Compaq C++ but this support is not complete;
113 if you get it working please write to the vmsperl list (for info see
114 <a href="#mailing_lists">Mailing Lists</a>).</p>
116 </p>
117 <h2><a name="introduction_to_perl_on_vms">Introduction to Perl on VMS</a></h2>
118 <p>The VMS port of Perl is as functionally complete as any other Perl port
119 (and as complete as the ports on some Unix systems). The Perl binaries
120 provide all the Perl system calls that are either available under VMS or
121 reasonably emulated. There are some incompatibilities in process handling
122 (e.g. the fork/exec model for creating subprocesses doesn't do what you
123 might expect under Unix), mainly because VMS and Unix handle processes and
124 sub-processes very differently.</p>
125 <p>There are still some unimplemented system functions, and of course we
126 could use modules implementing useful VMS system services, so if you'd like
127 to lend a hand we'd love to have you. Join the Perl Porting Team Now!</p>
128 <p>The current sources and build procedures have been tested on a VAX using
129 DEC C, and on an AXP using DEC C. If you run into problems with
130 other compilers, please let us know. (Note: DEC C was renamed to Compaq C
131 around version 6.2).</p>
132 <p>There are issues with various versions of DEC C, so if you're not running a
133 relatively modern version, check the ``DEC C issues'' section later on in this
134 document.</p>
136 </p>
137 <h2><a name="other_required_software_for_compiling_perl_on_vms">Other required software for Compiling Perl on VMS</a></h2>
138 <p>In addition to VMS and DCL you will need two things:</p>
139 <ol>
140 <li><strong><a name="item_a_c_compiler_2e">A C compiler.</a></strong>
142 <p>DEC (now Compaq) C or gcc for VMS (AXP or VAX).</p>
143 </li>
144 <li><strong><a name="item_a_make_tool_2e">A make tool.</a></strong>
146 <p>DEC's MMS (v2.6 or later), or MadGoat's free MMS
147 analog MMK (available from ftp.madgoat.com/madgoat) both work
148 just fine. Gnu Make might work, but it's been so long since
149 anyone's tested it that we're not sure. MMK is free though, so
150 go ahead and use that.</p>
151 </li>
152 </ol>
154 </p>
155 <h2><a name="additional_software_that_is_optional_for_perl_on_vms">Additional software that is optional for Perl on VMS</a></h2>
156 <p>You may also want to have on hand:</p>
157 <ol>
158 <li><strong><a name="item_gunzip_2fgzip_2eexe_for_vms">GUNZIP/GZIP.EXE for VMS</a></strong>
160 <p>A de-compressor for *.gz and *.tgz files available from a number
161 of web/ftp sites and is distributed on the OpenVMS Freeware CD-ROM
162 from Compaq.</p>
163 <pre>
164 <a href="http://www.fsf.org/order/ftp.html">http://www.fsf.org/order/ftp.html</a>
165 <a href="http://www.openvms.compaq.com/freeware/">http://www.openvms.compaq.com/freeware/</a>
166 <a href="http://www.crinoid.com/utils/">http://www.crinoid.com/utils/</a></pre>
167 </li>
168 <li><strong><a name="item_vms_tar">VMS TAR</a></strong>
170 <p>For reading and writing unix tape archives (*.tar files). Vmstar is also
171 available from a number of web/ftp sites and is distributed on the OpenVMS
172 Freeware CD-ROM from Compaq.</p>
173 <pre>
174 <a href="ftp://ftp.lp.se/vms/">ftp://ftp.lp.se/vms/</a>
175 <a href="http://www.openvms.compaq.com/freeware/">http://www.openvms.compaq.com/freeware/</a></pre>
176 <p>Recent versions of VMS tar on ODS-5 volumes may extract tape archive
177 files with ^. escaped periods in them. See below for further workarounds.</p>
178 </li>
179 <li><strong><a name="item_unzip_2eexe_for_vms">UNZIP.EXE for VMS</a></strong>
181 <p>A combination decompressor and archive reader/writer for *.zip files.
182 Unzip is available from a number of web/ftp sites.</p>
183 <pre>
184 <a href="http://www.info-zip.org/UnZip.html">http://www.info-zip.org/UnZip.html</a>
185 <a href="http://www.openvms.compaq.com/freeware/">http://www.openvms.compaq.com/freeware/</a>
186 <a href="ftp://ftp.openvms.compaq.com/">ftp://ftp.openvms.compaq.com/</a>
187 <a href="ftp://ftp.madgoat.com/madgoat/">ftp://ftp.madgoat.com/madgoat/</a>
188 <a href="ftp://ftp.process.com/vms-freeware/">ftp://ftp.process.com/vms-freeware/</a></pre>
189 </li>
190 <li><strong><a name="item_most">MOST</a></strong>
192 <p>Most is an optional pager that is convenient to use with perldoc (unlike
193 TYPE/PAGE, MOST can go forward and backwards in a document and supports
194 regular expression searching). Most builds with the slang
195 library on VMS. Most and slang are available from:</p>
196 <pre>
197 <a href="ftp://space.mit.edu/pub/davis/">ftp://space.mit.edu/pub/davis/</a>
198 <a href="ftp://ftp.process.com/vms-freeware/narnia/">ftp://ftp.process.com/vms-freeware/narnia/</a></pre>
199 </li>
200 <li><strong><a name="item_gnu_patch_and_diffutils_for_vms">GNU PATCH and DIFFUTILS for VMS</a></strong>
202 <p>Patches to Perl are usually distributed as GNU unified or contextual diffs.
203 Such patches are created by the GNU diff program (part of the diffutils
204 distribution) and applied with GNU patch. VMS ports of these utilities are
205 available here:</p>
206 <pre>
207 <a href="http://www.crinoid.com/utils/">http://www.crinoid.com/utils/</a>
208 <a href="http://www.openvms.compaq.com/freeware/">http://www.openvms.compaq.com/freeware/</a></pre>
209 </li>
210 </ol>
211 <p>Please note that UNZIP and GUNZIP are not the same thing (they work with
212 different formats). Many of the useful files from CPAN (the Comprehensive
213 Perl Archive Network) are in *.tar.gz or *.tgz format (this includes copies
214 of the source code for perl as well as modules and scripts that you may
215 wish to add later) hence you probably want to have GUNZIP.EXE and
216 VMSTAR.EXE on your VMS machine.</p>
217 <p>If you want to include socket support, you'll need a TCP/IP stack and either
218 DEC C, or socket libraries. See the ``Socket Support (optional)'' topic
219 for more details.</p>
221 </p>
222 <hr />
223 <h1><a name="unpacking_the_perl_source_code">Unpacking the Perl source code</a></h1>
224 <p>You may need to set up a foreign symbol for the unpacking utility of choice.</p>
225 <p>If you unpack a perl source kit with a name containing multiple periods on
226 an ODS-5 volume using recent versions of vmstar (e.g. V3.4 or later) you may
227 need to be especially careful in unpacking the tape archive file. Try to use
228 the ODS-2 compatability qualifiers such as:</p>
229 <pre>
230 vmstar /extract/verbose/ods2 perl-V^.VIII^.III.tar</pre>
231 <p>or:</p>
232 <pre>
233 vmstar -xvof perl-5^.8^.8.tar</pre>
234 <p>If you neglected to use the /ODS2 qualifier or the -o switch then you
235 could rename the source directory:</p>
236 <pre>
237 set security/protection=(o:rwed) perl-5^.8^.8.dir
238 rename perl-5^.8^.8.dir perl-5_8_8.dir</pre>
239 <p>Perl on VMS as of 5.8.8 does not completely handle extended file
240 parse styles such as are encountered on ODS-5. While it can be built,
241 installed, and run on ODS-5 filesystems; it may encounter
242 trouble with characters that are otherwise illegal on ODS-2
243 volumes (notably the ^. escaped period sequence).</p>
245 </p>
246 <hr />
247 <h1><a name="configuring_the_perl_build">Configuring the Perl build</a></h1>
248 <p>To configure perl (a necessary first step), issue the command</p>
249 <pre>
250 @ Configure</pre>
251 <p>from the top of an unpacked perl source directory. You will be asked a
252 series of questions, and the answers to them (along with the capabilities
253 of your C compiler and network stack) will determine how perl is custom
254 built for your machine.</p>
255 <p>If you have multiple C compilers installed, you'll have your choice of
256 which one to use. Various older versions of DEC C had some caveats, so if
257 you're using a version older than 5.2, check the ``DEC C Issues'' section.</p>
258 <p>If you have any symbols or logical names in your environment that may
259 interfere with the build or regression testing of perl then configure.com
260 will try to warn you about them. If a logical name is causing
261 you trouble but is in an LNM table that you do not have write access to
262 then try defining your own to a harmless equivalence string in a table
263 such that it is resolved before the other (e.g. if TMP is defined in the
264 SYSTEM table then try DEFINE TMP ``NL:'' or somesuch in your process table)
265 otherwise simply deassign the dangerous logical names. The potentially
266 troublesome logicals and symbols are:</p>
267 <pre>
268 COMP &quot;LOGICAL&quot;
269 EXT &quot;LOGICAL&quot;
270 FOO &quot;LOGICAL&quot;
271 LIB &quot;LOGICAL&quot;
272 LIST &quot;LOGICAL&quot;
273 MIME &quot;LOGICAL&quot;
274 POSIX &quot;LOGICAL&quot;
275 SYS &quot;LOGICAL&quot;
276 T &quot;LOGICAL&quot;
277 THREAD &quot;LOGICAL&quot;
278 THREADS &quot;LOGICAL&quot;
279 TIME &quot;LOGICAL&quot;
280 TMP &quot;LOGICAL&quot;
281 UNICODE &quot;LOGICAL&quot;
282 UTIL &quot;LOGICAL&quot;
283 TEST &quot;SYMBOL&quot;</pre>
284 <p>As a handy shortcut, the command:</p>
285 <pre>
286 @ Configure &quot;-des&quot;</pre>
287 <p>(note the quotation marks and case) will choose reasonable defaults
288 automatically (it takes DEC C over Gnu C, DEC C sockets over SOCKETSHR
289 sockets, and either over no sockets). Some options can be given
290 explicitly on the command line; the following example specifies a
291 non-default location for where Perl will be installed:</p>
292 <pre>
293 @ Configure &quot;-d&quot; &quot;-Dprefix=dka100:[utils.perl5.]&quot;</pre>
294 <p>Note that the installation location would be by default where you unpacked
295 the source with a ``_ROOT.'' appended. For example if you unpacked the perl
296 source into:</p>
297 <pre>
298 DKA200:[PERL-5_10_2...]</pre>
299 <p>Then the PERL_SETUP.COM that gets written out by CONFIGURE.COM will
300 try to DEFINE your installation PERL_ROOT to be:</p>
301 <pre>
302 DKA200:[PERL-5_10_2_ROOT.]</pre>
303 <p>More help with configure.com is available from:</p>
304 <pre>
305 @ Configure &quot;-h&quot;</pre>
306 <p>See the ``Changing compile-time options (optional)'' section below to learn
307 even more details about how to influence the outcome of the important
308 configuration step. If you find yourself reconfiguring and rebuilding
309 then be sure to also follow the advice in the ``Cleaning up and starting
310 fresh (optional)'' and the checklist of items in the ``CAVEATS'' sections
311 below.</p>
313 </p>
314 <h2><a name="changing_compiletime_options__optional__for_perl_on_vms">Changing compile-time options (optional) for Perl on VMS</a></h2>
315 <p>Most of the user definable features of Perl are enabled or disabled in
316 configure.com, which processes the hints file config_h.SH. There is
317 code in there to Do The Right Thing, but that may end up being the
318 wrong thing for you. Make sure you understand what you are doing since
319 inappropriate changes to configure.com or config_h.SH can render perl
320 unbuildable; odds are that there's nothing in there you'll need to
321 change.</p>
322 <p>The one exception is the various *DIR install locations. Changing those
323 requires changes in genconfig.pl as well. Be really careful if you need to
324 change these, as they can cause some fairly subtle problems.</p>
326 </p>
327 <h2><a name="socket_support__optional__for_perl_on_vms">Socket Support (optional) for Perl on VMS</a></h2>
328 <p>Perl includes a number of functions for IP sockets, which are available if
329 you choose to compile Perl with socket support. Since IP networking is an
330 optional addition to VMS, there are several different IP stacks available.
331 How well integrated they are into the system depends on the stack, your
332 version of VMS, and the version of your C compiler.</p>
333 <p>The most portable solution uses the SOCKETSHR library. In combination with
334 either UCX or NetLib, this supports all the major TCP stacks (Multinet,
335 Pathways, TCPWare, UCX, and CMU) on all versions of VMS Perl runs on, with
336 all the compilers on both VAX and Alpha. The socket interface is also
337 consistent across versions of VMS and C compilers. It has a problem with
338 UDP sockets when used with Multinet, though, so you should be aware of
339 that.</p>
340 <p>The other solution available is to use the socket routines built into DEC
341 C. Which routines are available depend on the version of VMS you're
342 running, and require proper UCX emulation by your TCP/IP vendor.
343 Relatively current versions of Multinet, TCPWare, Pathway, and UCX all
344 provide the required libraries--check your manuals or release notes to see
345 if your version is new enough.</p>
347 </p>
348 <hr />
349 <h1><a name="building_perl">Building Perl</a></h1>
350 <p>The configuration script will print out, at the very end, the MMS or MMK
351 command you need to compile perl. Issue it (exactly as printed) to start
352 the build.</p>
353 <p>Once you issue your MMS or MMK command, sit back and wait. Perl should
354 compile and link without a problem. If a problem does occur check the
355 ``CAVEATS'' section of this document. If that does not help send some
356 mail to the VMSPERL mailing list. Instructions are in the ``Mailing Lists''
357 section of this document.</p>
359 </p>
360 <hr />
361 <h1><a name="testing_perl">Testing Perl</a></h1>
362 <p>Once Perl has built cleanly you need to test it to make sure things work.
363 This step is very important since there are always things that can go wrong
364 somehow and yield a dysfunctional Perl for you.</p>
365 <p>Testing is very easy, though, as there's a full test suite in the perl
366 distribution. To run the tests, enter the *exact* MMS line you used to
367 compile Perl and add the word ``test'' to the end, like this:</p>
368 <p>If the compile command was:</p>
369 <pre>
370 MMS</pre>
371 <p>then the test command ought to be:</p>
372 <pre>
373 MMS test</pre>
374 <p>MMS (or MMK) will run all the tests. This may take some time, as there are
375 a lot of tests. If any tests fail, there will be a note made on-screen.
376 At the end of all the tests, a summary of the tests, the number passed and
377 failed, and the time taken will be displayed.</p>
378 <p>The test driver invoked via MMS TEST has a DCL wrapper ([.VMS]TEST.COM) that
379 downgrades privileges to NETMBX, TMPMBX for the duration of the test run,
380 and then restores them to their prior state upon completion of testing.
381 This is done to ensure that the tests run in a private sandbox and can do no
382 harm to your system even in the unlikely event something goes badly wrong in
383 one of the test scripts while running the tests from a privileged account.
384 A side effect of this safety precaution is that the account used to run the
385 test suite must be the owner of the directory tree in which Perl has been
386 built; otherwise the manipulations of temporary files and directories
387 attempted by some of the tests will fail.</p>
388 <p>If any tests fail, it means something is wrong with Perl. If the test suite
389 hangs (some tests can take upwards of two or three minutes, or more if
390 you're on an especially slow machine, depending on your machine speed, so
391 don't be hasty), then the test *after* the last one displayed failed. Don't
392 install Perl unless you're confident that you're OK. Regardless of how
393 confident you are, make a bug report to the VMSPerl mailing list.</p>
394 <p>If one or more tests fail, you can get more information on the failure by
395 issuing this command sequence:</p>
396 <pre>
397 @ [.VMS]TEST .typ &quot;&quot; &quot;-v&quot; [.subdir]test.T</pre>
398 <p>where ``.typ'' is the file type of the Perl images you just built (if you
399 didn't do anything special, use .EXE), and ``[.subdir]test.T'' is the test
400 that failed. For example, with a normal Perl build, if the test indicated
401 that t/op/time failed, then you'd do this:</p>
402 <pre>
403 @ [.VMS]TEST .EXE &quot;&quot; &quot;-v&quot; [.OP]TIME.T</pre>
404 <p>Note that test names are reported in UNIX syntax and relative to the
405 top-level build directory. When supplying them individually to the test
406 driver, you can use either UNIX or VMS syntax, but you must give the path
407 relative to the [.T] directory and you must also add the .T extension to the
408 filename. So, for example if the test lib/Math/Trig fails, you would run:</p>
409 <pre>
410 @ [.VMS]TEST .EXE &quot;&quot; -&quot;v&quot; [-.lib.math]trig.t</pre>
411 <p>When you send in a bug report for failed tests, please include the output
412 from this command, which is run from the main source directory:</p>
413 <pre>
414 MCR []MINIPERL &quot;-V&quot;</pre>
415 <p>Note that -``V'' really is a capital V in double quotes. This will dump out a
416 couple of screens worth of configuration information, and can help us
417 diagnose the problem. If (and only if) that did not work then try enclosing
418 the output of:</p>
419 <pre>
420 MMS printconfig</pre>
421 <p>If (and only if) that did not work then try enclosing the output of:</p>
422 <pre>
423 @ [.vms]myconfig</pre>
424 <p>You may also be asked to provide your C compiler version (``CC/VERSION NL:''
425 with DEC C, ``gcc --version'' with GNU CC). To obtain the version of MMS or
426 MMK you are running try ``MMS/ident'' or ``MMK /ident''. The GNU make version
427 can be identified with ``make --version''.</p>
429 </p>
430 <h2><a name="cleaning_up_and_starting_fresh__optional__installing_perl_on_vms">Cleaning up and starting fresh (optional) installing Perl on VMS</a></h2>
431 <p>If you need to recompile from scratch, you have to make sure you clean up
432 first. There is a procedure to do it--enter the *exact* MMS line you used
433 to compile and add ``realclean'' at the end, like this:</p>
434 <p>if the compile command was:</p>
435 <pre>
436 MMS</pre>
437 <p>then the cleanup command ought to be:</p>
438 <pre>
439 MMS realclean</pre>
440 <p>If you do not do this things may behave erratically during the subsequent
441 rebuild attempt. They might not, too, so it is best to be sure and do it.</p>
443 </p>
444 <hr />
445 <h1><a name="installing_perl">Installing Perl</a></h1>
446 <p>There are several steps you need to take to get Perl installed and
447 running.</p>
448 <ol>
449 <li>
450 <p>Check your default file protections with</p>
451 <pre>
452 SHOW PROTECTION /DEFAULT</pre>
453 <p>and adjust if necessary with SET PROTECTION=(code)/DEFAULT.</p>
454 </li>
455 <li>
456 <p>Decide where you want Perl to be installed (unless you have already done so
457 by using the ``prefix'' configuration parameter -- see the example in the
458 ``Configuring the Perl build'' section).</p>
459 <p>The DCL script PERL_SETUP.COM that is written by CONFIGURE.COM will help you
460 with the definition of the PERL_ROOT and PERLSHR logical names and the PERL
461 foreign command symbol. Take a look at PERL_SETUP.COM and modify it if you
462 want to. The installation process will execute PERL_SETUP.COM and copy
463 files to the directory tree pointed to by the PERL_ROOT logical name defined
464 there, so make sure that you have write access to the parent directory of
465 what will become the root of your Perl installation.</p>
466 </li>
467 <li>
468 <p>Run the install script via:</p>
469 <pre>
470 MMS install</pre>
471 <p>or</p>
472 <pre>
473 MMK install</pre>
474 <p>If for some reason it complains about target INSTALL being up to date,
475 throw a /FORCE switch on the MMS or MMK command.</p>
476 </li>
477 </ol>
478 <p>Copy PERL_SETUP.COM to a place accessible to your perl users.</p>
479 <p>For example:</p>
480 <pre>
481 COPY PERL_SETUP.COM SYS$LIBRARY:</pre>
482 <p>If you want to have everyone on the system have access to perl
483 then add a line that reads</p>
484 <pre>
485 $ @sys$library:perl_setup</pre>
486 <p>to SYS$MANAGER:SYLOGIN.COM.</p>
487 <p>Two alternatives to the foreign symbol would be to install PERL into
488 DCLTABLES.EXE (Check out the section ``Installing Perl into DCLTABLES
489 (optional)'' for more information), or put the image in a
490 directory that's in your DCL$PATH (if you're using VMS V6.2 or higher).</p>
491 <p>An alternative to having PERL_SETUP.COM define the PERLSHR logical name
492 is to simply copy it into the system shareable library directory with:</p>
493 <pre>
494 copy perl_root:[000000]perlshr.exe sys$share:</pre>
495 <p>See also the ``INSTALLing images (optional)'' section.</p>
497 </p>
498 <h2><a name="installing_perl_into_dcltables__optional__on_vms">Installing Perl into DCLTABLES (optional) on VMS</a></h2>
499 <p>Execute the following command file to define PERL as a DCL command.
500 You'll need CMKRNL privilege to install the new dcltables.exe.</p>
501 <pre>
502 $ create perl.cld
504 ! modify to reflect location of your perl.exe
506 define verb perl
507 image perl_root:[000000]perl.exe
508 cliflags (foreign)
510 $ set command perl /table=sys$common:[syslib]dcltables.exe -
511 /output=sys$common:[syslib]dcltables.exe
512 $ install replace sys$common:[syslib]dcltables.exe
513 $ exit</pre>
515 </p>
516 <h2><a name="installing_perl_images__optional__on_vms">INSTALLing Perl images (optional) on VMS</a></h2>
517 <p>On systems that are using perl quite a bit, and particularly those with
518 minimal RAM, you can boost the performance of perl by INSTALLing it as
519 a known image. PERLSHR.EXE is typically larger than 3000 blocks
520 and that is a reasonably large amount of IO to load each time perl is
521 invoked.</p>
522 <pre>
523 INSTALL ADD PERLSHR/SHARE
524 INSTALL ADD PERL/HEADER</pre>
525 <p>should be enough for PERLSHR.EXE (/share implies /header and /open),
526 while /HEADER should do for PERL.EXE (perl.exe is not a shared image).</p>
527 <p>If your code 'use's modules, check to see if there is a shareable image for
528 them, too. In the base perl build, POSIX, IO, Fcntl, Opcode, SDBM_File,
529 DCLsym, and Stdio, and other extensions all have shared images that can be
530 installed /SHARE.</p>
531 <p>How much of a win depends on your memory situation, but if you are firing
532 off perl with any regularity (like more than once every 20 seconds or so)
533 it is probably beneficial to INSTALL at least portions of perl.</p>
534 <p>While there is code in perl to remove privileges as it runs you are advised
535 to NOT INSTALL PERL.EXE with PRIVs!</p>
537 </p>
538 <h2><a name="running_h2ph_to_create_perl_header_files__optional__on_vms">Running h2ph to create perl header files (optional) on VMS</a></h2>
539 <p>If using DEC C or Compaq C ensure that you have extracted loose versions
540 of your compiler's header or *.H files. Be sure to check the contents of:</p>
541 <pre>
542 SYS$LIBRARY:DECC$RTLDEF.TLB
543 SYS$LIBRARY:SYS$LIB_C.TLB
544 SYS$LIBRARY:SYS$STARLET_C.TLB</pre>
545 <p>etcetera.</p>
546 <p>If using GNU cc then also check your GNU_CC:[000000...] tree for the locations
547 of the GNU cc headers.</p>
549 </p>
550 <hr />
551 <h1><a name="reporting_bugs">Reporting Bugs</a></h1>
552 <p>If you come across what you think might be a bug in Perl, please report
553 it. There's a script in PERL_ROOT:[UTILS], perlbug, that walks you through
554 the process of creating a bug report. This script includes details of your
555 installation, and is very handy. Completed bug reports should go to
556 <a href="mailto:perlbug@perl.com.">perlbug@perl.com.</a></p>
558 </p>
559 <hr />
560 <h1><a name="caveats">CAVEATS</a></h1>
561 <p>Probably the single biggest gotcha in compiling Perl is giving the wrong
562 switches to MMS/MMK when you build. Use *exactly* what the configure.com
563 script prints!</p>
564 <p>The next big gotcha is directory depth. Perl can create directories four,
565 five, or even six levels deep during the build, so you don't have to be
566 too deep to start to hit the RMS 8 level limit (for ODS 2 volumes which were
567 common on versions of VMS prior to V7.2 and even with V7.2 on the VAX).
568 It is best to do:</p>
569 <pre>
570 DEFINE/TRANS=(CONC,TERM) PERLSRC &quot;disk:[dir.dir.dir.perldir.]&quot;
571 SET DEFAULT PERLSRC:[000000]</pre>
572 <p>before building in cases where you have to unpack the distribution so deep
573 (note the trailing period in the definition of PERLSRC). Perl modules
574 from CPAN can be just as bad (or worse), so watch out for them, too. Perl's
575 configuration script will warn if it thinks you are too deep (at least on
576 a VAX or on Alpha versions of VMS prior to 7.2). But MakeMaker will not
577 warn you if you start out building a module too deep in a directory.</p>
578 <p>As noted above ODS-5 escape sequences such as ^. can break the perl
579 build. Solutions include renaming files and directories as needed or
580 being careful to use the -o switch or /ODS2 qualifier with latter
581 versions of the vmstar utility when unpacking perl or CPAN modules
582 on ODS-5 volumes.</p>
583 <p>Be sure that the process that you use to build perl has a PGFLQ greater
584 than 100000. Be sure to have a correct local time zone to UTC offset
585 defined (in seconds) in the logical name SYS$TIMEZONE_DIFFERENTIAL before
586 running the regression test suite. The SYS$MANAGER:UTC$CONFIGURE_TDF.COM
587 procedure will help you set that logical for your system but may require
588 system privileges. For example, a location 5 hours west of UTC (such as
589 the US East coast while not on daylight savings time) would have:</p>
590 <pre>
591 DEFINE SYS$TIMEZONE_DIFFERENTIAL &quot;-18000&quot;</pre>
592 <p>A final thing that causes trouble is leftover pieces from a failed
593 build. If things go wrong make sure you do a ``(MMK|MMS|make) realclean''
594 before you rebuild.</p>
596 </p>
597 <h2><a name="dec_c_issues_with_perl_on_vms">DEC C issues with Perl on VMS</a></h2>
598 <p>Note to DEC C users: Some early versions (pre-5.2, some pre-4. If you're DEC
599 C 5.x or higher, with current patches if any, you're fine) of the DECCRTL
600 contained a few bugs which affect Perl performance:</p>
601 <dl>
602 <dt><strong><a name="item__2d_pipes">- pipes</a></strong>
604 <dd>
605 <p>Newlines are lost on I/O through pipes, causing lines to run together.
606 This shows up as RMS RTB errors when reading from a pipe. You can
607 work around this by having one process write data to a file, and
608 then having the other read the file, instead of the pipe. This is
609 fixed in version 4 of DEC C.</p>
610 </dd>
611 </li>
612 <dt><strong><a name="item_modf">- <code>modf()</code></a></strong>
614 <dd>
615 <p>The <a href="#item_modf"><code>modf()</code></a> routine returns a non-integral value for some values above
616 INT_MAX; the Perl ``int'' operator will return a non-integral value in
617 these cases. This is fixed in version 4 of DEC C.</p>
618 </dd>
619 </li>
620 <dt><strong><a name="item__2d_alpacrt_eco">- ALPACRT ECO</a></strong>
622 <dd>
623 <p>On the AXP, if SYSNAM privilege is enabled, the CRTL <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_chdir"><code>chdir()</code></a> routine
624 changes the process default device and directory permanently, even
625 though the call specified that the change should not persist after
626 Perl exited. This is fixed by DEC CSC patch ALPACRT04_061 or later.
627 See also:</p>
628 </dd>
629 <dd>
630 <pre>
631 <a href="http://ftp.support.compaq.com/patches/.new/openvms.shtml">http://ftp.support.compaq.com/patches/.new/openvms.shtml</a></pre>
632 </dd>
633 </li>
634 </dl>
635 <p>Please note that in later versions ``DEC C'' may also be known as
636 ``Compaq C''.</p>
638 </p>
639 <h2><a name="gnu_issues_with_perl_on_vms">GNU issues with Perl on VMS</a></h2>
640 <p>It has been a while since the GNU utilities such as GCC or GNU make
641 were used to build perl on VMS. Hence they may require a great deal
642 of source code modification to work again.</p>
643 <pre>
644 <a href="http://slacvx.slac.stanford.edu/HELP/GCC">http://slacvx.slac.stanford.edu/HELP/GCC</a>
645 <a href="http://www.progis.de/">http://www.progis.de/</a>
646 <a href="http://www.lp.se/products/gnu.html">http://www.lp.se/products/gnu.html</a></pre>
648 </p>
649 <h2><a name="floating_point_considerations">Floating Point Considerations</a></h2>
650 <p>Prior to 5.8.0, Perl simply accepted the default floating point options of the
651 C compiler, namely representing doubles with D_FLOAT on VAX and G_FLOAT on
652 Alpha. Single precision floating point values are represented in F_FLOAT
653 format when either D_FLOAT or G_FLOAT is in use for doubles. Beginning with
654 5.8.0, Alpha builds now use IEEE floating point formats by default, which in
655 VMS parlance are S_FLOAT for singles and T_FLOAT for doubles. IEEE is not
656 available on VAX, so F_FLOAT and D_FLOAT remain the defaults for singles and
657 doubles respectively. The available non-default options are G_FLOAT on VAX
658 and D_FLOAT or G_FLOAT on Alpha.</p>
659 <p>The use of IEEE on Alpha introduces NaN, infinity, and denormalization
660 capabilities not available with D_FLOAT and G_FLOAT. When using one of those
661 non-IEEE formats, silent underflow and overflow are emulated in the conversion
662 of strings to numbers, but it is preferable to get the real thing by using
663 IEEE where possible.</p>
664 <p>Regardless of what floating point format you consider preferable, be aware
665 that the choice may have an impact on compatibility with external libraries,
666 such as database interfaces, and with existing data, such as data created with
667 the <code>pack</code> function and written to disk, or data stored via the Storable
668 extension. For example, a <code>pack(&quot;d&quot;, $foo)&quot;)</code> will create a D_FLOAT,
669 G_FLOAT, or T_FLOAT depending on what your Perl was configured with. When
670 written to disk, the value can only be retrieved later by a Perl configured
671 with the same floating point option that was in effect when it was created.</p>
672 <p>To obtain a non-IEEE build on Alpha, simply answer no to the ``Use IEEE math?''
673 question during the configuration. To obtain an option different from the C
674 compiler default on either VAX or Alpha, put in the option that you want in
675 answer to the ``Any additional cc flags?'' question. For example, to obtain a
676 G_FLOAT build on VAX, put in <code>/FLOAT=G_FLOAT</code>.</p>
678 </p>
679 <h2><a name="multinet_issues_with_perl_on_vms">Multinet issues with Perl on VMS</a></h2>
680 <p>Prior to the release of Perl 5.8.0 it was noted that the regression
681 test for lib/Net/hostent (in file [.lib.Net]hostent.t) will fail owing
682 to problems with the hostent structure returned by C calls to either
683 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_gethostbyname"><code>gethostbyname()</code></a> or <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_gethostbyaddr"><code>gethostbyaddr()</code></a> using DEC or Compaq C with a
684 Multinet TCP/IP stack. The problem was noted in Multinet 4.3A
685 using either Compaq C 6.5 or DEC C 6.0, and with Multinet 4.2A
686 using DEC C 5.2, but could easily affect other versions of Multinet.
687 Process Software Inc. has acknowledged a bug in the Multinet version
688 of UCX$IPC_SHR and has provided an ECO for it. The ECO is called
689 UCX_LIBRARY_EMULATION-010_A044 and is available from:</p>
690 <pre>
691 <a href="http://www.multinet.process.com/eco.html">http://www.multinet.process.com/eco.html</a></pre>
692 <p>As of this writing, the ECO is only available for Multinet versions
693 4.3A and later. You may determine the version of Multinet that you
694 are running using the command:</p>
695 <pre>
696 multinet show /version</pre>
697 <p>from the DCL command prompt.</p>
698 <p>If the ECO is unavailable for your version of Multinet and you are
699 unable to upgrade, you might try using Perl programming constructs
700 such as:</p>
701 <pre>
702 $address = substr($gethostbyname_addr,0,4);</pre>
703 <p>to temporarily work around the problem, or if you are brave
704 and do not mind the possibility of breaking IPv6 addresses,
705 you might modify the pp_sys.c file to add an ad-hoc correction
706 like so:</p>
707 <pre>
708 --- pp_sys.c;1 Thu May 30 14:42:17 2002
709 +++ pp_sys.c Thu May 30 12:54:02 2002
710 @@ -4684,6 +4684,10 @@
712 #endif</pre>
713 <pre>
714 + if (hent) {
715 + hent-&gt;h_length = 4;
718 if (GIMME != G_ARRAY) {
719 PUSHs(sv = sv_newmortal());
720 if (hent) {</pre>
721 <p>then re-compile and re-test your perl. After the installation
722 of the Multinet ECO you ought to back out any such changes though.</p>
724 </p>
725 <hr />
726 <h1><a name="mailing_lists">Mailing Lists</a></h1>
727 <p>There are several mailing lists available to the Perl porter. For VMS
728 specific issues (including both Perl questions and installation problems)
729 there is the VMSPERL mailing list. It is usually a low-volume (10-12
730 messages a week) mailing list.</p>
731 <p>To subscribe, send a mail message to <a href="mailto:VMSPERL-SUBSCRIBE@PERL.ORG.">VMSPERL-SUBSCRIBE@PERL.ORG.</a> The VMSPERL
732 mailing list address is <a href="mailto:VMSPERL@PERL.ORG.">VMSPERL@PERL.ORG.</a> Any mail sent there gets echoed
733 to all subscribers of the list. There is a searchable archive of the list
734 on the web at:</p>
735 <pre>
736 <a href="http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/">http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/</a></pre>
737 <p>To unsubscribe from VMSPERL send a message to <a href="mailto:VMSPERL-UNSUBSCRIBE@PERL.ORG.">VMSPERL-UNSUBSCRIBE@PERL.ORG.</a>
738 Be sure to do so from the subscribed account that you are canceling.</p>
740 </p>
741 <h2><a name="web_sites_for_perl_on_vms">Web sites for Perl on VMS</a></h2>
742 <p>Vmsperl pages on the web include:</p>
743 <pre>
744 <a href="http://www.sidhe.org/vmsperl/index.html">http://www.sidhe.org/vmsperl/index.html</a>
745 <a href="http://www.crinoid.com/">http://www.crinoid.com/</a>
746 <a href="http://duphy4.physics.drexel.edu/pub/cgi_info.htmlx">http://duphy4.physics.drexel.edu/pub/cgi_info.htmlx</a>
747 <a href="http://www.cpan.org/modules/by-module/VMS/">http://www.cpan.org/modules/by-module/VMS/</a>
748 <a href="http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/">http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/</a>
749 <a href="http://www.best.com/~pvhp/vms/">http://www.best.com/~pvhp/vms/</a>
750 <a href="http://www-ang.kfunigraz.ac.at/~binder/perl.html">http://www-ang.kfunigraz.ac.at/~binder/perl.html</a>
751 <a href="http://lists.perl.org/showlist.cgi?name=vmsperl">http://lists.perl.org/showlist.cgi?name=vmsperl</a>
752 <a href="http://archive.develooper.com/vmsperl@perl.org/">http://archive.develooper.com/vmsperl@perl.org/</a>
753 <a href="http://www.openvms.compaq.com/openvms/products/ips/apache/csws_modperl.html">http://www.openvms.compaq.com/openvms/products/ips/apache/csws_modperl.html</a></pre>
755 </p>
756 <hr />
757 <h1><a name="see_also">SEE ALSO</a></h1>
758 <p>Perl information for users and programmers about the port of perl to VMS is
759 available from the [.VMS]PERLVMS.POD file that gets installed as <a href="file://C|\msysgit\mingw\html/pod/perlvms.html">the perlvms manpage</a>.
760 For administrators the perlvms document also includes a detailed discussion
761 of extending vmsperl with CPAN modules after Perl has been installed.</p>
763 </p>
764 <hr />
765 <h1><a name="authors">AUTHORS</a></h1>
766 <p>Revised 10-October-2001 by Craig Berry <a href="mailto:craigberry@mac.com.">craigberry@mac.com.</a>
767 Revised 25-February-2000 by Peter Prymmer <a href="mailto:pvhp@best.com.">pvhp@best.com.</a>
768 Revised 27-October-1999 by Craig Berry <a href="mailto:craigberry@mac.com.">craigberry@mac.com.</a>
769 Revised 01-March-1999 by Dan Sugalski <a href="mailto:dan@sidhe.org.">dan@sidhe.org.</a>
770 Originally by Charles Bailey <a href="mailto:bailey@newman.upenn.edu.">bailey@newman.upenn.edu.</a></p>
772 </p>
773 <hr />
774 <h1><a name="acknowledgements">ACKNOWLEDGEMENTS</a></h1>
775 <p>A real big thanks needs to go to Charles Bailey
776 <a href="mailto:bailey@newman.upenn.edu,">bailey@newman.upenn.edu,</a> who is ultimately responsible for Perl 5.004
777 running on VMS. Without him, nothing the rest of us have done would be at
778 all important.</p>
779 <p>There are, of course, far too many people involved in the porting and testing
780 of Perl to mention everyone who deserves it, so please forgive us if we've
781 missed someone. That said, special thanks are due to the following:</p>
782 <pre>
783 Tim Adye T.J.Adye@rl.ac.uk
784 for the VMS emulations of getpw*()
785 David Denholm denholm@conmat.phys.soton.ac.uk
786 for extensive testing and provision of pipe and SocketShr code,
787 Mark Pizzolato mark@infocomm.com
788 for the getredirection() code
789 Rich Salz rsalz@bbn.com
790 for readdir() and related routines
791 Peter Prymmer pvhp@best.com
792 for extensive testing, as well as development work on
793 configuration and documentation for VMS Perl,
794 Dan Sugalski dan@sidhe.org
795 for extensive contributions to recent version support,
796 development of VMS-specific extensions, and dissemination
797 of information about VMS Perl,
798 the Stanford Synchrotron Radiation Laboratory and the
799 Laboratory of Nuclear Studies at Cornell University for
800 the opportunity to test and develop for the AXP,
801 John Hasstedt John.Hasstedt@sunysb.edu
802 for VAX VMS V7.2 support</pre>
803 <p>and to the entire VMSperl group for useful advice and suggestions. In
804 addition the perl5-porters deserve credit for their creativity and
805 willingness to work with the VMS newcomers. Finally, the greatest debt of
806 gratitude is due to Larry Wall <a href="mailto:larry@wall.org,">larry@wall.org,</a> for having the ideas which
807 have made our sleepless nights possible.</p>
808 <p>Thanks,
809 The VMSperl group</p>
810 <table border="0" width="100%" cellspacing="0" cellpadding="3">
811 <tr><td class="block" style="background-color: #cccccc" valign="middle">
812 <big><strong><span class="block">&nbsp;README.vms - Configuring, building, testing, and installing perl on VMS</span></strong></big>
813 </td></tr>
814 </table>
816 </body>
818 </html>