This is a fully ported Perl for OS/390 Version 2 Release 3, 5, 6, 7, 8, and 9. It may work on other versions or releases, but those are the ones we've tested it on.
You may need to carry out some system configuration tasks before running the Configure script for Perl.
Setup and utilities
This may also be a good time to ensure that your /etc/protocol file and either your /etc/resolv.conf or /etc/hosts files are in place. The IBM document that described such USS system setup issues was SC28-1890-07 `` OS/390 UNIX System Services Planning'', in particular Chapter 6 on customizing the OE shell.
Some people have reported encountering ``Out of memory! errors while trying to build Perl using GNU make binaries. If you encounter such trouble then try to download the source code kit and build GNU make from source to eliminate any such trouble. You might also find GNU make (as well as Perl and Apache) in the red-piece/book ``Open Source Software for OS/390 UNIX , SG24-5944-00 from IBM .
and be sure to also set the environment variable _C89_CCMODE=1 (exporting _C89_CCMODE=1 is also a good idea for users of GNU make).
You might also want to have GNU groff for OS/390 installed before running the `make install` step for Perl.
You could edit that header yourself to remove that last '/', or you might note that Language Environment ( LE ) APAR PQ39997 describes the problem and PTF 's UQ46272 and UQ46271 are the (R8 at least) fixes and apply them. If left unattended that syntax error will turn up as an inability for Perl to build its ``Socket'' extension.
For successful testing you may need to turn on the sticky bit for your world readable /tmp directory if you have not already done so (see man chmod).
Once you've unpacked the distribution, run ``sh Configure (see INSTALL for a full discussion of the Configure options). There is a ``hints file for os390 that specifies the correct values for most things. Some things to watch out for include:
mainly on older exotic systems. If yours does, try the Bourne shell instead.) is nothing to worry about at all.
Some of the parser default template files in /samples are needed in /etc. In particular be sure that you at least copy /samples/yyparse.c to /etc before running Perl's Configure. This step ensures successful extraction of EBCDIC versions of parser files such as perly.c, perly.h, and x2p/a2p.c. This has to be done before running Configure the first time. If you failed to do so then the easiest way to re-Configure Perl is to delete your misconfigured build root and re-extract the source from the tar ball. Then you must ensure that /etc/yyparse.c is properly in place before attempting to re-run Configure.
From entry point __dllstaticinit at compile unit offset +00000194 at then your LIBPATH does not have the location of libperl.x and either libperl.dll or libperl.so in it. Add that directory to your LIBPATH and proceed.
Do not turn on the compiler optimization flag ``-O''. There is a bug in either the optimizer or perl that causes perl to not work correctly when the optimizer is on.
Some of the configuration files in /etc used by the networking APIs are either missing or have the wrong names. In particular, make sure that there's either an /etc/resolv.conf or an /etc/hosts, so that gethostbyname() works, and make sure that the file /etc/proto has been renamed to /etc/protocol ( NOT /etc/protocols, as used by other Unix systems). You may have to look for things like HOSTNAME and DOMAINORIGIN in the ``//' SYS1 .TCPPARMS( TCPDATA )''' PDS member in order to properly set up your /etc networking files.
Build, test, install
this last step may or may not require UID=0 privileges depending on how you answered the questions that Configure asked and whether or not you have write access to the directories you specified.
``Out of memory!'' messages during the build of Perl are most often fixed by re building the GNU make utility for OS/390 from a source code kit.
Another memory limiting item to check is your MAXASSIZE parameter in your ' SYS1 .PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space limits can be set on a per user ID basis in the USS segment of a RACF profile). People have reported successful builds of Perl with MAXASSIZE parameters as small as 503316480 (and it may be possible to build Perl with a MAXASSIZE smaller than that).
To conserve memory you should have your compiler modules loaded into the Link Pack Area ( LPA/ELPA ) rather than in a link list or step lib.
If the c89 compiler complains of syntax errors during the build of the Socket extension then be sure to fix the syntax error in the system header /usr/include/sys/socket.h.
The `make test` step runs a Perl Verification Procedure, usually before installation. You might encounter STDERR messages even during a successful run of `make test`. Here is a guide to some of the more commonly seen anomalies:
valid C source character. FSUM3065 The COMPILE step ended with return code 12. FSUM3017 Could not compile .301989890.c. Correct the errors and try again. ok indicates that the t/comp/cpp.t test of Perl's -P command line switch has passed but that the particular invocation of c89 -E in the cpp script does not suppress the C compiler check of source code validity.
CEE5210S The signal SIGHUP was received. CEE5210S The signal SIGHUP was received. ok indicates that the t/io/openpid.t test of Perl has passed but done so with extraneous messages on stderr from CEE .
from an account with write access to the directory entry for /tmp.
The installman script will try to run on OS/390 . There will be fewer errors if you have a roff utility installed. You can obtain GNU groff from the Redbook SG24-5944-00 ftp site.
When using perl on OS/390 please keep in mind that the EBCDIC and ASCII character sets are different. See perlebcdic.pod for more on such character set issues. Perl builtin functions that may behave differently under EBCDIC are also mentioned in the perlport.pod document.
for an example of how to use the ``eval exec'' trick to ask the shell to have Perl run your scripts on those older releases of Unix System Services.
If you are having trouble with square brackets then consider switching your rlogin or telnet client. Try to avoid older 3270 emulators and ISHELL for working with Perl on USS .
Floating point anomalies
my $y = int($x * 1e-5) * 1e5; # '0' my $z = int($x / 1e+5) * 1e5; # '100000' print Although one would expect the quantities $y and $z to be the same and equal to 100000 they will differ and instead will be 0 and 100000 respectively.
Modules and Extensions
make make perl make test make install make -f Makefile.aperl inst_perl MAP_TARGET=perl In most cases people have reported better results with GNU make rather than the system's /bin/make program, whether for plain modules or for xs based extensions.
This document was originally written by David Fiander for the 5.005 release of Perl.
This document was podified for the 5.005_03 release of Perl 11 March 1999.
Updated 12 November 2000 for the 5.7.1 release of Perl.
Updated 15 January 2001 for the 5.7.1 release of Perl.
Updated 24 January 2001 to mention dynamic loading.