Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / man / man1 / perlaix.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 "PERLAIX 1"
132.TH PERLAIX 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide"
133.SH "NAME"
134README.aix \- Perl version 5 on IBM Unix (AIX) systems
135.SH "DESCRIPTION"
136.IX Header "DESCRIPTION"
137This document describes various features of \s-1IBM\s0's Unix operating
138system (\s-1AIX\s0) that will affect how Perl version 5 (hereafter just Perl)
139is compiled and/or runs.
140.Sh "Compiling Perl 5 on \s-1AIX\s0"
141.IX Subsection "Compiling Perl 5 on AIX"
142When compiling Perl, you must use an \s-1ANSI\s0 C compiler. \s-1AIX\s0 does not ship
143an \s-1ANSI\s0 compliant C\-compiler with \s-1AIX\s0 by default, but binary builds of
144gcc for \s-1AIX\s0 are widely available.
145.PP
146At the moment of writing, \s-1AIX\s0 supports two different native C compilers,
147for which you have to pay: \fBxlC\fR and \fBvac\fR. If you decide to use either
148of these two (which is quite a lot easier than using gcc), be sure to
149upgrade to the latest available patch level. Currently:
150.PP
151.Vb 2
152\& xlC.C 3.1.4.10 or 3.6.6.0 or 4.0.2.2 or 5.0.2.9 or 6.0.0.3
153\& vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1
154.Ve
155.PP
156note that xlC has the \s-1OS\s0 version in the name as of version 4.0.2.0, so
157you will find xlC.C for \s-1AIX\-5\s0.0 as package
158.PP
159.Vb 1
160\& xlC.aix50.rte 5.0.2.0 or 6.0.0.3
161.Ve
162.PP
163subversions are not the same \*(L"latest\*(R" on all \s-1OS\s0 versions. For example,
164the latest xlC\-5 on aix41 is 5.0.2.9, while on aix43, it is 5.0.2.7.
165.PP
166Perl can be compiled with either \s-1IBM\s0's \s-1ANSI\s0 C compiler or with gcc.
167The former is recommended, as not only can it compile Perl with no
168difficulty, but also can take advantage of features listed later that
169require the use of \s-1IBM\s0 compiler-specific command-line flags.
170.PP
171The \s-1IBM\s0's compiler patch levels 5.0.0.0 and 5.0.1.0 have compiler
172optimization bugs that affect compiling perl.c and regcomp.c,
173respectively. If Perl's configuration detects those compiler patch
174levels, optimization is turned off for the said source code files.
175Upgrading to at least 5.0.2.0 is recommended.
176.PP
177If you decide to use gcc, make sure your installation is recent and
178complete, and be sure to read the Perl \s-1README\s0 file for more gcc-specific
179details. Please report any hoops you had to jump through to the development
180team.
181.Sh "\s-1OS\s0 level"
182.IX Subsection "OS level"
183Before installing the patches to the \s-1IBM\s0 C\-compiler you need to know the
184level of patching for the Operating System. \s-1IBM\s0's command 'oslevel' will
185show the base, but is not always complete (in this example oslevel shows
1864.3.NULL, whereas the system might run most of 4.3.THREE):
187.PP
188.Vb 6
189\& # oslevel
190\& 4.3.0.0
191\& # lslpp -l | grep 'bos.rte '
192\& bos.rte 4.3.3.75 COMMITTED Base Operating System Runtime
193\& bos.rte 4.3.2.0 COMMITTED Base Operating System Runtime
194\& #
195.Ve
196.PP
197The same might happen to \s-1AIX\s0 5.1 or other \s-1OS\s0 levels. As a side note, perl
198cannot be built without bos.adt.syscalls and bos.adt.libm installed
199.PP
200.Vb 4
201\& # lslpp -l | egrep "syscalls|libm"
202\& bos.adt.libm 5.1.0.25 COMMITTED Base Application Development
203\& bos.adt.syscalls 5.1.0.36 COMMITTED System Calls Application
204\& #
205.Ve
206.Sh "Building Dynamic Extensions on \s-1AIX\s0"
207.IX Subsection "Building Dynamic Extensions on AIX"
208\&\s-1AIX\s0 supports dynamically loadable objects as well as shared libraries.
209Shared libraries by convention end with the suffix .a, which is a bit
210misleading, as an archive can contain static as well as dynamic members.
211For perl dynamically loaded objects we use the .so suffix also used on
212many other platforms.
213.PP
214Note that starting from Perl 5.7.2 (and consequently 5.8.0) and \s-1AIX\s0 4.3
215or newer Perl uses the \s-1AIX\s0 native dynamic loading interface in the so
216called runtime linking mode instead of the emulated interface that was
217used in Perl releases 5.6.1 and earlier or, for \s-1AIX\s0 releases 4.2 and
218earlier. This change does break backward compatibility with compiled
219modules from earlier perl releases. The change was made to make Perl
220more compliant with other applications like Apache/mod_perl which are
221using the \s-1AIX\s0 native interface. This change also enables the use of \*(C+
222code with static constructors and destructors in perl extensions, which
223was not possible using the emulated interface.
224.Sh "The \s-1IBM\s0 \s-1ANSI\s0 C Compiler"
225.IX Subsection "The IBM ANSI C Compiler"
226All defaults for Configure can be used.
227.PP
228If you've chosen to use vac 4, be sure to run 4.4.0.3. Older versions
229will turn up nasty later on. For vac 5 be sure to run at least 5.0.1.0,
230but vac 5.0.2.6 or up is highly recommended. Note that since \s-1IBM\s0 has
231removed vac 5.0.2.1 through 5.0.2.5 from the software depot, these
232versions should be considered obsolete.
233.PP
234Here's a brief lead of how to upgrade the compiler to the latest
235level. Of course this is subject to changes. You can only upgrade
236versions from ftp-available updates if the first three digit groups
237are the same (in where you can skip intermediate unlike the patches
238in the developer snapshots of perl), or to one version up where the
239\&\*(L"base\*(R" is available. In other words, the \s-1AIX\s0 compiler patches are
240cumulative.
241.PP
242.Vb 2
243\& vac.C.4.4.0.1 => vac.C.4.4.0.3 is OK (vac.C.4.4.0.2 not needed)
244\& xlC.C.3.1.3.3 => xlC.C.3.1.4.10 is NOT OK (xlC.C.3.1.4.0 is not available)
245.Ve
246.PP
247.Vb 23
248\& # ftp ftp.software.ibm.com
249\& Connected to service.boulder.ibm.com.
250\& : welcome message ...
251\& Name (ftp.software.ibm.com:merijn): anonymous
252\& 331 Guest login ok, send your complete e-mail address as password.
253\& Password:
254\& ... accepted login stuff
255\& ftp> cd /aix/fixes/v4/
256\& ftp> dir other other.ll
257\& output to local-file: other.ll? y
258\& 200 PORT command successful.
259\& 150 Opening ASCII mode data connection for /bin/ls.
260\& 226 Transfer complete.
261\& ftp> dir xlc xlc.ll
262\& output to local-file: xlc.ll? y
263\& 200 PORT command successful.
264\& 150 Opening ASCII mode data connection for /bin/ls.
265\& 226 Transfer complete.
266\& ftp> bye
267\& ... goodbye messages
268\& # ls -l *.ll
269\& -rw-rw-rw- 1 merijn system 1169432 Nov 2 17:29 other.ll
270\& -rw-rw-rw- 1 merijn system 29170 Nov 2 17:29 xlc.ll
271.Ve
272.PP
273On \s-1AIX\s0 4.2 using xlC, we continue:
274.PP
275.Vb 16
276\& # lslpp -l | fgrep 'xlC.C '
277\& xlC.C 3.1.4.9 COMMITTED C for AIX Compiler
278\& xlC.C 3.1.4.0 COMMITTED C for AIX Compiler
279\& # grep 'xlC.C.3.1.4.*.bff' xlc.ll
280\& -rw-r--r-- 1 45776101 1 6286336 Jul 22 1996 xlC.C.3.1.4.1.bff
281\& -rw-rw-r-- 1 45776101 1 6173696 Aug 24 1998 xlC.C.3.1.4.10.bff
282\& -rw-r--r-- 1 45776101 1 6319104 Aug 14 1996 xlC.C.3.1.4.2.bff
283\& -rw-r--r-- 1 45776101 1 6316032 Oct 21 1996 xlC.C.3.1.4.3.bff
284\& -rw-r--r-- 1 45776101 1 6315008 Dec 20 1996 xlC.C.3.1.4.4.bff
285\& -rw-rw-r-- 1 45776101 1 6178816 Mar 28 1997 xlC.C.3.1.4.5.bff
286\& -rw-rw-r-- 1 45776101 1 6188032 May 22 1997 xlC.C.3.1.4.6.bff
287\& -rw-rw-r-- 1 45776101 1 6191104 Sep 5 1997 xlC.C.3.1.4.7.bff
288\& -rw-rw-r-- 1 45776101 1 6185984 Jan 13 1998 xlC.C.3.1.4.8.bff
289\& -rw-rw-r-- 1 45776101 1 6169600 May 27 1998 xlC.C.3.1.4.9.bff
290\& # wget ftp://ftp.software.ibm.com/aix/fixes/v4/xlc/xlC.C.3.1.4.10.bff
291\& #
292.Ve
293.PP
294On \s-1AIX\s0 4.3 using vac, we continue:
295.PP
296.Vb 10
297\& # lslpp -l | grep 'vac.C '
298\& vac.C 5.0.2.2 COMMITTED C for AIX Compiler
299\& vac.C 5.0.2.0 COMMITTED C for AIX Compiler
300\& # grep 'vac.C.5.0.2.*.bff' other.ll
301\& -rw-rw-r-- 1 45776101 1 13592576 Apr 16 2001 vac.C.5.0.2.0.bff
302\& -rw-rw-r-- 1 45776101 1 14133248 Apr 9 2002 vac.C.5.0.2.3.bff
303\& -rw-rw-r-- 1 45776101 1 14173184 May 20 2002 vac.C.5.0.2.4.bff
304\& -rw-rw-r-- 1 45776101 1 14192640 Nov 22 2002 vac.C.5.0.2.6.bff
305\& # wget ftp://ftp.software.ibm.com/aix/fixes/v4/other/vac.C.5.0.2.6.bff
306\& #
307.Ve
308.PP
309Likewise on all other \s-1OS\s0 levels. Then execute the following command, and
310fill in its choices
311.PP
312.Vb 5
313\& # smit install_update
314\& -> Install and Update from LATEST Available Software
315\& * INPUT device / directory for software [ vac.C.5.0.2.6.bff ]
316\& [ OK ]
317\& [ OK ]
318.Ve
319.PP
320Follow the messages ... and you're done.
321.PP
322If you like a more web-like approach, a good start point can be
323http://www14.software.ibm.com/webapp/download/downloadaz.jsp and click
324\&\*(L"C for \s-1AIX\s0\*(R", and follow the instructions.
325.Sh "The usenm option"
326.IX Subsection "The usenm option"
327If linking miniperl
328.PP
329.Vb 1
330\& cc -o miniperl ... miniperlmain.o opmini.o perl.o ... -lm -lc ...
331.Ve
332.PP
333causes error like this
334.PP
335.Vb 8
336\& ld: 0711-317 ERROR: Undefined symbol: .aintl
337\& ld: 0711-317 ERROR: Undefined symbol: .copysignl
338\& ld: 0711-317 ERROR: Undefined symbol: .syscall
339\& ld: 0711-317 ERROR: Undefined symbol: .eaccess
340\& ld: 0711-317 ERROR: Undefined symbol: .setresuid
341\& ld: 0711-317 ERROR: Undefined symbol: .setresgid
342\& ld: 0711-317 ERROR: Undefined symbol: .setproctitle
343\& ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
344.Ve
345.PP
346you could retry with
347.PP
348.Vb 3
349\& make realclean
350\& rm config.sh
351\& ./Configure -Dusenm ...
352.Ve
353.PP
354which makes Configure to use the \f(CW\*(C`nm\*(C'\fR tool when scanning for library
355symbols, which usually is not done in \s-1AIX\s0.
356.PP
357Related to this, you probably should not use the \f(CW\*(C`\-r\*(C'\fR option of
358Configure in \s-1AIX\s0, because that affects of how the \f(CW\*(C`nm\*(C'\fR tool is used.
359.Sh "Using \s-1GNU\s0's gcc for building perl"
360.IX Subsection "Using GNU's gcc for building perl"
361Using gcc\-3.x (tested with 3.0.4, 3.1, and 3.2) now works out of the box,
362as do recent gcc\-2.9 builds available directly from \s-1IBM\s0 as part of their
363Linux compatibility packages, available here:
364.PP
365.Vb 1
366\& http://www.ibm.com/servers/aix/products/aixos/linux/
367.Ve
368.Sh "Using Large Files with Perl"
369.IX Subsection "Using Large Files with Perl"
370Should yield no problems.
371.Sh "Threaded Perl"
372.IX Subsection "Threaded Perl"
373Threads seem to work \s-1OK\s0, though at the moment not all tests pass when
374threads are used in combination with 64\-bit configurations.
375.PP
376You may get a warning when doing a threaded build:
377.PP
378.Vb 1
379\& "pp_sys.c", line 4640.39: 1506-280 (W) Function argument assignment between types "unsigned char*" and "const void*" is not allowed.
380.Ve
381.PP
382The exact line number may vary, but if the warning (W) comes from a line
383line this
384.PP
385.Vb 1
386\& hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
387.Ve
388.PP
389in the \*(L"pp_ghostent\*(R" function, you may ignore it safely. The warning
390is caused by the reentrant variant of \fIgethostbyaddr()\fR having a slightly
391different prototype than its non-reentrant variant, but the difference
392is not really significant here.
393.Sh "64\-bit Perl"
394.IX Subsection "64-bit Perl"
395If your \s-1AIX\s0 is installed with 64\-bit support, you can expect 64\-bit
396configurations to work. In combination with threads some tests might
397still fail.
398.Sh "\s-1AIX\s0 4.2 and extensions using \*(C+ with statics"
399.IX Subsection "AIX 4.2 and extensions using with statics"
400In \s-1AIX\s0 4.2 Perl extensions that use \*(C+ functions that use statics
401may have problems in that the statics are not getting initialized.
402In newer \s-1AIX\s0 releases this has been solved by linking Perl with
403the libC_r library, but unfortunately in \s-1AIX\s0 4.2 the said library
404has an obscure bug where the various functions related to time
405(such as \fItime()\fR and \fIgettimeofday()\fR) return broken values, and
406therefore in \s-1AIX\s0 4.2 Perl is not linked against the libC_r.
407.SH "AUTHOR"
408.IX Header "AUTHOR"
409H.Merijn Brand <h.m.brand@xs4all.nl>
410.SH "DATE"
411.IX Header "DATE"
412Version 0.0.6: 23 Dec 2002