perlos390.html
来自「perl教程」· HTML 代码 · 共 453 行 · 第 1/2 页
HTML
453 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>README.os390 - building and installing Perl for OS/390 and z/OS</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>README.os390 - building and installing Perl for OS/390 and z/OS</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#tools">Tools</a></li>
<li><a href="#unpacking_perl_distribution_on_os_390">Unpacking Perl distribution on OS/390</a></li>
<li><a href="#setup_and_utilities_for_perl_on_os_390">Setup and utilities for Perl on OS/390</a></li>
<li><a href="#configure_perl_on_os_390">Configure Perl on OS/390</a></li>
<li><a href="#build__test__install_perl_on_os_390">Build, Test, Install Perl on OS/390</a></li>
<li><a href="#build_anomalies_with_perl_on_os_390">Build Anomalies with Perl on OS/390</a></li>
<li><a href="#testing_anomalies_with_perl_on_os_390">Testing Anomalies with Perl on OS/390</a></li>
<li><a href="#installation_anomalies_with_perl_on_os_390">Installation Anomalies with Perl on OS/390</a></li>
<li><a href="#usage_hints_for_perl_on_os_390">Usage Hints for Perl on OS/390</a></li>
<li><a href="#floating_point_anomalies_with_perl_on_os_390">Floating Point Anomalies with Perl on OS/390</a></li>
<li><a href="#modules_and_extensions_for_perl_on_os_390">Modules and Extensions for Perl on OS/390</a></li>
</ul>
<li><a href="#authors">AUTHORS</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<ul>
<li><a href="#mailing_list_for_perl_on_os_390">Mailing list for Perl on OS/390</a></li>
</ul>
<li><a href="#history">HISTORY</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>README.os390 - building and installing Perl for OS/390 and z/OS</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>This document will help you Configure, build, test and install Perl
on OS/390 (aka z/OS) Unix System Services.</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>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.</p>
<p>You may need to carry out some system configuration tasks before
running the Configure script for Perl.</p>
<p>
</p>
<h2><a name="tools">Tools</a></h2>
<p>The z/OS Unix Tools and Toys list may prove helpful and contains links
to ports of much of the software helpful for building Perl.
<a href="http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html">http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html</a></p>
<p>
</p>
<h2><a name="unpacking_perl_distribution_on_os_390">Unpacking Perl distribution on OS/390</a></h2>
<p>If using ftp remember to transfer the distribution in binary format.</p>
<p>Gunzip/gzip for OS/390 is discussed at:</p>
<pre>
<a href="http://www-1.ibm.com/servers/eserver/zseries/zos/unix/faq/bpxqp1.html">http://www-1.ibm.com/servers/eserver/zseries/zos/unix/faq/bpxqp1.html</a></pre>
<p>to extract an ASCII tar archive on OS/390, try this:</p>
<pre>
pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar</pre>
<p>or</p>
<pre>
zcat latest.tar.Z | pax -o to=IBM-1047,from=ISO8859-1 -r</pre>
<p>If you get lots of errors of the form</p>
<pre>
tar: FSUM7171 ...: cannot set uid/gid: EDC5139I Operation not permitted.</pre>
<p>you didn't read the above and tried to use tar instead of pax, you'll
first have to remove the (now corrupt) perl directory</p>
<pre>
rm -rf perl-...</pre>
<p>and then use pax.</p>
<p>
</p>
<h2><a name="setup_and_utilities_for_perl_on_os_390">Setup and utilities for Perl on OS/390</a></h2>
<p>Be sure that your yacc installation is in place including any necessary
parser template files. If you have not already done so then be sure to:</p>
<pre>
cp /samples/yyparse.c /etc</pre>
<p>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.</p>
<p>GNU make for OS/390, which is recommended for the build of perl (as
well as building CPAN modules and extensions), is available from the
<a href="#tools">Tools</a>.</p>
<p>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.</p>
<p>If instead of the recommended GNU make you would like to use the system
supplied make program then be sure to install the default rules file
properly via the shell command:</p>
<pre>
cp /samples/startup.mk /etc</pre>
<p>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).</p>
<p>You might also want to have GNU groff for OS/390 installed before
running the "make install" step for Perl.</p>
<p>There is a syntax error in the /usr/include/sys/socket.h header file
that IBM supplies with USS V2R7, V2R8, and possibly V2R9. The problem with
the header file is that near the definition of the SO_REUSEPORT constant
there is a spurious extra '/' character outside of a comment like so:</p>
<pre>
#define SO_REUSEPORT 0x0200 /* allow local address & port
reuse */ /</pre>
<p>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.</p>
<p>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).</p>
<p>
</p>
<h2><a name="configure_perl_on_os_390">Configure Perl on OS/390</a></h2>
<p>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:</p>
<ul>
<li>
<p>A message of the form:</p>
<pre>
(I see you are using the Korn shell. Some ksh's blow up on Configure,
mainly on older exotic systems. If yours does, try the Bourne shell instead.)</pre>
<p>is nothing to worry about at all.</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>This port will support dynamic loading, but it is not selected by
default. If you would like to experiment with dynamic loading then
be sure to specify -Dusedl in the arguments to the Configure script.
See the comments in hints/os390.sh for more information on dynamic loading.
If you build with dynamic loading then you will need to add the
$archlibexp/CORE directory to your LIBPATH environment variable in order
for perl to work. See the config.sh file for the value of $archlibexp.
If in trying to use Perl you see an error message similar to:</p>
<pre>
CEE3501S The module libperl.dll was not found.
From entry point __dllstaticinit at compile unit offset +00000194 at</pre>
<p>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.</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>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
<a href="../../lib/Pod/perlfunc.html#item_gethostbyname"><code>gethostbyname()</code></a> 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.</p>
</li>
</ul>
<p>
</p>
<h2><a name="build__test__install_perl_on_os_390">Build, Test, Install Perl on OS/390</a></h2>
<p>Simply put:</p>
<pre>
sh Configure
make
make test</pre>
<p>if everything looks ok (see the next section for test/IVP diagnosis) then:</p>
<pre>
make install</pre>
<p>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.</p>
<p>
</p>
<h2><a name="build_anomalies_with_perl_on_os_390">Build Anomalies with Perl on OS/390</a></h2>
<p>"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.</p>
<p>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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?