This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Typo fix.
[perl5.git] / README.os400
CommitLineData
522b859a
JH
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.os400 - Perl version 5 on OS/400
8
9=head1 DESCRIPTION
10
11This document describes various features of IBM's OS/400 operating
12system that will affect how Perl version 5 (hereafter just Perl) is
13compiled and/or runs.
14
15By far the easiest way to build Perl for OS/400 is to use the PASE
16(Portable Application Solutions Environment), for more information see
17http://www.iseries.ibm.com/developer/factory/pase/index.html
18This environment allows one to use AIX APIs while programming, and it
19provides a runtime that allows AIX binaries to execute directly on the
20PowerPC iSeries.
21
22=head2 Compiling Perl for OS/400 PASE
23
24The recommended way to build Perl for the OS/400 PASE is to build the
25Perl 5 source code (release 5.8.1 or later) under AIX.
26
27The trick is to give a special parameter to the Configure shell script
28when running it on AIX:
29
30 sh Configure -DPASE ...
31
32The default installation directory of Perl under PASE is /QOpenSys/perl.
33This can be modified if needed with Configure parameter -Dprefix=/some/dir.
34
35Starting from OS/400 V5R2 the IBM Visual Age compiler is supported
36on OS/400 PASE, so it is possible to build Perl natively on OS/400.
37The easier way, however, is to compile in AIX, as just described.
38
39If building natively on PASE, please do the build under the /QOpenSys
40directory, since Perl is happier when built on a case sensitive filesystem.
41
42=head2 Installing Perl in OS/400 PASE
43
44If you are compiling on AIX, simply do a "make install" on the AIX box.
45Once the install finishes, tar up the /QOpenSys/perl directory. Transfer
46the tarball to the OS/400 using FTP with the following commands:
47
48 > binary
49 > site namefmt 1
50 > put perl.tar /QOpenSys
51
52Once you have it on, simply bring up a PASE shell and extract the tarball.
53
54If you are compiling in PASE, then "make install" is the only thing you
55will need to do.
56
57The default path for perl binary is /QOpenSys/perl/bin/perl. You'll
58want to symlink /QOpenSys/usr/bin/perl to this file so you don't have
59to modify your path.
60
61=head2 Using Perl in OS/400 PASE
62
63Perl in PASE may be used in the same manner as you would use Perl on AIX.
64
65Scripts starting with #!/usr/bin/perl should work if you have
66/QOpenSys/usr/bin/perl symlinked to your perl binary. This will not
67work if you've done a setuid/setgid or have environment variable
68PASE_EXEC_QOPENSYS="N". If you have V5R1, you'll need to get the
69latest PTFs to have this feature. Scripts starting with
70#!/QOpenSys/perl/bin/perl should always work.
71
954a4c1b
JH
72=head2 Known Problems
73
74When compiling natively in PASE, there is no "oslevel" command as
75there is in AIX-- this will confuse the Configure script. Therefore,
76before running Configure you may want to create a script (in your
77$PATH) called "oslevel" that prints out the level of AIX that your
78version of PASE supports. Consult your documentation to find out
79what this is, or just use "4.3.3.0".
80
81When using sockets, you probably will want a signal handler for
82SIGPIPE since there seems to be some signal handling differences
83between AIX and PASE. Especially, PASE doesn't seem to allow
84writing to a closed socket but instead throws SIGPIPE immediately.
85Because of this the subtest #18 of io_sock in IO::Socket fails.
86
87Some tests in Time::HiRes are failing because some of the system
88calls being used aren't really implemented in PASE.
89
522b859a
JH
90=head2 Perl on ILE
91
92There exists a port of Perl to the ILE environment. This port, however,
93is based quite an old release of Perl, Perl 5.00502 (August 1998).
94(As of July 2002 the latest release of Perl is 5.8.0, and even 5.6.1
95has been out since April 2001.) If you need to run Perl on ILE, though,
96you may need this older port: http://www.cpan.org/ports/#os400
97Note that any Perl release later than 5.00502 has not been ported to ILE.
98
99If you need to use Perl in the ILE environment, you may want to consider
100using Qp2RunPase() to call the PASE version of Perl.
101
102=head1 AUTHORS
103
104Jarkko Hietaniemi <jhi@iki.fi>
105Bryan Logan <bryanlog@us.ibm.com>
106David Larson <larson1@us.ibm.com>
107
108=cut