perlos390.html
来自「perl教程」· HTML 代码 · 共 453 行 · 第 1/2 页
HTML
453 行
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).</p>
<p>Within USS your /etc/profile or $HOME/.profile may limit your ulimit
settings. Check that the following command returns reasonable values:</p>
<pre>
ulimit -a</pre>
<p>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.</p>
<p>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.</p>
<p>
</p>
<h2><a name="testing_anomalies_with_perl_on_os_390">Testing Anomalies with Perl on OS/390</a></h2>
<p>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:</p>
<ul>
<li>
<p>A message of the form:</p>
<pre>
comp/cpp.............ERROR CBC3191 ./.301989890.c:1 The character $ is not a
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</pre>
<p>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.</p>
</li>
<li>
<p>A message of the form:</p>
<pre>
io/openpid...........CEE5210S The signal SIGHUP was received.
CEE5210S The signal SIGHUP was received.
CEE5210S The signal SIGHUP was received.
ok</pre>
<p>indicates that the t/io/openpid.t test of Perl has passed but done so
with extraneous messages on stderr from CEE.</p>
</li>
<li>
<p>A message of the form:</p>
<pre>
lib/ftmp-security....File::Temp::_gettemp: Parent directory (/tmp/) is not safe
(sticky bit not set when world writable?) at lib/ftmp-security.t line 100
File::Temp::_gettemp: Parent directory (/tmp/) is not safe (sticky bit not
set when world writable?) at lib/ftmp-security.t line 100
ok</pre>
<p>indicates a problem with the permissions on your /tmp directory within the HFS.
To correct that problem issue the command:</p>
<pre>
chmod a+t /tmp</pre>
<p>from an account with write access to the directory entry for /tmp.</p>
</li>
<li>
<p>Out of Memory!</p>
<p>Recent perl test suite is quite memory hunrgy. In addition to the comments
above on memory limitations it is also worth checking for _CEE_RUNOPTS
in your environment. Perl now has (in miniperlmain.c) a C #pragma
to set CEE run options, but the environment variable wins.</p>
<p>The C code asks for:</p>
<pre>
<span class="comment">#pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))</span>
</pre>
<p>The important parts of that are the second argument (the increment) to HEAP,
and allowing the stack to be "Above the (16M) line". If the heap
increment is too small then when perl (for example loading unicode/Name.pl) tries
to create a "big" (400K+) string it cannot fit in a single segment
and you get "Out of Memory!" - even if there is still plenty of memory
available.</p>
<p>A related issue is use with perl's malloc. Perl's malloc uses <code>sbrk()</code>
to get memory, and <code>sbrk()</code> is limited to the first allocation so in this
case something like:</p>
<pre>
HEAP(8M,500K,ANYWHERE,KEEP,8K,4K)</pre>
<p>is needed to get through the test suite.</p>
</li>
</ul>
<p>
</p>
<h2><a name="installation_anomalies_with_perl_on_os_390">Installation Anomalies with Perl on OS/390</a></h2>
<p>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.</p>
<p>
</p>
<h2><a name="usage_hints_for_perl_on_os_390">Usage Hints for Perl on OS/390</a></h2>
<p>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.</p>
<p>Open Edition (UNIX System Services) from V2R8 onward does support
#!/path/to/perl script invocation. There is a PTF available from
IBM for V2R7 that will allow shell/kernel support for #!. USS
releases prior to V2R7 did not support the #! means of script invocation.
If you are running V2R6 or earlier then see:</p>
<pre>
head `whence <a href="../../lib/Pod/perldoc.html">perldoc</a>`</pre>
<p>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.</p>
<p>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.</p>
<p>
</p>
<h2><a name="floating_point_anomalies_with_perl_on_os_390">Floating Point Anomalies with Perl on OS/390</a></h2>
<p>There appears to be a bug in the floating point implementation on S/390
systems such that calling <a href="../../lib/Pod/perlfunc.html#item_int"><code>int()</code></a> on the product of a number and a small
magnitude number is not the same as calling <a href="../../lib/Pod/perlfunc.html#item_int"><code>int()</code></a> on the quotient of
that number and a large magnitude number. For example, in the following
Perl code:</p>
<pre>
<span class="keyword">my</span> <span class="variable">$x</span> <span class="operator">=</span> <span class="number">100000.0</span><span class="operator">;</span>
<span class="keyword">my</span> <span class="variable">$y</span> <span class="operator">=</span> <span class="keyword">int</span><span class="operator">(</span><span class="variable">$x</span> <span class="operator">*</span> <span class="number">1e-5</span><span class="operator">)</span> <span class="operator">*</span> <span class="number">1e5</span><span class="operator">;</span> <span class="comment"># '0'</span>
<span class="keyword">my</span> <span class="variable">$z</span> <span class="operator">=</span> <span class="keyword">int</span><span class="operator">(</span><span class="variable">$x</span> <span class="operator">/</span> <span class="number">1e</span><span class="operator">+</span><span class="number">5</span><span class="operator">)</span> <span class="operator">*</span> <span class="number">1e5</span><span class="operator">;</span> <span class="comment"># '100000'</span>
<span class="keyword">print</span> <span class="string">"\$y is $y and \$z is $z\n"</span><span class="operator">;</span> <span class="comment"># $y is 0 and $z is 100000</span>
</pre>
<p>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.</p>
<p>The problem can be further examined in a roughly equivalent C program:</p>
<pre>
<span class="comment">#include <stdio.h></span>
<span class="comment">#include <math.h></span>
<span class="variable">main</span><span class="operator">()</span>
<span class="operator">{</span>
<span class="variable">double</span> <span class="variable">r1</span><span class="operator">,</span><span class="variable">r2</span><span class="operator">;</span>
<span class="variable">double</span> <span class="operator">x</span> <span class="operator">=</span> <span class="number">100000.0</span><span class="operator">;</span>
<span class="variable">double</span> <span class="regex">y = 0.0;
double z = 0.0;
x =</span> <span class="number">100000.0</span> <span class="operator">*</span> <span class="number">1e-5</span><span class="operator">;</span>
<span class="variable">r1</span> <span class="operator">=</span> <span class="variable">modf</span> <span class="operator">(x,&</span><span class="regex">y);
x = 100000.0 / 1e+5;
r2 = modf (x,&z);
printf("y is %e and z is %e\n",y*1e5,z*1e5)</span><span class="operator">;</span>
<span class="regex">/* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */</span>
<span class="operator">}</span>
</pre>
<p>
</p>
<h2><a name="modules_and_extensions_for_perl_on_os_390">Modules and Extensions for Perl on OS/390</a></h2>
<p>Pure pure (that is non xs) modules may be installed via the usual:</p>
<pre>
perl Makefile.PL
make
make test
make install</pre>
<p>If you built perl with dynamic loading capability then that would also
be the way to build xs based extensions. However, if you built perl with
the default static linking you can still build xs based extensions for OS/390
but you will need to follow the instructions in ExtUtils::MakeMaker for
building statically linked perl binaries. In the simplest configurations
building a static perl + xs extension boils down to:</p>
<pre>
perl Makefile.PL
make
make perl
make test
make install
make -f Makefile.aperl inst_perl MAP_TARGET=perl</pre>
<p>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.</p>
<p>If the make process encounters trouble with either compilation or
linking then try setting the _C89_CCMODE to 1. Assuming sh is your
login shell then run:</p>
<pre>
export _C89_CCMODE=1</pre>
<p>If tcsh is your login shell then use the setenv command.</p>
<p>
</p>
<hr />
<h1><a name="authors">AUTHORS</a></h1>
<p>David Fiander and Peter Prymmer with thanks to Dennis Longnecker
and William Raffloer for valuable reports, LPAR and PTF feedback.
Thanks to Mike MacIsaac and Egon Terwedow for SG24-5944-00.
Thanks to Ignasi Roca for pointing out the floating point problems.
Thanks to John Goodyear for dynamic loading help.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>INSTALL</em>, <a href="../../lib/Pod/perlport.html">the perlport manpage</a>, <a href="../../lib/Pod/perlebcdic.html">the perlebcdic manpage</a>, <a href="../../lib/ExtUtils/MakeMaker.html">the ExtUtils::MakeMaker manpage</a>.</p>
<pre>
<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></pre>
<pre>
<a href="http://www.redbooks.ibm.com/abstracts/sg245944.html">http://www.redbooks.ibm.com/abstracts/sg245944.html</a></pre>
<pre>
<a href="http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc">http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc</a></pre>
<pre>
<a href="http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/">http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/</a></pre>
<pre>
<a href="http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/ceea3030/">http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/ceea3030/</a></pre>
<pre>
<a href="http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/CBCUG030/">http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/CBCUG030/</a></pre>
<p>
</p>
<h2><a name="mailing_list_for_perl_on_os_390">Mailing list for Perl on OS/390</a></h2>
<p>If you are interested in the VM/ESA, z/OS (formerly known as OS/390)
and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
To subscribe, send an empty message to <a href="mailto:perl-mvs-subscribe@perl.org.">perl-mvs-subscribe@perl.org.</a></p>
<p>See also:</p>
<pre>
<a href="http://lists.perl.org/showlist.cgi?name=perl-mvs">http://lists.perl.org/showlist.cgi?name=perl-mvs</a></pre>
<p>There are web archives of the mailing list at:</p>
<pre>
<a href="http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/">http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/</a>
<a href="http://archive.develooper.com/perl-mvs@perl.org/">http://archive.develooper.com/perl-mvs@perl.org/</a></pre>
<p>
</p>
<hr />
<h1><a name="history">HISTORY</a></h1>
<p>This document was originally written by David Fiander for the 5.005
release of Perl.</p>
<p>This document was podified for the 5.005_03 release of Perl 11 March 1999.</p>
<p>Updated 28 November 2001 for broken URLs.</p>
<p>Updated 12 November 2000 for the 5.7.1 release of Perl.</p>
<p>Updated 15 January 2001 for the 5.7.1 release of Perl.</p>
<p>Updated 24 January 2001 to mention dynamic loading.</p>
<p>Updated 12 March 2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?