1PERLOS400(1) Perl Programmers Reference Guide PERLOS400(1)
2
3
4
6 README.os400 - Perl version 5 on OS/400
7
9 This document describes various features of IBM's OS/400 operating sys‐
10 tem that will affect how Perl version 5 (hereafter just Perl) is com‐
11 piled and/or runs.
12
13 By far the easiest way to build Perl for OS/400 is to use the PASE
14 (Portable Application Solutions Environment), for more information see
15 http://www.iseries.ibm.com/developer/factory/pase/index.html This envi‐
16 ronment allows one to use AIX APIs while programming, and it provides a
17 runtime that allows AIX binaries to execute directly on the PowerPC
18 iSeries.
19
20 Compiling Perl for OS/400 PASE
21
22 The recommended way to build Perl for the OS/400 PASE is to build the
23 Perl 5 source code (release 5.8.1 or later) under AIX.
24
25 The trick is to give a special parameter to the Configure shell script
26 when running it on AIX:
27
28 sh Configure -DPASE ...
29
30 The default installation directory of Perl under PASE is /QOpen‐
31 Sys/perl. This can be modified if needed with Configure parameter
32 -Dprefix=/some/dir.
33
34 Starting from OS/400 V5R2 the IBM Visual Age compiler is supported on
35 OS/400 PASE, so it is possible to build Perl natively on OS/400. The
36 easier way, however, is to compile in AIX, as just described.
37
38 If you don't want to install the compiled Perl in AIX into /QOpenSys
39 (for packaging it before copying it to PASE), you can use a Configure
40 parameter: -Dinstallprefix=/tmp/QOpenSys/perl. This will cause the
41 "make install" to install everything into that directory, while the
42 installed files still think they are (will be) in /QOpenSys/perl.
43
44 If building natively on PASE, please do the build under the /QOpenSys
45 directory, since Perl is happier when built on a case sensitive
46 filesystem.
47
48 Installing Perl in OS/400 PASE
49
50 If you are compiling on AIX, simply do a "make install" on the AIX box.
51 Once the install finishes, tar up the /QOpenSys/perl directory. Trans‐
52 fer the tarball to the OS/400 using FTP with the following commands:
53
54 > binary
55 > site namefmt 1
56 > put perl.tar /QOpenSys
57
58 Once you have it on, simply bring up a PASE shell and extract the tar‐
59 ball.
60
61 If you are compiling in PASE, then "make install" is the only thing you
62 will need to do.
63
64 The default path for perl binary is /QOpenSys/perl/bin/perl. You'll
65 want to symlink /QOpenSys/usr/bin/perl to this file so you don't have
66 to modify your path.
67
68 Using Perl in OS/400 PASE
69
70 Perl in PASE may be used in the same manner as you would use Perl on
71 AIX.
72
73 Scripts starting with #!/usr/bin/perl should work if you have /QOpen‐
74 Sys/usr/bin/perl symlinked to your perl binary. This will not work if
75 you've done a setuid/setgid or have environment variable
76 PASE_EXEC_QOPENSYS="N". If you have V5R1, you'll need to get the lat‐
77 est PTFs to have this feature. Scripts starting with #!/QOpen‐
78 Sys/perl/bin/perl should always work.
79
80 Known Problems
81
82 When compiling in PASE, there is no "oslevel" command. Therefore, you
83 may want to create a script called "oslevel" that echoes the level of
84 AIX that your version of PASE runtime supports. If you're unsure, con‐
85 sult your documentation or use "4.3.3.0".
86
87 If you have test cases that fail, check for the existence of spool
88 files. The test case may be trying to use a syscall that is not imple‐
89 mented in PASE. To avoid the SIGILL, try setting the
90 PASE_SYSCALL_NOSIGILL environment variable or have a handler for the
91 SIGILL. If you can compile programs for PASE, run the config script
92 and edit config.sh when it gives you the option. If you want to remove
93 fchdir(), which isn't implement in V5R1, simply change the line that
94 says:
95
96 d_fchdir='define'
97
98 to
99
100 d_fchdir='undef'
101
102 and then compile Perl. The places where fchdir() is used have alterna‐
103 tives for systems that do not have fchdir() available.
104
105 Perl on ILE
106
107 There exists a port of Perl to the ILE environment. This port, how‐
108 ever, is based quite an old release of Perl, Perl 5.00502 (August
109 1998). (As of July 2002 the latest release of Perl is 5.8.0, and even
110 5.6.1 has been out since April 2001.) If you need to run Perl on ILE,
111 though, you may need this older port: http://www.cpan.org/ports/#os400
112 Note that any Perl release later than 5.00502 has not been ported to
113 ILE.
114
115 If you need to use Perl in the ILE environment, you may want to con‐
116 sider using Qp2RunPase() to call the PASE version of Perl.
117
119 Jarkko Hietaniemi <jhi@iki.fi> Bryan Logan <bryanlog@us.ibm.com> David
120 Larson <larson1@us.ibm.com>
121
122
123
124perl v5.8.8 2006-01-07 PERLOS400(1)