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