Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PERLMINT 1" | |
132 | .TH PERLMINT 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | README.mint \- Perl version 5 on Atari MiNT | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | There is a binary version of perl available from the FreeMiNT project | |
138 | http://freemint.de/ You may wish to use this instead of trying to | |
139 | compile yourself. | |
140 | .PP | |
141 | \&\fBThe following advice is from perl 5.004_02 and is probably rather | |
142 | out of date.\fR | |
143 | .PP | |
144 | If you want to build perl yourself on MiNT (or maybe on an Atari without | |
145 | MiNT) you may want to accept some advice from somebody who already did it... | |
146 | .PP | |
147 | There was a perl port for Atari \s-1ST\s0 done by ++jrb bammi@cadence.com. | |
148 | This port tried very hard to build on non\-MiNT\-systems. For the | |
149 | sake of efficiency I've left this way. Yet, I haven't removed bammi's | |
150 | patches but left them intact. Unfortunately some of the files that | |
151 | bammi contributed to the perl distribution seem to have vanished? | |
152 | .PP | |
153 | So, how can you distinguish my patches from bammi's patches? All of | |
154 | bammi's stuff is embedded in \*(L"#ifdef atarist\*(R" preprocessor macros. | |
155 | My MiNT port uses \*(L"#ifdef _\|_MINT_\|_\*(R" instead (and unconditionally | |
156 | undefines \*(L"atarist\*(R". If you want to continue on bammi's port, all | |
157 | you have to do is to swap the \*(L"\-D\*(R" and \*(L"\-U\*(R" switches for \*(L"_\|_MINT_\|_\*(R" | |
158 | and \*(L"atarist\*(R" in the variable ccflags. | |
159 | .PP | |
160 | However, I think that my version will still run on non-MiNT-systems | |
161 | provided that the user has a Eunuchs-like environment (i.e. the | |
162 | standard envariables like \f(CW$PATH\fR, \f(CW$HOME\fR, ... are set, there is a | |
163 | \&\s-1POSIX\s0 compliant shell in /bin/sh, and...) | |
164 | .SH "Known problems with Perl on MiNT" | |
165 | .IX Header "Known problems with Perl on MiNT" | |
166 | The problems you may encounter when building perl on your machine | |
167 | are most probably due to deficiencies in MiNT resp. the Atari | |
168 | platform in general. | |
169 | .PP | |
170 | First of all, if you have less than 8 \s-1MB\s0 of \s-1RAM\s0 you shouldn't | |
171 | even try to build Perl yourself. Better grab a binary pre-compiled | |
172 | version somewhere. Even if you have more memory you should take | |
173 | some care. Try to run in a fresh environment (without memory | |
174 | fragmented too much) with as few daemons, accessories, xcontrol | |
175 | modules etc. as possible. If you run some \s-1AES\s0 you should | |
176 | consider to start a console based environment instead. | |
177 | .PP | |
178 | A problem has been reported with sed. Sed is used to create | |
179 | some configuration files based on the answers you have given | |
180 | to the Configure script. Unfortunately the Perl Configure script | |
181 | shows sed on MiNT its limits. I have sed 2.05 with a stacksize | |
182 | of 64k and I have encountered no problems. If sed crashes | |
183 | during your configuration process you should first try to | |
184 | augment sed's stacksize: | |
185 | .PP | |
186 | .Vb 1 | |
187 | \& fixstk 64k /usr/bin/sed | |
188 | .Ve | |
189 | .PP | |
190 | (or similar). If it still doesn't help you may have a look | |
191 | which other versions of sed are installed on your system. | |
192 | If you have a \s-1KGMD\s0 1.0 installation you will find three | |
193 | in /usr/bin. Have a look there. | |
194 | .PP | |
195 | Perl has some \*(L"mammut\*(R" C files. If gcc reports \*(L"internal | |
196 | compiler error: program cc1 got fatal signal 10\*(R" this is very | |
197 | likely due to a stack overflow in program cc1. Find cc1 | |
198 | and fix its stack. I have made good experiences with | |
199 | .PP | |
200 | .Vb 1 | |
201 | \& fixstk 2 cc1 | |
202 | .Ve | |
203 | .PP | |
204 | This doesn't establish a stack of 2 Bytes only as you might | |
205 | think. It really reserves one half of the available memory | |
206 | for cc1's stack. A setting of 1 would reserve the entire | |
207 | memory for cc1, 3 would reserve three fourths. You will have | |
208 | to find out the value that suits to your system yourself. | |
209 | .PP | |
210 | To find out the location of the program \*(L"cc1\*(R" simply type | |
211 | `gcc \-\-print\-prog\-name cc1' at your shell prompt. | |
212 | .PP | |
213 | Now run make (maybe \*(L"make \-k\*(R"). If you get a fatal signal 10 | |
214 | increase cc1's stacksize, if you run out of memory you should | |
215 | either decrease the stacksize or follow some more hints: | |
216 | .PP | |
217 | Perl's building process is very handy on machines with a lot | |
218 | of virtual memory but may result in a disaster if you are short | |
219 | of memory. If gcc fails to compile many source files you should | |
220 | reduce the optimization. Grep for \*(L"optimize\*(R" in the file | |
221 | config.sh and change the flags. | |
222 | .PP | |
223 | If only several huge files cause problems (actually it is not a | |
224 | matter of the file size resp. the amount of code but depends on | |
225 | the size of the individual functions) it is useful to bypass | |
226 | the make program and compile these files directly from the | |
227 | command line. For example if you got something like the | |
228 | following from make: | |
229 | .PP | |
230 | .Vb 3 | |
231 | \& CCCMD = gcc -DPERL_CORE .... | |
232 | \& ... | |
233 | \& ...: virtual memory exhausted | |
234 | .Ve | |
235 | .PP | |
236 | you should hack into the shell: | |
237 | .PP | |
238 | .Vb 1 | |
239 | \& gcc -DPERL_CORE ... toke.c | |
240 | .Ve | |
241 | .PP | |
242 | Please note that you have to add the name of the source file | |
243 | (here toke.c) at the end. | |
244 | .PP | |
245 | If none of this helps, you're helpless. Wait for a binary | |
246 | release. If you have succeeded you may encounter another problem | |
247 | at the linking process. If gcc complains that it can't find | |
248 | some libraries within the perl distribution you probably have | |
249 | an old linker. If it complains for example about \*(L"file not | |
250 | found for xxx.olb\*(R" you should cd into the directory in | |
251 | question and | |
252 | .PP | |
253 | .Vb 1 | |
254 | \& ln -s libxxx.a xxx.olb | |
255 | .Ve | |
256 | .PP | |
257 | This will fix the problem. | |
258 | .PP | |
259 | This version (5.00402) of perl has passed most of the tests on my system: | |
260 | .PP | |
261 | .Vb 10 | |
262 | \& Failed Test Status Wstat Total Fail Failed List of failed | |
263 | \& ------------------------------------------------------------------------------ | |
264 | \& io/pipe.t 10 2 20.00% 7, 9 | |
265 | \& io/tell.t 13 1 7.69% 12 | |
266 | \& lib/complex.t 762 13 1.71% 84-85, 248-251, 257, 272-273, | |
267 | \& 371, 380, 419-420 | |
268 | \& lib/io_pipe.t 10 1 10.00% 9 | |
269 | \& lib/io_tell.t 13 1 7.69% 12 | |
270 | \& op/magic.t 30 2 6.67% 29-30 | |
271 | \& Failed 6/152 test scripts, 96.05% okay. 20/4359 subtests failed, 99.54% okay. | |
272 | .Ve | |
273 | .PP | |
274 | Pipes always cause problems with MiNT, it's actually a surprise that | |
275 | most of the tests did work. I've got no idea why the \*(L"tell\*(R" test failed, | |
276 | this shouldn't mean too big a problem however. | |
277 | .PP | |
278 | Most of the failures of lib/complex seem to be harmless, actually errors | |
279 | far right to the decimal point... Two failures seem to be serious: | |
280 | The sign of the results is reversed. I would say that this is due | |
281 | to minor bugs in the portable math lib that I compiled perl with. | |
282 | .PP | |
283 | I haven't bothered very much to find the reason for the failures | |
284 | with op/magic.t and op/stat.t. Maybe you'll find it out. | |
285 | .PP | |
286 | ########################################################################## | |
287 | .PP | |
288 | Another possible problem may arise from the implementation of the \*(L"pwd\*(R" | |
289 | command. It happened to add a carriage return and newline to its output | |
290 | no matter what the setting of \f(CW$UNIXMODE\fR is. This is quite annoying since many | |
291 | library modules for perl take the output of pwd, chop off the | |
292 | trailing newline character and then expect to see a valid path in | |
293 | that. But the carriage return (last but second character!) isn't | |
294 | chopped off. You can either try to patch all library modules (at | |
295 | the price of performance for the extra transformation) or you can | |
296 | use my version of pwd that doesn't suffer from this deficiency. | |
297 | .PP | |
298 | The fixed implementation is in the mint subdirectory. Running | |
299 | \&\*(L"Configure\*(R" will attempt to build and install it if necessary | |
300 | (hints/mint.sh will do this work) but you can build and install it | |
301 | explicitly by: | |
302 | .PP | |
303 | .Vb 2 | |
304 | \& cd mint | |
305 | \& make install | |
306 | .Ve | |
307 | .PP | |
308 | This is the fastest solution. | |
309 | .PP | |
310 | Just in case you want to go the hard way: perl won't even build with a | |
311 | broken pwd! You will have to fix the library modules | |
312 | (ext/POSIX/POSIX.pm, lib/Cwd.pm, lib/pwd.pl) at last after building | |
313 | miniperl. | |
314 | .PP | |
315 | A major nuisance of current MiNTLib versions is the implementation | |
316 | of \fIsystem()\fR which is far from being \s-1POSIX\s0 compliant. A real \fIsystem()\fR | |
317 | should fork and then exec /bin/sh with its argument as a command | |
318 | line to the shell. The MiNTLib \fIsystem()\fR however doesn't expect | |
319 | that every user has a \s-1POSIX\s0 shell in /bin/sh. It tries to work | |
320 | around the problem by forking and exec'ing the first token in its argument | |
321 | string. To get a little bit of compliance to \s-1POSIX\s0 \fIsystem()\fR it | |
322 | tries to handle at least redirection (\*(L"<\*(R" or \*(L">\*(R") on its own | |
323 | behalf. | |
324 | .PP | |
325 | This isn't a good idea since many programs expect that they can | |
326 | pass a command line to \fIsystem()\fR that exploits all features of a | |
327 | \&\s-1POSIX\s0 shell. If you use the MiNTLib version of \fIsystem()\fR with | |
328 | perl the Perl function \fIsystem()\fR will suffer from the same deficiencies. | |
329 | .PP | |
330 | You will find a fixed version of \fIsystem()\fR in the mint subdirectory. | |
331 | You can easily insert this version into your system libc: | |
332 | .PP | |
333 | .Vb 4 | |
334 | \& cd mint | |
335 | \& make system.o | |
336 | \& ar r /usr/lib/libc.a | |
337 | \& ranlib /usr/lib/libc.a | |
338 | .Ve | |
339 | .PP | |
340 | If you are suspicious you should either back up your libc before | |
341 | or extract the original system.o from your libc with | |
342 | \&\*(L"ar x /usr/lib/libc.a system.o\*(R". You can then backup the system.o | |
343 | module somewhere before you succeed. | |
344 | .PP | |
345 | Anything missing? Yep, I've almost forgotten... | |
346 | No file in this distribution without a fine saying. Take this one: | |
347 | .PP | |
348 | .Vb 11 | |
349 | \& "From a thief you should learn: (1) to work at night; | |
350 | \& (2) if one cannot gain what one wants in one night to | |
351 | \& try again the next night; (3) to love one's coworkers | |
352 | \& just as thieves love each other; (4) to be willing to | |
353 | \& risk one's life even for a little thing; (5) not to | |
354 | \& attach too much value to things even though one has | |
355 | \& risked one's life for them - just as a thief will resell | |
356 | \& a stolen article for a fraction of its real value; | |
357 | \& (6) to withstand all kinds of beatings and tortures | |
358 | \& but to remain what you are; and (7) to believe your | |
359 | \& work is worthwhile and not be willing to change it." | |
360 | .Ve | |
361 | .PP | |
362 | .Vb 1 | |
363 | \& -- Rabbi Dov Baer, Maggid of Mezeritch | |
364 | .Ve | |
365 | .PP | |
366 | \&\s-1OK\s0, this was my motto while working on Perl for MiNT, especially rule (1)... | |
367 | .PP | |
368 | Have fun with Perl! | |
369 | .SH "AUTHOR" | |
370 | .IX Header "AUTHOR" | |
371 | Guido Flohr | |
372 | .PP | |
373 | .Vb 1 | |
374 | \& mailto:guido@FreeMiNT.de | |
375 | .Ve |