Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / man / man1 / perlmint.1
CommitLineData
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"
134README.mint \- Perl version 5 on Atari MiNT
135.SH "DESCRIPTION"
136.IX Header "DESCRIPTION"
137There is a binary version of perl available from the FreeMiNT project
138http://freemint.de/ You may wish to use this instead of trying to
139compile yourself.
140.PP
141\&\fBThe following advice is from perl 5.004_02 and is probably rather
142out of date.\fR
143.PP
144If you want to build perl yourself on MiNT (or maybe on an Atari without
145MiNT) you may want to accept some advice from somebody who already did it...
146.PP
147There was a perl port for Atari \s-1ST\s0 done by ++jrb bammi@cadence.com.
148This port tried very hard to build on non\-MiNT\-systems. For the
149sake of efficiency I've left this way. Yet, I haven't removed bammi's
150patches but left them intact. Unfortunately some of the files that
151bammi contributed to the perl distribution seem to have vanished?
152.PP
153So, how can you distinguish my patches from bammi's patches? All of
154bammi's stuff is embedded in \*(L"#ifdef atarist\*(R" preprocessor macros.
155My MiNT port uses \*(L"#ifdef _\|_MINT_\|_\*(R" instead (and unconditionally
156undefines \*(L"atarist\*(R". If you want to continue on bammi's port, all
157you have to do is to swap the \*(L"\-D\*(R" and \*(L"\-U\*(R" switches for \*(L"_\|_MINT_\|_\*(R"
158and \*(L"atarist\*(R" in the variable ccflags.
159.PP
160However, I think that my version will still run on non-MiNT-systems
161provided that the user has a Eunuchs-like environment (i.e. the
162standard 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"
166The problems you may encounter when building perl on your machine
167are most probably due to deficiencies in MiNT resp. the Atari
168platform in general.
169.PP
170First of all, if you have less than 8 \s-1MB\s0 of \s-1RAM\s0 you shouldn't
171even try to build Perl yourself. Better grab a binary pre-compiled
172version somewhere. Even if you have more memory you should take
173some care. Try to run in a fresh environment (without memory
174fragmented too much) with as few daemons, accessories, xcontrol
175modules etc. as possible. If you run some \s-1AES\s0 you should
176consider to start a console based environment instead.
177.PP
178A problem has been reported with sed. Sed is used to create
179some configuration files based on the answers you have given
180to the Configure script. Unfortunately the Perl Configure script
181shows sed on MiNT its limits. I have sed 2.05 with a stacksize
182of 64k and I have encountered no problems. If sed crashes
183during your configuration process you should first try to
184augment 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
191which other versions of sed are installed on your system.
192If you have a \s-1KGMD\s0 1.0 installation you will find three
193in /usr/bin. Have a look there.
194.PP
195Perl has some \*(L"mammut\*(R" C files. If gcc reports \*(L"internal
196compiler error: program cc1 got fatal signal 10\*(R" this is very
197likely due to a stack overflow in program cc1. Find cc1
198and fix its stack. I have made good experiences with
199.PP
200.Vb 1
201\& fixstk 2 cc1
202.Ve
203.PP
204This doesn't establish a stack of 2 Bytes only as you might
205think. It really reserves one half of the available memory
206for cc1's stack. A setting of 1 would reserve the entire
207memory for cc1, 3 would reserve three fourths. You will have
208to find out the value that suits to your system yourself.
209.PP
210To find out the location of the program \*(L"cc1\*(R" simply type
211`gcc \-\-print\-prog\-name cc1' at your shell prompt.
212.PP
213Now run make (maybe \*(L"make \-k\*(R"). If you get a fatal signal 10
214increase cc1's stacksize, if you run out of memory you should
215either decrease the stacksize or follow some more hints:
216.PP
217Perl's building process is very handy on machines with a lot
218of virtual memory but may result in a disaster if you are short
219of memory. If gcc fails to compile many source files you should
220reduce the optimization. Grep for \*(L"optimize\*(R" in the file
221config.sh and change the flags.
222.PP
223If only several huge files cause problems (actually it is not a
224matter of the file size resp. the amount of code but depends on
225the size of the individual functions) it is useful to bypass
226the make program and compile these files directly from the
227command line. For example if you got something like the
228following from make:
229.PP
230.Vb 3
231\& CCCMD = gcc -DPERL_CORE ....
232\& ...
233\& ...: virtual memory exhausted
234.Ve
235.PP
236you should hack into the shell:
237.PP
238.Vb 1
239\& gcc -DPERL_CORE ... toke.c
240.Ve
241.PP
242Please note that you have to add the name of the source file
243(here toke.c) at the end.
244.PP
245If none of this helps, you're helpless. Wait for a binary
246release. If you have succeeded you may encounter another problem
247at the linking process. If gcc complains that it can't find
248some libraries within the perl distribution you probably have
249an old linker. If it complains for example about \*(L"file not
250found for xxx.olb\*(R" you should cd into the directory in
251question and
252.PP
253.Vb 1
254\& ln -s libxxx.a xxx.olb
255.Ve
256.PP
257This will fix the problem.
258.PP
259This 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
274Pipes always cause problems with MiNT, it's actually a surprise that
275most of the tests did work. I've got no idea why the \*(L"tell\*(R" test failed,
276this shouldn't mean too big a problem however.
277.PP
278Most of the failures of lib/complex seem to be harmless, actually errors
279far right to the decimal point... Two failures seem to be serious:
280The sign of the results is reversed. I would say that this is due
281to minor bugs in the portable math lib that I compiled perl with.
282.PP
283I haven't bothered very much to find the reason for the failures
284with op/magic.t and op/stat.t. Maybe you'll find it out.
285.PP
286##########################################################################
287.PP
288Another possible problem may arise from the implementation of the \*(L"pwd\*(R"
289command. It happened to add a carriage return and newline to its output
290no matter what the setting of \f(CW$UNIXMODE\fR is. This is quite annoying since many
291library modules for perl take the output of pwd, chop off the
292trailing newline character and then expect to see a valid path in
293that. But the carriage return (last but second character!) isn't
294chopped off. You can either try to patch all library modules (at
295the price of performance for the extra transformation) or you can
296use my version of pwd that doesn't suffer from this deficiency.
297.PP
298The 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
301explicitly by:
302.PP
303.Vb 2
304\& cd mint
305\& make install
306.Ve
307.PP
308This is the fastest solution.
309.PP
310Just in case you want to go the hard way: perl won't even build with a
311broken pwd! You will have to fix the library modules
312(ext/POSIX/POSIX.pm, lib/Cwd.pm, lib/pwd.pl) at last after building
313miniperl.
314.PP
315A major nuisance of current MiNTLib versions is the implementation
316of \fIsystem()\fR which is far from being \s-1POSIX\s0 compliant. A real \fIsystem()\fR
317should fork and then exec /bin/sh with its argument as a command
318line to the shell. The MiNTLib \fIsystem()\fR however doesn't expect
319that every user has a \s-1POSIX\s0 shell in /bin/sh. It tries to work
320around the problem by forking and exec'ing the first token in its argument
321string. To get a little bit of compliance to \s-1POSIX\s0 \fIsystem()\fR it
322tries to handle at least redirection (\*(L"<\*(R" or \*(L">\*(R") on its own
323behalf.
324.PP
325This isn't a good idea since many programs expect that they can
326pass 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
328perl the Perl function \fIsystem()\fR will suffer from the same deficiencies.
329.PP
330You will find a fixed version of \fIsystem()\fR in the mint subdirectory.
331You 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
340If you are suspicious you should either back up your libc before
341or 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
343module somewhere before you succeed.
344.PP
345Anything missing? Yep, I've almost forgotten...
346No 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
368Have fun with Perl!
369.SH "AUTHOR"
370.IX Header "AUTHOR"
371Guido Flohr
372.PP
373.Vb 1
374\& mailto:guido@FreeMiNT.de
375.Ve