| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "PERLAIX 1" |
| 58 |
.TH PERLAIX 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
perlaix \- Perl version 5 on IBM AIX (UNIX) systems |
| 65 |
.SH DESCRIPTION |
| 66 |
.IX Header "DESCRIPTION" |
| 67 |
This document describes various features of IBM's UNIX operating |
| 68 |
system AIX that will affect how Perl version 5 (hereafter just Perl) |
| 69 |
is compiled and/or runs. |
| 70 |
.SS "Compiling Perl 5 on AIX" |
| 71 |
.IX Subsection "Compiling Perl 5 on AIX" |
| 72 |
For information on compilers on older versions of AIX, see "Compiling |
| 73 |
Perl 5 on older AIX versions up to 4.3.3". |
| 74 |
.PP |
| 75 |
When compiling Perl, you must use an ANSI C compiler. AIX does not ship |
| 76 |
an ANSI compliant C compiler with AIX by default, but binary builds of |
| 77 |
gcc for AIX are widely available. A version of gcc is also included in |
| 78 |
the AIX Toolbox which is shipped with AIX. |
| 79 |
.SS "Supported Compilers" |
| 80 |
.IX Subsection "Supported Compilers" |
| 81 |
Currently all versions of IBM's "xlc", "xlc_r", "cc", "cc_r" or |
| 82 |
"vac" ANSI/C compiler will work for building Perl if that compiler |
| 83 |
works on your system. |
| 84 |
.PP |
| 85 |
If you plan to link Perl to any module that requires thread-support, |
| 86 |
like DBD::Oracle, it is better to use the _r version of the compiler. |
| 87 |
This will not build a threaded Perl, but a thread-enabled Perl. See |
| 88 |
also "Threaded Perl" later on. |
| 89 |
.PP |
| 90 |
As of writing (2010\-09) only the \fIIBM XL C for AIX\fR or \fIIBM XL C/C++ |
| 91 |
for AIX\fR compiler is supported by IBM on AIX 5L/6.1/7.1. |
| 92 |
.PP |
| 93 |
The following compiler versions are currently supported by IBM: |
| 94 |
.PP |
| 95 |
.Vb 1 |
| 96 |
\& IBM XL C and IBM XL C/C++ V8, V9, V10, V11 |
| 97 |
.Ve |
| 98 |
.PP |
| 99 |
The XL C for AIX is integrated in the XL C/C++ for AIX compiler and |
| 100 |
therefore also supported. |
| 101 |
.PP |
| 102 |
If you choose XL C/C++ V9 you need APAR IZ35785 installed |
| 103 |
otherwise the integrated SDBM_File do not compile correctly due |
| 104 |
to an optimization bug. You can circumvent this problem by |
| 105 |
adding \-qipa to the optimization flags (\-Doptimize='\-O \-qipa'). |
| 106 |
The PTF for APAR IZ35785 which solves this problem is available |
| 107 |
from IBM (April 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0). |
| 108 |
.PP |
| 109 |
If you choose XL C/C++ V11 you need the April 2010 PTF (or newer) |
| 110 |
installed otherwise you will not get a working Perl version. |
| 111 |
.PP |
| 112 |
Perl can be compiled with either IBM's ANSI C compiler or with gcc. |
| 113 |
The former is recommended, as not only it can compile Perl with no |
| 114 |
difficulty, but also can take advantage of features listed later |
| 115 |
that require the use of IBM compiler-specific command-line flags. |
| 116 |
.PP |
| 117 |
If you decide to use gcc, make sure your installation is recent and |
| 118 |
complete, and be sure to read the Perl INSTALL file for more gcc-specific |
| 119 |
details. Please report any hoops you had to jump through to the |
| 120 |
development team. |
| 121 |
.SS "Incompatibility with AIX Toolbox lib gdbm" |
| 122 |
.IX Subsection "Incompatibility with AIX Toolbox lib gdbm" |
| 123 |
If the AIX Toolbox version of lib gdbm < 1.8.3\-5 is installed on your |
| 124 |
system then Perl will not work. This library contains the header files |
| 125 |
/opt/freeware/include/gdbm/dbm.h|ndbm.h which conflict with the AIX |
| 126 |
system versions. The lib gdbm will be automatically removed from the |
| 127 |
wanted libraries if the presence of one of these two header files is |
| 128 |
detected. If you want to build Perl with GDBM support then please install |
| 129 |
at least gdbm\-devel\-1.8.3\-5 (or higher). |
| 130 |
.SS "Perl 5 was successfully compiled and tested on:" |
| 131 |
.IX Subsection "Perl 5 was successfully compiled and tested on:" |
| 132 |
.Vb 10 |
| 133 |
\& Perl | AIX Level | Compiler Level | w th | w/o th |
| 134 |
\& \-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\- |
| 135 |
\& 5.12.2 |5.1 TL9 32 bit | XL C/C++ V7 | OK | OK |
| 136 |
\& 5.12.2 |5.1 TL9 64 bit | XL C/C++ V7 | OK | OK |
| 137 |
\& 5.12.2 |5.2 TL10 SP8 32 bit | XL C/C++ V8 | OK | OK |
| 138 |
\& 5.12.2 |5.2 TL10 SP8 32 bit | gcc 3.2.2 | OK | OK |
| 139 |
\& 5.12.2 |5.2 TL10 SP8 64 bit | XL C/C++ V8 | OK | OK |
| 140 |
\& 5.12.2 |5.3 TL8 SP8 32 bit | XL C/C++ V9 + IZ35785 | OK | OK |
| 141 |
\& 5.12.2 |5.3 TL8 SP8 32 bit | gcc 4.2.4 | OK | OK |
| 142 |
\& 5.12.2 |5.3 TL8 SP8 64 bit | XL C/C++ V9 + IZ35785 | OK | OK |
| 143 |
\& 5.12.2 |5.3 TL10 SP3 32 bit | XL C/C++ V11 + Apr 2010 | OK | OK |
| 144 |
\& 5.12.2 |5.3 TL10 SP3 64 bit | XL C/C++ V11 + Apr 2010 | OK | OK |
| 145 |
\& 5.12.2 |6.1 TL1 SP7 32 bit | XL C/C++ V10 | OK | OK |
| 146 |
\& 5.12.2 |6.1 TL1 SP7 64 bit | XL C/C++ V10 | OK | OK |
| 147 |
\& 5.13 |7.1 TL0 SP1 32 bit | XL C/C++ V11 + Jul 2010 | OK | OK |
| 148 |
\& 5.13 |7.1 TL0 SP1 64 bit | XL C/C++ V11 + Jul 2010 | OK | OK |
| 149 |
\& |
| 150 |
\& w th = with thread support |
| 151 |
\& w/o th = without thread support |
| 152 |
\& OK = tested |
| 153 |
.Ve |
| 154 |
.PP |
| 155 |
Successfully tested means that all "make test" runs finish with a |
| 156 |
result of 100% OK. All tests were conducted with \-Duseshrplib set. |
| 157 |
.PP |
| 158 |
All tests were conducted on the oldest supported AIX technology level |
| 159 |
with the latest support package applied. If the tested AIX version is |
| 160 |
out of support (AIX 4.3.3, 5.1, 5.2) then the last available support |
| 161 |
level was used. |
| 162 |
.SS "Building Dynamic Extensions on AIX" |
| 163 |
.IX Subsection "Building Dynamic Extensions on AIX" |
| 164 |
Starting from Perl 5.7.2 (and consequently 5.8.x / 5.10.x / 5.12.x) |
| 165 |
and AIX 4.3 or newer Perl uses the AIX native dynamic loading interface |
| 166 |
in the so called runtime linking mode instead of the emulated interface |
| 167 |
that was used in Perl releases 5.6.1 and earlier or, for AIX releases |
| 168 |
4.2 and earlier. This change does break backward compatibility with |
| 169 |
compiled modules from earlier Perl releases. The change was made to make |
| 170 |
Perl more compliant with other applications like Apache/mod_perl which are |
| 171 |
using the AIX native interface. This change also enables the use of |
| 172 |
C++ code with static constructors and destructors in Perl extensions, |
| 173 |
which was not possible using the emulated interface. |
| 174 |
.PP |
| 175 |
It is highly recommended to use the new interface. |
| 176 |
.SS "Using Large Files with Perl" |
| 177 |
.IX Subsection "Using Large Files with Perl" |
| 178 |
Should yield no problems. |
| 179 |
.SS "Threaded Perl" |
| 180 |
.IX Subsection "Threaded Perl" |
| 181 |
Should yield no problems with AIX 5.1 / 5.2 / 5.3 / 6.1 / 7.1. |
| 182 |
.PP |
| 183 |
IBM uses the AIX system Perl (V5.6.0 on AIX 5.1 and V5.8.2 on |
| 184 |
AIX 5.2 / 5.3 and 6.1; V5.8.8 on AIX 5.3 TL11 and AIX 6.1 TL4; V5.10.1 |
| 185 |
on AIX 7.1) for some AIX system scripts. If you switch the links in |
| 186 |
/usr/bin from the AIX system Perl (/usr/opt/perl5) to the newly build |
| 187 |
Perl then you get the same features as with the IBM AIX system Perl if |
| 188 |
the threaded options are used. |
| 189 |
.PP |
| 190 |
The threaded Perl build works also on AIX 5.1 but the IBM Perl |
| 191 |
build (Perl v5.6.0) is not threaded on AIX 5.1. |
| 192 |
.PP |
| 193 |
Perl 5.12 an newer is not compatible with the IBM fileset perl.libext. |
| 194 |
.SS "64\-bit Perl" |
| 195 |
.IX Subsection "64-bit Perl" |
| 196 |
If your AIX system is installed with 64\-bit support, you can expect 64\-bit |
| 197 |
configurations to work. If you want to use 64\-bit Perl on AIX 6.1 |
| 198 |
you need an APAR for a libc.a bug which affects (n)dbm_XXX functions. |
| 199 |
The APAR number for this problem is IZ39077. |
| 200 |
.PP |
| 201 |
If you need more memory (larger data segment) for your Perl programs you |
| 202 |
can set: |
| 203 |
.PP |
| 204 |
.Vb 3 |
| 205 |
\& /etc/security/limits |
| 206 |
\& default: (or your user) |
| 207 |
\& data = \-1 (default is 262144 * 512 byte) |
| 208 |
.Ve |
| 209 |
.PP |
| 210 |
With the default setting the size is limited to 128MB. |
| 211 |
The \-1 removes this limit. If the "make test" fails please change |
| 212 |
your /etc/security/limits as stated above. |
| 213 |
.SS "Long doubles" |
| 214 |
.IX Subsection "Long doubles" |
| 215 |
IBM calls its implementation of long doubles 128\-bit, but it is not |
| 216 |
the IEEE 128\-bit ("quadruple precision") which would give 116 bit of |
| 217 |
mantissa (nor it is implemented in hardware), instead it's a special |
| 218 |
software implementation called "double-double", which gives 106 bits |
| 219 |
of mantissa. |
| 220 |
.PP |
| 221 |
There seem to be various problems in this long double implementation. |
| 222 |
If Configure detects this brokenness, it will disable the long double support. |
| 223 |
This can be overridden with explicit \f(CW\*(C`\-Duselongdouble\*(C'\fR (or \f(CW\*(C`\-Dusemorebits\*(C'\fR, |
| 224 |
which enables both long doubles and 64 bit integers). If you decide to |
| 225 |
enable long doubles, for most of the broken things Perl has implemented |
| 226 |
workarounds, but the handling of the special values infinity and NaN |
| 227 |
remains badly broken: for example infinity plus zero results in NaN. |
| 228 |
.SS "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/32\-bit)" |
| 229 |
.IX Subsection "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/32-bit)" |
| 230 |
With the following options you get a threaded Perl version which |
| 231 |
passes all make tests in threaded 32\-bit mode, which is the default |
| 232 |
configuration for the Perl builds that AIX ships with. |
| 233 |
.PP |
| 234 |
.Vb 7 |
| 235 |
\& rm config.sh |
| 236 |
\& ./Configure \e |
| 237 |
\& \-d \e |
| 238 |
\& \-Dcc=cc_r \e |
| 239 |
\& \-Duseshrplib \e |
| 240 |
\& \-Dusethreads \e |
| 241 |
\& \-Dprefix=/usr/opt/perl5_32 |
| 242 |
.Ve |
| 243 |
.PP |
| 244 |
The \-Dprefix option will install Perl in a directory parallel to the |
| 245 |
IBM AIX system Perl installation. |
| 246 |
.SS "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (32\-bit)" |
| 247 |
.IX Subsection "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (32-bit)" |
| 248 |
With the following options you get a Perl version which passes |
| 249 |
all make tests in 32\-bit mode. |
| 250 |
.PP |
| 251 |
.Vb 6 |
| 252 |
\& rm config.sh |
| 253 |
\& ./Configure \e |
| 254 |
\& \-d \e |
| 255 |
\& \-Dcc=cc_r \e |
| 256 |
\& \-Duseshrplib \e |
| 257 |
\& \-Dprefix=/usr/opt/perl5_32 |
| 258 |
.Ve |
| 259 |
.PP |
| 260 |
The \-Dprefix option will install Perl in a directory parallel to the |
| 261 |
IBM AIX system Perl installation. |
| 262 |
.SS "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/64\-bit)" |
| 263 |
.IX Subsection "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/64-bit)" |
| 264 |
With the following options you get a threaded Perl version which |
| 265 |
passes all make tests in 64\-bit mode. |
| 266 |
.PP |
| 267 |
.Vb 1 |
| 268 |
\& export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell) |
| 269 |
\& |
| 270 |
\& rm config.sh |
| 271 |
\& ./Configure \e |
| 272 |
\& \-d \e |
| 273 |
\& \-Dcc=cc_r \e |
| 274 |
\& \-Duseshrplib \e |
| 275 |
\& \-Dusethreads \e |
| 276 |
\& \-Duse64bitall \e |
| 277 |
\& \-Dprefix=/usr/opt/perl5_64 |
| 278 |
.Ve |
| 279 |
.SS "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (64\-bit)" |
| 280 |
.IX Subsection "Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (64-bit)" |
| 281 |
With the following options you get a Perl version which passes all |
| 282 |
make tests in 64\-bit mode. |
| 283 |
.PP |
| 284 |
.Vb 1 |
| 285 |
\& export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell) |
| 286 |
\& |
| 287 |
\& rm config.sh |
| 288 |
\& ./Configure \e |
| 289 |
\& \-d \e |
| 290 |
\& \-Dcc=cc_r \e |
| 291 |
\& \-Duseshrplib \e |
| 292 |
\& \-Duse64bitall \e |
| 293 |
\& \-Dprefix=/usr/opt/perl5_64 |
| 294 |
.Ve |
| 295 |
.PP |
| 296 |
The \-Dprefix option will install Perl in a directory parallel to the |
| 297 |
IBM AIX system Perl installation. |
| 298 |
.PP |
| 299 |
If you choose gcc to compile 64\-bit Perl then you need to add the |
| 300 |
following option: |
| 301 |
.PP |
| 302 |
.Vb 1 |
| 303 |
\& \-Dcc=\*(Aqgcc \-maix64\*(Aq |
| 304 |
.Ve |
| 305 |
.SS "Compiling Perl 5 on AIX 7.1.0" |
| 306 |
.IX Subsection "Compiling Perl 5 on AIX 7.1.0" |
| 307 |
A regression in AIX 7 causes a failure in make test in Time::Piece during |
| 308 |
daylight savings time. APAR IV16514 provides the fix for this. A quick |
| 309 |
test to see if it's required, assuming it is currently daylight savings |
| 310 |
in Eastern Time, would be to run \f(CW\*(C` TZ=EST5 date +%Z \*(C'\fR. This will come |
| 311 |
back with \f(CW\*(C`EST\*(C'\fR normally, but nothing if you have the problem. |
| 312 |
.SS "Compiling Perl 5 on older AIX versions up to 4.3.3" |
| 313 |
.IX Subsection "Compiling Perl 5 on older AIX versions up to 4.3.3" |
| 314 |
Due to the fact that AIX 4.3.3 reached end-of-service in December 31, |
| 315 |
2003 this information is provided as is. The Perl versions prior to |
| 316 |
Perl 5.8.9 could be compiled on AIX up to 4.3.3 with the following |
| 317 |
settings (your mileage may vary): |
| 318 |
.PP |
| 319 |
When compiling Perl, you must use an ANSI C compiler. AIX does not ship |
| 320 |
an ANSI compliant C\-compiler with AIX by default, but binary builds of |
| 321 |
gcc for AIX are widely available. |
| 322 |
.PP |
| 323 |
At the moment of writing, AIX supports two different native C compilers, |
| 324 |
for which you have to pay: \fBxlC\fR and \fBvac\fR. If you decide to use either |
| 325 |
of these two (which is quite a lot easier than using gcc), be sure to |
| 326 |
upgrade to the latest available patch level. Currently: |
| 327 |
.PP |
| 328 |
.Vb 2 |
| 329 |
\& 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 |
| 330 |
\& vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1 |
| 331 |
.Ve |
| 332 |
.PP |
| 333 |
note that xlC has the OS version in the name as of version 4.0.2.0, so |
| 334 |
you will find xlC.C for AIX\-5.0 as package |
| 335 |
.PP |
| 336 |
.Vb 1 |
| 337 |
\& xlC.aix50.rte 5.0.2.0 or 6.0.0.3 |
| 338 |
.Ve |
| 339 |
.PP |
| 340 |
subversions are not the same "latest" on all OS versions. For example, |
| 341 |
the latest xlC\-5 on aix41 is 5.0.2.9, while on aix43, it is 5.0.2.7. |
| 342 |
.PP |
| 343 |
Perl can be compiled with either IBM's ANSI C compiler or with gcc. |
| 344 |
The former is recommended, as not only can it compile Perl with no |
| 345 |
difficulty, but also can take advantage of features listed later that |
| 346 |
require the use of IBM compiler-specific command-line flags. |
| 347 |
.PP |
| 348 |
The IBM's compiler patch levels 5.0.0.0 and 5.0.1.0 have compiler |
| 349 |
optimization bugs that affect compiling perl.c and regcomp.c, |
| 350 |
respectively. If Perl's configuration detects those compiler patch |
| 351 |
levels, optimization is turned off for the said source code files. |
| 352 |
Upgrading to at least 5.0.2.0 is recommended. |
| 353 |
.PP |
| 354 |
If you decide to use gcc, make sure your installation is recent and |
| 355 |
complete, and be sure to read the Perl INSTALL file for more gcc-specific |
| 356 |
details. Please report any hoops you had to jump through to the development |
| 357 |
team. |
| 358 |
.SS "OS level" |
| 359 |
.IX Subsection "OS level" |
| 360 |
Before installing the patches to the IBM C\-compiler you need to know the |
| 361 |
level of patching for the Operating System. IBM's command 'oslevel' will |
| 362 |
show the base, but is not always complete (in this example oslevel shows |
| 363 |
4.3.NULL, whereas the system might run most of 4.3.THREE): |
| 364 |
.PP |
| 365 |
.Vb 6 |
| 366 |
\& # oslevel |
| 367 |
\& 4.3.0.0 |
| 368 |
\& # lslpp \-l | grep \*(Aqbos.rte \*(Aq |
| 369 |
\& bos.rte 4.3.3.75 COMMITTED Base Operating System Runtime |
| 370 |
\& bos.rte 4.3.2.0 COMMITTED Base Operating System Runtime |
| 371 |
\& # |
| 372 |
.Ve |
| 373 |
.PP |
| 374 |
The same might happen to AIX 5.1 or other OS levels. As a side note, Perl |
| 375 |
cannot be built without bos.adt.syscalls and bos.adt.libm installed |
| 376 |
.PP |
| 377 |
.Vb 4 |
| 378 |
\& # lslpp \-l | egrep "syscalls|libm" |
| 379 |
\& bos.adt.libm 5.1.0.25 COMMITTED Base Application Development |
| 380 |
\& bos.adt.syscalls 5.1.0.36 COMMITTED System Calls Application |
| 381 |
\& # |
| 382 |
.Ve |
| 383 |
.SS "Building Dynamic Extensions on AIX < 5L" |
| 384 |
.IX Subsection "Building Dynamic Extensions on AIX < 5L" |
| 385 |
AIX supports dynamically loadable objects as well as shared libraries. |
| 386 |
Shared libraries by convention end with the suffix .a, which is a bit |
| 387 |
misleading, as an archive can contain static as well as dynamic members. |
| 388 |
For Perl dynamically loaded objects we use the .so suffix also used on |
| 389 |
many other platforms. |
| 390 |
.PP |
| 391 |
Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX 4.3 |
| 392 |
or newer Perl uses the AIX native dynamic loading interface in the so |
| 393 |
called runtime linking mode instead of the emulated interface that was |
| 394 |
used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and |
| 395 |
earlier. This change does break backward compatibility with compiled |
| 396 |
modules from earlier Perl releases. The change was made to make Perl |
| 397 |
more compliant with other applications like Apache/mod_perl which are |
| 398 |
using the AIX native interface. This change also enables the use of C++ |
| 399 |
code with static constructors and destructors in Perl extensions, which |
| 400 |
was not possible using the emulated interface. |
| 401 |
.SS "The IBM ANSI C Compiler" |
| 402 |
.IX Subsection "The IBM ANSI C Compiler" |
| 403 |
All defaults for Configure can be used. |
| 404 |
.PP |
| 405 |
If you've chosen to use vac 4, be sure to run 4.4.0.3. Older versions |
| 406 |
will turn up nasty later on. For vac 5 be sure to run at least 5.0.1.0, |
| 407 |
but vac 5.0.2.6 or up is highly recommended. Note that since IBM has |
| 408 |
removed vac 5.0.2.1 through 5.0.2.5 from the software depot, these |
| 409 |
versions should be considered obsolete. |
| 410 |
.PP |
| 411 |
Here's a brief lead of how to upgrade the compiler to the latest |
| 412 |
level. Of course this is subject to changes. You can only upgrade |
| 413 |
versions from ftp-available updates if the first three digit groups |
| 414 |
are the same (in where you can skip intermediate unlike the patches |
| 415 |
in the developer snapshots of Perl), or to one version up where the |
| 416 |
"base" is available. In other words, the AIX compiler patches are |
| 417 |
cumulative. |
| 418 |
.PP |
| 419 |
.Vb 3 |
| 420 |
\& vac.C.4.4.0.1 => vac.C.4.4.0.3 is OK (vac.C.4.4.0.2 not needed) |
| 421 |
\& xlC.C.3.1.3.3 => xlC.C.3.1.4.10 is NOT OK (xlC.C.3.1.4.0 is not |
| 422 |
\& available) |
| 423 |
\& |
| 424 |
\& # ftp ftp.software.ibm.com |
| 425 |
\& Connected to service.boulder.ibm.com. |
| 426 |
\& : welcome message ... |
| 427 |
\& Name (ftp.software.ibm.com:merijn): anonymous |
| 428 |
\& 331 Guest login ok, send your complete e\-mail address as password. |
| 429 |
\& Password: |
| 430 |
\& ... accepted login stuff |
| 431 |
\& ftp> cd /aix/fixes/v4/ |
| 432 |
\& ftp> dir other other.ll |
| 433 |
\& output to local\-file: other.ll? y |
| 434 |
\& 200 PORT command successful. |
| 435 |
\& 150 Opening ASCII mode data connection for /bin/ls. |
| 436 |
\& 226 Transfer complete. |
| 437 |
\& ftp> dir xlc xlc.ll |
| 438 |
\& output to local\-file: xlc.ll? y |
| 439 |
\& 200 PORT command successful. |
| 440 |
\& 150 Opening ASCII mode data connection for /bin/ls. |
| 441 |
\& 226 Transfer complete. |
| 442 |
\& ftp> bye |
| 443 |
\& ... goodbye messages |
| 444 |
\& # ls \-l *.ll |
| 445 |
\& \-rw\-rw\-rw\- 1 merijn system 1169432 Nov 2 17:29 other.ll |
| 446 |
\& \-rw\-rw\-rw\- 1 merijn system 29170 Nov 2 17:29 xlc.ll |
| 447 |
.Ve |
| 448 |
.PP |
| 449 |
On AIX 4.2 using xlC, we continue: |
| 450 |
.PP |
| 451 |
.Vb 10 |
| 452 |
\& # lslpp \-l | fgrep \*(AqxlC.C \*(Aq |
| 453 |
\& xlC.C 3.1.4.9 COMMITTED C for AIX Compiler |
| 454 |
\& xlC.C 3.1.4.0 COMMITTED C for AIX Compiler |
| 455 |
\& # grep \*(AqxlC.C.3.1.4.*.bff\*(Aq xlc.ll |
| 456 |
\& \-rw\-r\-\-r\-\- 1 45776101 1 6286336 Jul 22 1996 xlC.C.3.1.4.1.bff |
| 457 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6173696 Aug 24 1998 xlC.C.3.1.4.10.bff |
| 458 |
\& \-rw\-r\-\-r\-\- 1 45776101 1 6319104 Aug 14 1996 xlC.C.3.1.4.2.bff |
| 459 |
\& \-rw\-r\-\-r\-\- 1 45776101 1 6316032 Oct 21 1996 xlC.C.3.1.4.3.bff |
| 460 |
\& \-rw\-r\-\-r\-\- 1 45776101 1 6315008 Dec 20 1996 xlC.C.3.1.4.4.bff |
| 461 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6178816 Mar 28 1997 xlC.C.3.1.4.5.bff |
| 462 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6188032 May 22 1997 xlC.C.3.1.4.6.bff |
| 463 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6191104 Sep 5 1997 xlC.C.3.1.4.7.bff |
| 464 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6185984 Jan 13 1998 xlC.C.3.1.4.8.bff |
| 465 |
\& \-rw\-rw\-r\-\- 1 45776101 1 6169600 May 27 1998 xlC.C.3.1.4.9.bff |
| 466 |
\& # wget ftp://ftp.software.ibm.com/aix/fixes/v4/xlc/xlC.C.3.1.4.10.bff |
| 467 |
\& # |
| 468 |
.Ve |
| 469 |
.PP |
| 470 |
On AIX 4.3 using vac, we continue: |
| 471 |
.PP |
| 472 |
.Vb 10 |
| 473 |
\& # lslpp \-l | grep \*(Aqvac.C \*(Aq |
| 474 |
\& vac.C 5.0.2.2 COMMITTED C for AIX Compiler |
| 475 |
\& vac.C 5.0.2.0 COMMITTED C for AIX Compiler |
| 476 |
\& # grep \*(Aqvac.C.5.0.2.*.bff\*(Aq other.ll |
| 477 |
\& \-rw\-rw\-r\-\- 1 45776101 1 13592576 Apr 16 2001 vac.C.5.0.2.0.bff |
| 478 |
\& \-rw\-rw\-r\-\- 1 45776101 1 14133248 Apr 9 2002 vac.C.5.0.2.3.bff |
| 479 |
\& \-rw\-rw\-r\-\- 1 45776101 1 14173184 May 20 2002 vac.C.5.0.2.4.bff |
| 480 |
\& \-rw\-rw\-r\-\- 1 45776101 1 14192640 Nov 22 2002 vac.C.5.0.2.6.bff |
| 481 |
\& # wget ftp://ftp.software.ibm.com/aix/fixes/v4/other/vac.C.5.0.2.6.bff |
| 482 |
\& # |
| 483 |
.Ve |
| 484 |
.PP |
| 485 |
Likewise on all other OS levels. Then execute the following command, and |
| 486 |
fill in its choices |
| 487 |
.PP |
| 488 |
.Vb 5 |
| 489 |
\& # smit install_update |
| 490 |
\& \-> Install and Update from LATEST Available Software |
| 491 |
\& * INPUT device / directory for software [ vac.C.5.0.2.6.bff ] |
| 492 |
\& [ OK ] |
| 493 |
\& [ OK ] |
| 494 |
.Ve |
| 495 |
.PP |
| 496 |
Follow the messages ... and you're done. |
| 497 |
.PP |
| 498 |
If you like a more web-like approach, a good start point can be |
| 499 |
<http://www14.software.ibm.com/webapp/download/downloadaz.jsp> and click |
| 500 |
"C for AIX", and follow the instructions. |
| 501 |
.SS "The usenm option" |
| 502 |
.IX Subsection "The usenm option" |
| 503 |
If linking miniperl |
| 504 |
.PP |
| 505 |
.Vb 1 |
| 506 |
\& cc \-o miniperl ... miniperlmain.o opmini.o perl.o ... \-lm \-lc ... |
| 507 |
.Ve |
| 508 |
.PP |
| 509 |
causes error like this |
| 510 |
.PP |
| 511 |
.Vb 9 |
| 512 |
\& ld: 0711\-317 ERROR: Undefined symbol: .aintl |
| 513 |
\& ld: 0711\-317 ERROR: Undefined symbol: .copysignl |
| 514 |
\& ld: 0711\-317 ERROR: Undefined symbol: .syscall |
| 515 |
\& ld: 0711\-317 ERROR: Undefined symbol: .eaccess |
| 516 |
\& ld: 0711\-317 ERROR: Undefined symbol: .setresuid |
| 517 |
\& ld: 0711\-317 ERROR: Undefined symbol: .setresgid |
| 518 |
\& ld: 0711\-317 ERROR: Undefined symbol: .setproctitle |
| 519 |
\& ld: 0711\-345 Use the \-bloadmap or \-bnoquiet option to obtain more |
| 520 |
\& information. |
| 521 |
.Ve |
| 522 |
.PP |
| 523 |
you could retry with |
| 524 |
.PP |
| 525 |
.Vb 3 |
| 526 |
\& make realclean |
| 527 |
\& rm config.sh |
| 528 |
\& ./Configure \-Dusenm ... |
| 529 |
.Ve |
| 530 |
.PP |
| 531 |
which makes Configure to use the \f(CW\*(C`nm\*(C'\fR tool when scanning for library |
| 532 |
symbols, which usually is not done in AIX. |
| 533 |
.PP |
| 534 |
Related to this, you probably should not use the \f(CW\*(C`\-r\*(C'\fR option of |
| 535 |
Configure in AIX, because that affects of how the \f(CW\*(C`nm\*(C'\fR tool is used. |
| 536 |
.SS "Using GNU's gcc for building Perl" |
| 537 |
.IX Subsection "Using GNU's gcc for building Perl" |
| 538 |
Using gcc\-3.x (tested with 3.0.4, 3.1, and 3.2) now works out of the box, |
| 539 |
as do recent gcc\-2.9 builds available directly from IBM as part of their |
| 540 |
Linux compatibility packages, available here: |
| 541 |
.PP |
| 542 |
.Vb 1 |
| 543 |
\& http://www.ibm.com/servers/aix/products/aixos/linux/ |
| 544 |
.Ve |
| 545 |
.SS "Using Large Files with Perl < 5L" |
| 546 |
.IX Subsection "Using Large Files with Perl < 5L" |
| 547 |
Should yield no problems. |
| 548 |
.SS "Threaded Perl < 5L" |
| 549 |
.IX Subsection "Threaded Perl < 5L" |
| 550 |
Threads seem to work OK, though at the moment not all tests pass when |
| 551 |
threads are used in combination with 64\-bit configurations. |
| 552 |
.PP |
| 553 |
You may get a warning when doing a threaded build: |
| 554 |
.PP |
| 555 |
.Vb 2 |
| 556 |
\& "pp_sys.c", line 4640.39: 1506\-280 (W) Function argument assignment |
| 557 |
\& between types "unsigned char*" and "const void*" is not allowed. |
| 558 |
.Ve |
| 559 |
.PP |
| 560 |
The exact line number may vary, but if the warning (W) comes from a line |
| 561 |
line this |
| 562 |
.PP |
| 563 |
.Vb 1 |
| 564 |
\& hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype); |
| 565 |
.Ve |
| 566 |
.PP |
| 567 |
in the "pp_ghostent" function, you may ignore it safely. The warning |
| 568 |
is caused by the reentrant variant of \fBgethostbyaddr()\fR having a slightly |
| 569 |
different prototype than its non-reentrant variant, but the difference |
| 570 |
is not really significant here. |
| 571 |
.SS "64\-bit Perl < 5L" |
| 572 |
.IX Subsection "64-bit Perl < 5L" |
| 573 |
If your AIX is installed with 64\-bit support, you can expect 64\-bit |
| 574 |
configurations to work. In combination with threads some tests might |
| 575 |
still fail. |
| 576 |
.SS "AIX 4.2 and extensions using C++ with statics" |
| 577 |
.IX Subsection "AIX 4.2 and extensions using C++ with statics" |
| 578 |
In AIX 4.2 Perl extensions that use C++ functions that use statics |
| 579 |
may have problems in that the statics are not getting initialized. |
| 580 |
In newer AIX releases this has been solved by linking Perl with |
| 581 |
the libC_r library, but unfortunately in AIX 4.2 the said library |
| 582 |
has an obscure bug where the various functions related to time |
| 583 |
(such as \fBtime()\fR and \fBgettimeofday()\fR) return broken values, and |
| 584 |
therefore in AIX 4.2 Perl is not linked against the libC_r. |
| 585 |
.SH AUTHORS |
| 586 |
.IX Header "AUTHORS" |
| 587 |
Rainer Tammer <[email protected]> |