perlcygwin.html

来自「perl教程」· HTML 代码 · 共 675 行 · 第 1/3 页

HTML
675
字号
<?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.cygwin - Perl for Cygwin</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.cygwin - Perl for Cygwin</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="#prerequisites_for_compiling_perl_on_cygwin">PREREQUISITES FOR COMPILING PERL ON CYGWIN</a></li>
	<ul>

		<li><a href="#cygwin___gnu_cygnus_windows__don_t_leave_unix_without_it_">Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)</a></li>
		<li><a href="#cygwin_configuration">Cygwin Configuration</a></li>
	</ul>

	<li><a href="#configure_perl_on_cygwin">CONFIGURE PERL ON CYGWIN</a></li>
	<ul>

		<li><a href="#stripping_perl_binaries_on_cygwin">Stripping Perl Binaries on Cygwin</a></li>
		<li><a href="#optional_libraries_for_perl_on_cygwin">Optional Libraries for Perl on Cygwin</a></li>
		<li><a href="#configuretime_options_for_perl_on_cygwin">Configure-time Options for Perl on Cygwin</a></li>
		<li><a href="#suspicious_warnings_on_cygwin">Suspicious Warnings on Cygwin</a></li>
	</ul>

	<li><a href="#make_on_cygwin">MAKE ON CYGWIN</a></li>
	<ul>

		<li><a href="#errors_on_cygwin">Errors on Cygwin</a></li>
		<li><a href="#ld2_on_cygwin">ld2 on Cygwin</a></li>
	</ul>

	<li><a href="#test_on_cygwin">TEST ON CYGWIN</a></li>
	<ul>

		<li><a href="#file_permissions_on_cygwin">File Permissions on Cygwin</a></li>
		<li><a href="#ndbm_file_and_odbm_file_do_not_work_on_fat_filesystems">NDBM_File and ODBM_File do not work on FAT filesystems</a></li>
		<li><a href="#fork___failures_in_io___tests"><a href="../../lib/Pod/perlfunc.html#item_fork"><code>fork()</code></a> failures in io_* tests</a></li>
	</ul>

	<li><a href="#specific_features_of_the_cygwin_port">Specific features of the Cygwin port</a></li>
	<ul>

		<li><a href="#script_portability_on_cygwin">Script Portability on Cygwin</a></li>
		<li><a href="#prebuilt_methods_">Prebuilt methods:</a></li>
	</ul>

	<li><a href="#install_perl_on_cygwin">INSTALL PERL ON CYGWIN</a></li>
	<li><a href="#manifest_on_cygwin">MANIFEST ON CYGWIN</a></li>
	<li><a href="#bugs_on_cygwin">BUGS ON CYGWIN</a></li>
	<li><a href="#authors">AUTHORS</a></li>
	<li><a href="#history">HISTORY</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>README.cygwin - Perl for Cygwin</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>This document will help you configure, make, test and install Perl
on Cygwin.  This document also describes features of Cygwin that will
affect how Perl behaves at runtime.</p>
<p><strong>NOTE:</strong> There are pre-built Perl packages available for Cygwin and a
version of Perl is provided in the normal Cygwin install.  If you do
not need to customize the configuration, consider using one of those
packages.</p>
<p>
</p>
<hr />
<h1><a name="prerequisites_for_compiling_perl_on_cygwin">PREREQUISITES FOR COMPILING PERL ON CYGWIN</a></h1>
<p>
</p>
<h2><a name="cygwin___gnu_cygnus_windows__don_t_leave_unix_without_it_">Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)</a></h2>
<p>The Cygwin tools are ports of the popular GNU development tools for Win32
platforms.  They run thanks to the Cygwin library which provides the UNIX
system calls and environment these programs expect.  More information
about this project can be found at:</p>
<pre>
  <a href="http://www.cygwin.com/">http://www.cygwin.com/</a></pre>
<p>A recent net or commercial release of Cygwin is required.</p>
<p>At the time this document was last updated, Cygwin 1.5.2 was current.</p>
<p>
</p>
<h2><a name="cygwin_configuration">Cygwin Configuration</a></h2>
<p>While building Perl some changes may be necessary to your Cygwin setup so
that Perl builds cleanly.  These changes are <strong>not</strong> required for normal
Perl usage.</p>
<p><strong>NOTE:</strong> The binaries that are built will run on all Win32 versions.
They do not depend on your host system (Win9x/WinME, WinNT/Win2K)
or your Cygwin configuration (<em>ntea</em>, <em>ntsec</em>, binary/text mounts).
The only dependencies come from hard-coded pathnames like <code>/usr/local</code>.
However, your host system and Cygwin configuration will affect Perl's
runtime behavior (see <a href="#test">TEST</a>).</p>
<ul>
<li><strong><a name="item_path"><code>PATH</code></a></strong>

<p>Set the <a href="#item_path"><code>PATH</code></a> environment variable so that Configure finds the Cygwin
versions of programs.  Any Windows directories should be removed or
moved to the end of your <a href="#item_path"><code>PATH</code></a>.</p>
</li>
<li><strong><a name="item_nroff"><em>nroff</em></a></strong>

