perlsolaris.html
来自「perl教程」· HTML 代码 · 共 769 行 · 第 1/3 页
HTML
769 行
<?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.solaris - Perl version 5 on Solaris systems</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.solaris - Perl version 5 on Solaris systems</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#solaris_version_numbers_">Solaris Version Numbers.</a></li>
</ul>
<li><a href="#resources">RESOURCES</a></li>
<li><a href="#setting_up">SETTING UP</a></li>
<ul>
<li><a href="#file_extraction_problems_on_solaris_">File Extraction Problems on Solaris.</a></li>
<li><a href="#compiler_and_related_tools_on_solaris_">Compiler and Related Tools on Solaris.</a></li>
<ul>
<li><a href="#include__usr_ccs_bin__in_your_path_">Include /usr/ccs/bin/ in your PATH.</a></li>
<li><a href="#avoid__usr_ucb_cc_">Avoid /usr/ucb/cc.</a></li>
<li><a href="#sun_s_c_compiler">Sun's C Compiler</a></li>
<li><a href="#gcc">GCC</a></li>
<li><a href="#gnu_as_and_gnu_ld">GNU as and GNU ld</a></li>
<li><a href="#sun_and_gnu_make">Sun and GNU make</a></li>
<li><a href="#avoid_libucb_">Avoid libucb.</a></li>
</ul>
<li><a href="#environment_for_compiling_perl_on_solaris">Environment for Compiling perl on Solaris</a></li>
<ul>
<li><a href="#path">PATH</a></li>
<li><a href="#ld_library_path">LD_LIBRARY_PATH</a></li>
</ul>
</ul>
<li><a href="#run_configure_">RUN CONFIGURE.</a></li>
<ul>
<li><a href="#64bit_perl_on_solaris_">64-bit perl on Solaris.</a></li>
<ul>
<li><a href="#general_32bit_vs__64bit_issues_">General 32-bit vs. 64-bit issues.</a></li>
<li><a href="#large_file_support">Large File Support</a></li>
<li><a href="#building_an_lp64_perl">Building an LP64 perl</a></li>
<li><a href="#long_doubles_">Long Doubles.</a></li>
</ul>
<li><a href="#threads_in_perl_on_solaris_">Threads in perl on Solaris.</a></li>
<li><a href="#malloc_issues_with_perl_on_solaris_">Malloc Issues with perl on Solaris.</a></li>
</ul>
<li><a href="#make_problems_">MAKE PROBLEMS.</a></li>
<li><a href="#make_test">MAKE TEST</a></li>
<ul>
<li><a href="#op_stat_t_test_4_in_solaris">op/stat.t test 4 in Solaris</a></li>
<li><a href="#nss_delete_core_dump_from_op_pwent_or_op_grent">nss_delete core dump from op/pwent or op/grent</a></li>
</ul>
<li><a href="#prebuilt_binaries_of_perl_for_solaris_">PREBUILT BINARIES OF PERL FOR SOLARIS.</a></li>
<li><a href="#runtime_issues_for_perl_on_solaris_">RUNTIME ISSUES FOR PERL ON SOLARIS.</a></li>
<ul>
<li><a href="#limits_on_numbers_of_open_files_on_solaris_">Limits on Numbers of Open Files on Solaris.</a></li>
</ul>
<li><a href="#solarisspecific_modules_">SOLARIS-SPECIFIC MODULES.</a></li>
<li><a href="#solarisspecific_problems_with_modules_">SOLARIS-SPECIFIC PROBLEMS WITH MODULES.</a></li>
<ul>
<li><a href="#proc__processtable_on_solaris">Proc::ProcessTable on Solaris</a></li>
<li><a href="#bsd__resource_on_solaris">BSD::Resource on Solaris</a></li>
<li><a href="#net__ssleay_on_solaris">Net::SSLeay on Solaris</a></li>
</ul>
<li><a href="#sunos_4_x">SunOS 4.x</a></li>
<li><a href="#author">AUTHOR</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>README.solaris - Perl version 5 on Solaris systems</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This document describes various features of Sun's Solaris operating system
that will affect how Perl version 5 (hereafter just perl) is
compiled and/or runs. Some issues relating to the older SunOS 4.x are
also discussed, though they may be out of date.</p>
<p>For the most part, everything should just work.</p>
<p>Starting with Solaris 8, perl5.00503 (or higher) is supplied with the
operating system, so you might not even need to build a newer version
of perl at all. The Sun-supplied version is installed in /usr/perl5
with /usr/bin/perl pointing to /usr/perl5/bin/perl. Do not disturb
that installation unless you really know what you are doing. If you
remove the perl supplied with the OS, you will render some bits of
your system inoperable. If you wish to install a newer version of perl,
install it under a different prefix from /usr/perl5. Common prefixes
to use are /usr/local and /opt/perl.</p>
<p>You may wish to put your version of perl in the PATH of all users by
changing the link /usr/bin/perl. This is probably OK, as most perl
scripts shipped with Solaris use an explicit path. (There are a few
exceptions, such as /usr/bin/rpm2cpio and /etc/rcm/scripts/README, but
these are also sufficiently generic that the actual version of perl
probably doesn't matter too much.)</p>
<p>Solaris ships with a range of Solaris-specific modules. If you choose
to install your own version of perl you will find the source of many of
these modules is available on CPAN under the Sun::Solaris:: namespace.</p>
<p>Solaris may include two versions of perl, e.g. Solaris 9 includes
both 5.005_03 and 5.6.1. This is to provide stability across Solaris
releases, in cases where a later perl version has incompatibilities
with the version included in the preceeding Solaris release. The
default perl version will always be the most recent, and in general
the old version will only be retained for one Solaris release. Note
also that the default perl will NOT be configured to search for modules
in the older version, again due to compatibility/stability concerns.
As a consequence if you upgrade Solaris, you will have to
rebuild/reinstall any additional CPAN modules that you installed for
the previous Solaris version. See the CPAN manpage under 'autobundle'
for a quick way of doing this.</p>
<p>As an interim measure, you may either change the #! line of your
scripts to specifically refer to the old perl version, e.g. on
Solaris 9 use #!/usr/perl5/5.00503/bin/perl to use the perl version
that was the default for Solaris 8, or if you have a large number of
scripts it may be more convenient to make the old version of perl the
default on your system. You can do this by changing the appropriate
symlinks under /usr/perl5 as follows (example for Solaris 9):</p>
<pre>
<span class="comment"># cd /usr/perl5</span>
<span class="comment"># rm bin man pod</span>
<span class="comment"># ln -s ./5.00503/bin</span>
<span class="comment"># ln -s ./5.00503/man</span>
<span class="comment"># ln -s ./5.00503/lib/pod</span>
<span class="comment"># rm /usr/bin/perl</span>
<span class="comment"># ln -s ../perl5/5.00503/bin/perl /usr/bin/perl</span>
</pre>
<p>In both cases this should only be considered to be a temporary
measure - you should upgrade to the later version of perl as soon as
is practicable.</p>
<p>Note also that the perl command-line utilities (e.g. perldoc) and any
that are added by modules that you install will be under
/usr/perl5/bin, so that directory should be added to your PATH.</p>
<p>
</p>
<h2><a name="solaris_version_numbers_">Solaris Version Numbers.</a></h2>
<p>For consistency with common usage, perl's Configure script performs
some minor manipulations on the operating system name and version
number as reported by uname. Here's a partial translation table:</p>
<pre>
Sun: perl's Configure:
uname uname -r Name osname osvers
SunOS 4.1.3 Solaris 1.1 sunos 4.1.3
SunOS 5.6 Solaris 2.6 solaris 2.6
SunOS 5.8 Solaris 8 solaris 2.8
SunOS 5.9 Solaris 9 solaris 2.9
SunOS 5.10 Solaris 10 solaris 2.10</pre>
<p>The complete table can be found in the Sun Managers' FAQ
<a href="ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq">ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq</a> under
"9.1) Which Sun models run which versions of SunOS?".</p>
<p>
</p>
<hr />
<h1><a name="resources">RESOURCES</a></h1>
<p>There are many, many sources for Solaris information. A few of the
important ones for perl:</p>
<dl>
<dt><strong><a name="item_solaris_faq">Solaris FAQ</a></strong>
<dd>
<p>The Solaris FAQ is available at
<a href="http://www.science.uva.nl/pub/solaris/solaris2.html">http://www.science.uva.nl/pub/solaris/solaris2.html</a>.</p>
</dd>
<dd>
<p>The Sun Managers' FAQ is available at
<a href="ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq">ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq</a></p>
</dd>
</li>
<dt><strong><a name="item_precompiled_binaries">Precompiled Binaries</a></strong>
<dd>
<p>Precompiled binaries, links to many sites, and much, much more are
available at <a href="http://www.sunfreeware.com/">http://www.sunfreeware.com/</a> and
<a href="http://www.blastwave.org/">http://www.blastwave.org/</a>.</p>
</dd>
</li>
<dt><strong><a name="item_solaris_documentation">Solaris Documentation</a></strong>
<dd>
<p>All Solaris documentation is available on-line at <a href="http://docs.sun.com/">http://docs.sun.com/</a>.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="setting_up">SETTING UP</a></h1>
<p>
</p>
<h2><a name="file_extraction_problems_on_solaris_">File Extraction Problems on Solaris.</a></h2>
<p>Be sure to use a tar program compiled under Solaris (not SunOS 4.x)
to extract the perl-5.x.x.tar.gz file. Do not use GNU tar compiled
for SunOS4 on Solaris. (GNU tar compiled for Solaris should be fine.)
When you run SunOS4 binaries on Solaris, the run-time system magically
alters pathnames matching m#lib/locale# so that when tar tries to create
lib/locale.pm, a file named lib/oldlocale.pm gets created instead.
If you found this advice too late and used a SunOS4-compiled tar
anyway, you must find the incorrectly renamed file and move it back
to lib/locale.pm.</p>
<p>
</p>
<h2><a name="compiler_and_related_tools_on_solaris_">Compiler and Related Tools on Solaris.</a></h2>
<p>You must use an ANSI C compiler to build perl. Perl can be compiled
with either Sun's add-on C compiler or with gcc. The C compiler that
shipped with SunOS4 will not do.</p>
<p>
</p>
<h3><a name="include__usr_ccs_bin__in_your_path_">Include /usr/ccs/bin/ in your PATH.</a></h3>
<p>Several tools needed to build perl are located in /usr/ccs/bin/: ar,
as, ld, and make. Make sure that /usr/ccs/bin/ is in your PATH.</p>
<p>You need to make sure the following packages are installed
(this info is extracted from the Solaris FAQ):</p>
<p>for tools (sccs, lex, yacc, make, nm, truss, ld, as): SUNWbtool,
SUNWsprot, SUNWtoo</p>
<p>for libraries & headers: SUNWhea, SUNWarc, SUNWlibm, SUNWlibms, SUNWdfbh,
SUNWcg6h, SUNWxwinc, SUNWolinc</p>
<p>for 64 bit development: SUNWarcx, SUNWbtoox, SUNWdplx, SUNWscpux,
SUNWsprox, SUNWtoox, SUNWlmsx, SUNWlmx, SUNWlibCx</p>
<p>If you are in doubt which package contains a file you are missing,
try to find an installation that has that file. Then do a</p>
<pre>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?