Penguin
Annotated edit history of perldos(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLDOS
2 !!!PERLDOS
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 BUILDING AND INSTALLING MODULES
7 AUTHOR
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 perldos - Perl under DOS , W31, W95.
14 !!SYNOPSIS
15
16
17 These are instructions for building Perl under
18 DOS (or w??), using DJGPP
19 v2.03 or later. Under w95 long filenames are
20 supported.
21 !!DESCRIPTION
22
23
24 Before you start, you should glance through the
25 README file found in the top-level directory
26 where the Perl distribution was extracted. Make sure you
27 read and understand the terms under which this software is
28 being distributed.
29
30
2 perry 31 This port currently supports !MakeMaker (the set of modules
1 perry 32 that is used to build extensions to perl). Therefore, you
33 should be able to build and install most extensions found in
34 the CPAN sites.
35
36
37 Detailed instructions on how to build and install perl
38 extension modules, including XS-type modules, is included.
39 See ' BUILDING AND INSTALLING MODULES
40 '.
41
42
43 __Prerequisites__
44
45
46 DJGPP
47
48
49 DJGPP is a port of GNU C/C
50 ++ compiler and development tools to 32-bit,
51 protected-mode environment on Intel 32-bit CPUs running
52 MS-DOS and compatible operating systems, by
53 DJ Delorie
54
55
56 For more details ( FAQ ), check out the home
57 of DJGPP at:
58
59
60 http://www.delorie.com/djgpp/
61 If you have questions about DJGPP , try posting to the DJGPP newsgroup: comp.os.msdos.djgpp, or use the email gateway djgpp@delorie.com.
62
63
64 You can find the full DJGPP distribution on
2 perry 65 any !SimTel.Net mirror all over the world. Like:
1 perry 66
67
68 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*
69 You need the following files to build perl (or add new modules):
70
71
72 v2/djdev203.zip
73 v2/bnu2951b.zip
74 v2gnu/gcc2952b.zip
75 v2gnu/bsh204b.zip
76 v2gnu/mak3791b.zip
77 v2gnu/fil316b.zip
78 v2gnu/sed302b.zip
79 v2gnu/txt20b.zip
80 v2gnu/dif272b.zip
81 v2gnu/grep24b.zip
82 v2gnu/shl112b.zip
83 v2gnu/gawk303b.zip
84 v2misc/csdpmi4b.zip
85 or possibly any newer version.
86
87
88 Pthreads
89
90
91 Thread support is not tested in this version of the djgpp
92 perl.
93
94
95 __Shortcomings of Perl under
96 DOS__
97
98
99 Perl under DOS lacks some features of perl
100 under UNIX because of deficiencies in the
101 UNIX-emulation, most notably:
102
103
104 ''fork()'' and ''pipe()''
105
106
107 some features of the UNIX filesystem
108 regarding link count and file dates
109
110
111 in-place operation is a little bit broken with short
112 filenames
113
114
115 sockets
116
117
118 __Building__
119
120
121 Unpack the source package ''perl5.6*.tar.gz'' with
122 djtarx. If you want to use long file names under w95 and
123 also to get Perl to pass all its tests, don't forget to
124 use
125
126
127 set LFN=y
128 set FNCASE=y
129 before unpacking the archive.
130
131
132 Create a ``symlink'' or copy your bash.exe to sh.exe in your
133 ($DJDIR)/bin directory.
134
135
136 ln -s bash.exe sh.exe
137 [[If you have the recommended version of bash for DJGPP , this is already done for you.]
138
139
140 And make the SHELL environment variable point to
141 this ''sh.exe'':
142
143
144 set SHELL=c:/djgpp/bin/sh.exe (use full path name!)
145 You can do this in ''djgpp.env'' too. Add this line BEFORE any section definition:
146
147
148 +SHELL=%DJDIR%/bin/sh.exe
149
150
151 If you have ''split.exe'' and ''gsplit.exe'' in your
152 path, then rename ''split.exe'' to ''djsplit.exe'',
153 and ''gsplit.exe'' to ''split.exe''. Copy or link
154 ''gecho.exe'' to ''echo.exe'' if you don't have
155 ''echo.exe''. Copy or link ''gawk.exe'' to
156 ''awk.exe'' if you don't have
157 ''awk.exe''.
158
159
160 [[If you have the recommended versions of djdev, shell
161 utilities and gawk, all these are already done for you, and
162 you will not need to do anything.]
163
164
165 Chdir to the djgpp subdirectory of perl toplevel and type
166 the following commands:
167
168
169 set FNCASE=y
170 configure.bat
171 This will do some preprocessing then run the Configure script for you. The Configure script is interactive, but in most cases you just need to press ENTER . The ``set'' command ensures that DJGPP preserves the letter case of file names when reading directories. If you already issued this set command when unpacking the archive, and you are in the same DOS session as when you unpacked the archive, you don't have to issue the set command again. This command is necessary *before* you start to (re)configure or (re)build perl in order to ensure both that perl builds correctly and that building XS-type modules can succeed. See the DJGPP info entry for ``_preserve_fncase'' for more information:
172
173
174 info libc alphabetical _preserve_fncase
175 If the script says that your package is incomplete, and asks whether to continue, just answer with Y (this can only happen if you don't use long filenames or forget to issue ``set FNCASE=y'' first).
176
177
178 When Configure asks about the extensions, I suggest
179 IO and Fcntl, and if you want database
180 handling then SDBM_File or GDBM_File (you need to install
181 gdbm for this one). If you want to use the
182 POSIX extension (this is the default), make
183 sure that the stack size of your ''cc1.exe'' is at least
184 512kbyte (you can check this with: stubedit
185 cc1.exe).
186
187
188 You can use the Configure script in non-interactive mode
189 too. When I built my ''perl.exe'', I used something like
190 this:
191
192
193 configure.bat -des
194 You can find more info about Configure's command line switches in the ''INSTALL'' file.
195
196
197 When the script ends, and you want to change some values in
198 the generated ''config.sh'' file, then run
199
200
201 sh Configure -S
202 after you made your modifications.
203
204
205 IMPORTANT: if you use this -S
206 switch, be sure to delete the CONFIG
207 environment variable before running the script:
208
209
210 set CONFIG=
211
212
213 Now you can compile Perl. Type:
214
215
216 make
217
218
219 __Testing__
220
221
222 Type:
223
224
225 make test
226 If you're lucky you should see ``All tests successful''. But there can be a few failed subtests (less than 5 hopefully) depending on some external conditions (e.g. some subtests fail under linux/dosemu or plain dos with short filenames only).
227
228
229 __Installation__
230
231
232 Type:
233
234
235 make install
236 This will copy the newly compiled perl and libraries into your DJGPP directory structure. Perl.exe and the utilities go into ($DJDIR)/bin, and the library goes under ($DJDIR)/lib/perl5. The pod documentation goes under ($DJDIR)/lib/perl5/pod.
237 !!BUILDING AND INSTALLING MODULES
238
239
240 __Prerequisites__
241
242
243 For building and installing non-XS modules, all you need is
244 a working perl under DJGPP . Non-XS modules
245 do not require re-linking the perl binary, and so are
246 simpler to build and install.
247
248
249 XS-type modules do require re-linking the perl binary,
250 because part of an XS module is written in
251 ``C'', and has to be linked together with the perl binary to
252 be executed. This is required because perl under
253 DJGPP is built with the ``static link''
254 option, due to the lack of ``dynamic linking'' in the
255 DJGPP environment.
256
257
258 Because XS modules require re-linking of the
259 perl binary, you need both the perl binary distribution and
260 the perl source distribution to build an XS
261 extension module. In addition, you will have to have built
262 your perl binary from the source distribution so that all of
263 the components of the perl binary are available for the
264 required link step.
265
266
267 __Unpacking CPAN Modules__
268
269
270 First, download the module package from CPAN
271 (e.g., the ``Comma Separated Value'' text package,
272 Text-CSV-0.01.tar.gz). Then expand the contents of the
273 package into some location on your disk. Most
274 CPAN modules are built with an internal
275 directory structure, so it is usually safe to expand it in
276 the root of your DJGPP installation. Some
277 people prefer to locate source trees under /usr/src (i.e.,
278 ($DJDIR)/usr/src), but you may put it wherever
279 seems most logical to you, *EXCEPT* under the same directory
280 as your perl source code. There are special rules that apply
281 to modules which live in the perl source tree that do not
282 apply to most of the modules in CPAN
283 .
284
285
286 Unlike other DJGPP packages, which are normal
287 ``zip'' files, most CPAN module packages are
2 perry 288 ``gzipped tarballs''. Recent versions of !WinZip will safely
1 perry 289 unpack and expand them, *UNLESS* they have zero-length
2 perry 290 files. It is a known !WinZip bug (as of v7.0) that it will
1 perry 291 not extract zero-length files.
292
293
294 From the command line, you can use the djtar utility
295 provided with DJGPP to unpack and expand
296 these files. For example:
297
298
299 C:djgpp
300 This will create the new directory ($DJDIR)/Text-CSV-0.01, filling it with the source for this module.
301
302
303 __Building Non-XS Modules__
304
305
306 To build a non-XS module, you can use the standard
307 module-building instructions distributed with perl
308 modules.
309
310
311 perl Makefile.PL
312 make
313 make test
314 make install
315 This is sufficient because non-XS modules install only ``.pm'' files and (sometimes) pod and/or man documentation. No re-linking of the perl binary is needed to build, install or use non-XS modules.
316
317
318 __Building XS Modules__
319
320
321 To build an XS module, you must use the
322 standard module-building instructions distributed with perl
323 modules *PLUS* three extra instructions specific to the
324 DJGPP ``static link'' build
325 environment.
326
327
328 set FNCASE=y
329 perl Makefile.PL
330 make
331 make perl
332 make test
333 make -f Makefile.aperl inst_perl MAP_TARGET=perl.exe
334 make install
335 The first extra instruction sets DJGPP 's FNCASE environment variable so that the new perl binary which you must build for an XS-type module will build correctly. The second extra instruction re-builds the perl binary in your module directory before you run ``make test'', so that you are testing with the new module code you built with ``make''. The third extra instruction installs the perl binary from your module directory into the standard DJGPP binary directory, ($DJDIR)/bin, replacing your previous perl binary.
336
337
338 Note that the MAP_TARGET value *must* have
339 the ``.exe'' extension or you will not create a ``perl.exe''
340 to replace the one in ($DJDIR)/bin.
341
342
343 When you are done, the XS-module install process will have
344 added information to yout ``perllocal'' information telling
345 that the perl binary has been replaced, and what module was
346 installed. you can view this information at any time by
347 using the command:
348
349
350 perl -S perldoc perllocal
351 !!AUTHOR
352
353
354 Laszlo Molnar, ''laszlo.molnar@eth.ericsson.se''
355 [[Installing/building perl]
356
357
358 Peter J. Farley III ''pjfarley@banet.net''
359 [[Building/installing modules]
360 !!SEE ALSO
361
362
363 perl(1).
364 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.