<p>If you do not have <em>nroff</em> (which is part of the <em>groff</em> package),
Configure will <strong>not</strong> prompt you to install <em>man</em> pages.</p>
</li>
<li><strong><a name="item_permissions">Permissions</a></strong>

<p>On WinNT with either the <em>ntea</em> or <em>ntsec</em> <code>CYGWIN</code> settings, directory
and file permissions may not be set correctly.  Since the build process
creates directories and files, to be safe you may want to run a
<code>chmod -R +w *</code> on the entire Perl source tree.</p>
<p>Also, it is a well known WinNT &quot;feature&quot; that files created by a login
that is a member of the <em>Administrators</em> group will be owned by the
<em>Administrators</em> group.  Depending on your umask, you may find that you
can not write to files that you just created (because you are no longer
the owner).  When using the <em>ntsec</em> <code>CYGWIN</code> setting, this is not an
issue because it &quot;corrects&quot; the ownership to what you would expect on
a UNIX system.</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="configure_perl_on_cygwin">CONFIGURE PERL ON CYGWIN</a></h1>
<p>The default options gathered by Configure with the assistance of
<em>hints/cygwin.sh</em> will build a Perl that supports dynamic loading
(which requires a shared <em>libperl.dll</em>).</p>
<p>This will run Configure and keep a record:</p>
<pre>
  ./Configure 2&gt;&amp;1 | tee log.configure</pre>
<p>If you are willing to accept all the defaults run Configure with <strong>-de</strong>.
However, several useful customizations are available.</p>
<p>
</p>
<h2><a name="stripping_perl_binaries_on_cygwin">Stripping Perl Binaries on Cygwin</a></h2>
<p>It is possible to strip the EXEs and DLLs created by the build process.
The resulting binaries will be significantly smaller.  If you want the
binaries to be stripped, you can either add a <strong>-s</strong> option when Configure
prompts you,</p>
<pre>
  Any additional ld flags (NOT including libraries)? [none] -s
  Any special flags to pass to gcc to use dynamic linking? [none] -s
  Any special flags to pass to ld2 to create a dynamically loaded library?
  [none] -s</pre>
<p>or you can edit <em>hints/cygwin.sh</em> and uncomment the relevant variables
near the end of the file.</p>
<p>
</p>
<h2><a name="optional_libraries_for_perl_on_cygwin">Optional Libraries for Perl on Cygwin</a></h2>
<p>Several Perl functions and modules depend on the existence of
some optional libraries.  Configure will find them if they are
installed in one of the directories listed as being used for library
searches.  Pre-built packages for most of these are available from
the Cygwin installer.</p>
<ul>
<li><strong><a name="item__2dlcrypt"><code>-lcrypt</code></a></strong>

<p>The crypt package distributed with Cygwin is a Linux compatible 56-bit
DES crypt port by Corinna Vinschen.</p>
<p>Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.</p>
<p>The DES based Ultra Fast Crypt port was done by Alexey Truhan:</p>
<pre>
  <a href="ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/cw32crypt-dist-0.tgz">ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/cw32crypt-dist-0.tgz</a></pre>
<p>NOTE: There are various export restrictions on DES implementations,
see the glibc README for more details.</p>
<p>The MD5 port was done by Andy Piper:</p>
<pre>
  <a href="ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/libcrypt.tgz">ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/libcrypt.tgz</a></pre>
</li>
<li><strong><a name="item_lgdbm"><code>-lgdbm</code> (<code>use GDBM_File</code>)</a></strong>

<p>GDBM is available for Cygwin.</p>
<p>NOTE: The GDBM library only works on NTFS partitions.</p>
</li>
<li><strong><a name="item_ldb"><code>-ldb</code> (<code>use DB_File</code>)</a></strong>

<p>BerkeleyDB is available for Cygwin.</p>
<p>NOTE: The BerkeleyDB library only completely works on NTFS partitions.</p>
</li>
<li><strong><a name="item_lcygipc"><code>-lcygipc</code> (<code>use IPC::SysV</code>)</a></strong>

<p>A port of SysV IPC is available for Cygwin.</p>
<p>NOTE: This has <strong>not</strong> been extensively tested.  In particular,
<code>d_semctl_semun</code> is undefined because it fails a Configure test
and on Win9x the <em>shm*()</em> functions seem to hang.  It also creates
a compile time dependency because <em>perl.h</em> includes <em>&lt;sys/ipc.h</em>&gt;
and <em>&lt;sys/sem.h</em>&gt; (which will be required in the future when compiling
CPAN modules). CURRENTLY NOT SUPPORTED!</p>
</li>
<li><strong><a name="item__2dlutil"><code>-lutil</code></a></strong>

<p>Included with the standard Cygwin netrelease is the inetutils package 
which includes libutil.a.</p>
</li>
</ul>
<p>
</p>
<h2><a name="configuretime_options_for_perl_on_cygwin">Configure-time Options for Perl on Cygwin</a></h2>
<p>The <em>INSTALL</em> document describes several Configure-time options.  Some of
these will work with Cygwin, others are not yet possible.  Also, some of
these are experimental.  You can either select an option when Configure
prompts you or you can define (undefine) symbols on the command line.</p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?