home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _1aef4cfaaf2fe36a2ef3a22e599a6764 < prev    next >
Text File  |  2000-03-23  |  31KB  |  636 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>README.cygwin - Perl for Cygwin</TITLE>
  4. <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
  5. <LINK REV="made" HREF="mailto:">
  6. </HEAD>
  7.  
  8. <BODY>
  9. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  10. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  11. <STRONG><P CLASS=block> README.cygwin - Perl for Cygwin</P></STRONG>
  12. </TD></TR>
  13. </TABLE>
  14.  
  15. <A NAME="__index__"></A>
  16. <!-- INDEX BEGIN -->
  17.  
  18. <UL>
  19.  
  20.     <LI><A HREF="#name">NAME</A></LI>
  21.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  22.     <LI><A HREF="#prerequisites">PREREQUISITES</A></LI>
  23.     <UL>
  24.  
  25.         <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>
  26.         <LI><A HREF="#compiler">Compiler</A></LI>
  27.         <LI><A HREF="#cygwin configuration">Cygwin Configuration</A></LI>
  28.     </UL>
  29.  
  30.     <LI><A HREF="#configure">CONFIGURE</A></LI>
  31.     <UL>
  32.  
  33.         <LI><A HREF="#strip binaries">Strip Binaries</A></LI>
  34.         <LI><A HREF="#optional libraries">Optional Libraries</A></LI>
  35.         <LI><A HREF="#configuretime options">Configure-time Options</A></LI>
  36.         <LI><A HREF="#suspicious warnings">Suspicious Warnings</A></LI>
  37.     </UL>
  38.  
  39.     <LI><A HREF="#make">MAKE</A></LI>
  40.     <UL>
  41.  
  42.         <LI><A HREF="#warnings">Warnings</A></LI>
  43.         <LI><A HREF="#ld2">ld2</A></LI>
  44.     </UL>
  45.  
  46.     <LI><A HREF="#test">TEST</A></LI>
  47.     <UL>
  48.  
  49.         <LI><A HREF="#file permissions">File Permissions</A></LI>
  50.         <LI><A HREF="#hard links">Hard Links</A></LI>
  51.         <LI><A HREF="#filetime granularity">Filetime Granularity</A></LI>
  52.         <LI><A HREF="#tainting checks">Tainting Checks</A></LI>
  53.         <LI><A HREF="#/etc/group">/etc/group</A></LI>
  54.         <LI><A HREF="#unexplained failures">Unexplained Failures</A></LI>
  55.         <LI><A HREF="#script portability">Script Portability</A></LI>
  56.     </UL>
  57.  
  58.     <LI><A HREF="#install">INSTALL</A></LI>
  59.     <LI><A HREF="#manifest">MANIFEST</A></LI>
  60.     <LI><A HREF="#bugs">BUGS</A></LI>
  61.     <LI><A HREF="#authors">AUTHORS</A></LI>
  62.     <LI><A HREF="#history">HISTORY</A></LI>
  63. </UL>
  64. <!-- INDEX END -->
  65.  
  66. <HR>
  67. <P>
  68. <H1><A NAME="name">NAME</A></H1>
  69. <P>README.cygwin - Perl for Cygwin</P>
  70. <P>
  71. <HR>
  72. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  73. <P>This document will help you configure, make, test and install Perl
  74. on Cygwin.  This document also describes features of Cygwin that will
  75. affect how Perl behaves at runtime.</P>
  76. <P><STRONG>NOTE:</STRONG> There are pre-built Perl packages available for Cygwin and a
  77. version of Perl is provided on the Cygwin CD.  If you have no need to
  78. customize the configuration, consider using one of these packages:</P>
  79. <PRE>
  80.   <A HREF="http://cygutils.netpedia.net/">http://cygutils.netpedia.net/</A></PRE>
  81. <P>
  82. <HR>
  83. <H1><A NAME="prerequisites">PREREQUISITES</A></H1>
  84. <P>
  85. <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>
  86. <P>The Cygwin tools are ports of the popular GNU development tools for Win32
  87. platforms.  They run thanks to the Cygwin library which provides the UNIX
  88. system calls and environment these programs expect.  More information
  89. about this project can be found at:</P>
  90. <PRE>
  91.   <A HREF="http://sourceware.cygnus.com/cygwin/">http://sourceware.cygnus.com/cygwin/</A></PRE>
  92. <P>A recent net or commercial release of Cygwin is required.</P>
  93. <P>At the time this document was written, the port required recent
  94. development snapshots that were expected to stabilize early in 2000 and
  95. be released to the net as B21 and commercially as v1.1.</P>
  96. <P><STRONG>NOTE:</STRONG> At this point, minimal effort has been made to provide
  97. compatibility with old (beta) Cygwin releases.  The focus has been to
  98. provide a high quality release and not worry about working around old
  99. Cygwin bugs.  If you wish to use Perl with Cygwin B20.1 or earlier,
  100. consider using either perl5.005_03 or perl5.005_62, which are available
  101. in source and binary form at <CODE>http://cygutils.netpedia.net/</CODE> or on the
  102. Cygwin CD.  If there is significant demand, a patch kit can be developed
  103. to port back to earlier Cygwin versions.</P>
  104. <P>
  105. <H2><A NAME="compiler">Compiler</A></H2>
  106. <P>A recent net or commercial release of <EM>gcc</EM> is required.</P>
  107. <P>At the time this document was written, <EM>gcc-2.95.2</EM> was current and
  108. could be downloaded from:</P>
  109. <PRE>
  110.   <A HREF="ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95.2/">ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95.2/</A></PRE>
  111. <P>
  112. <H2><A NAME="cygwin configuration">Cygwin Configuration</A></H2>
  113. <P>While building Perl some changes may be necessary to your Cygwin setup so
  114. that Perl builds cleanly.  These changes are <STRONG>not</STRONG> required for normal
  115. Perl usage.</P>
  116. <P><STRONG>NOTE:</STRONG> The binaries that are built will run on all Win32 versions.
  117. They do not depend on your host system (Win9x, WinNT) or your Cygwin
  118. configuration (<EM>ntea</EM>, <EM>ntsec</EM>, binary/text mounts).  The only
  119. dependencies come from hardcoded pathnames like <CODE>/usr/local</CODE>.  However,
  120. your host system and Cygwin configuration will affect Perl's runtime
  121. behavior (see <A HREF="#test">TEST</A>).  Some regression tests may fail in different
  122. ways depending on your setup.  For now, the test suite does not skip
  123. tests that do not make sense given a particular setup.  If a test can
  124. pass in some Cygwin setup, it is left in and explainable test failures
  125. are documented.</P>
  126. <UL>
  127. <LI><STRONG><A NAME="item_PATH"><CODE>PATH</CODE></A></STRONG><BR>
  128.  
  129. Set the <A HREF="#item_PATH"><CODE>PATH</CODE></A> environment variable so that Configure finds the Cygwin
  130. versions of programs.  Any Windows directories should be removed or
  131. moved to the end of your <A HREF="#item_PATH"><CODE>PATH</CODE></A>.
  132. <P></P>
  133. <LI><STRONG><A NAME="item_%2Fbin%2Fcat%2Eexe"><EM>/bin/cat.exe</EM></A></STRONG><BR>
  134.  
  135. There should be an instance of <EM>cat</EM> in <EM>/bin</EM> (or <EM>/usr/bin</EM>).
  136. Configure tests <CODE>#!/bin/cat</CODE> and if it is not found, you will see
  137. the error:
  138. <PRE>
  139.   Configure: ./try: No such file or directory</PRE>
  140. <P></P>
  141. <LI><STRONG><A NAME="item_%2Fusr%2Fbin"><EM>/usr/bin</EM></A></STRONG><BR>
  142.  
  143. If you do not have a <EM>/usr/bin</EM> directory, Configure will <STRONG>not</STRONG> prompt
  144. you to install <EM>perl</EM> into <EM>/usr/bin</EM>.
  145. <P></P>
  146. <LI><STRONG><A NAME="item_nroff"><EM>nroff</EM></A></STRONG><BR>
  147.  
  148. If you do not have <EM>nroff</EM> (which is part of the <EM>groff</EM> package),
  149. Configure will <STRONG>not</STRONG> prompt you to install man pages.
  150. <P></P>
  151. <LI><STRONG><A NAME="item_Permissions">Permissions</A></STRONG><BR>
  152.  
  153. On WinNT with either the <EM>ntea</EM> or <EM>ntsec</EM> <CODE>CYGWIN</CODE> settings, directory
  154. and file permissions may not be set correctly.  Since the build process
  155. creates files and directories, to be safe you may want to run a `<CODE>chmod
  156. -R +w *</CODE>' on the entire Perl source tree.
  157. <P>Also, it is a well known WinNT ``feature'' that files created by a login
  158. that is a member of the <EM>Administrators</EM> group will be owned by the
  159. <EM>Administrators</EM> group.  Depending on your umask, you may find that you
  160. can not write to files that you just created (because you are no longer
  161. the owner).  When using the <EM>ntsec</EM> <CODE>CYGWIN</CODE> setting, this is not an
  162. issue because it ``corrects'' the ownership to what you would expect on
  163. a UNIX system.</P>
  164. <P></P></UL>
  165. <P>
  166. <HR>
  167. <H1><A NAME="configure">CONFIGURE</A></H1>
  168. <P>The default options gathered by Configure with the assistance of
  169. <EM>hints/cygwin.sh</EM> will build a Perl that supports dynamic loading
  170. (which requires a shared <EM>libperl.dll</EM>).</P>
  171. <P>This will run Configure and keep a record:</P>
  172. <PRE>
  173.   ./Configure 2>&1 | tee log.configure</PRE>
  174. <P>If you are willing to accept all the defaults add a <STRONG>-d</STRONG> option.
  175. However, several useful customizations are available.</P>
  176. <P>
  177. <H2><A NAME="strip binaries">Strip Binaries</A></H2>
  178. <P>It is possible to strip the EXEs and DLLs created by the build process.
  179. The resulting binaries will be significantly smaller.  If you want the
  180. binaries to be stripped, you can either add a <STRONG>-s</STRONG> option when Configure
  181. prompts you,</P>
  182. <PRE>
  183.   Any additional ld flags (NOT including libraries)? [none] -s
  184.   Any special flags to pass to gcc to use dynamic linking? [none] -s
  185.   Any special flags to pass to ld2 to create a dynamically loaded library?
  186.   [none] -s</PRE>
  187. <P>or you can edit <EM>hints/cygwin.sh</EM> and uncomment the relevant variables
  188. near the end of the file.</P>
  189. <P>
  190. <H2><A NAME="optional libraries">Optional Libraries</A></H2>
  191. <P>Several Perl functions and modules depend on the existence of
  192. some optional libraries.  Configure will find them if they are
  193. installed in one of the directories listed as being used for library
  194. searches.  Pre-built packages for most of these are available at
  195. <CODE>http://cygutils.netpedia.net/</CODE>.</P>
  196. <UL>
  197. <LI><STRONG><A NAME="item_%2Dlcrypt"><CODE>-lcrypt</CODE></A></STRONG><BR>
  198.  
  199. The crypt libraries in GNU libc have been ported to Cygwin.
  200. <P>The DES based Ultra Fast Crypt port was done by Alexey Truhan:</P>
  201. <PRE>
  202.   <A HREF="http://dome.weeg.uiowa.edu/pub/domestic/sos/cw32crypt-dist-0.tgz">http://dome.weeg.uiowa.edu/pub/domestic/sos/cw32crypt-dist-0.tgz</A></PRE>
  203. <P>NOTE: There are various export restrictions on DES implementations,
  204. see the glibc README for more details.</P>
  205. <P>The MD5 port was done by Andy Piper:</P>
  206. <PRE>
  207.   <A HREF="http://dome.weeg.uiowa.edu/pub/domestic/sos/libcrypt.tgz">http://dome.weeg.uiowa.edu/pub/domestic/sos/libcrypt.tgz</A></PRE>
  208. <P>More information can also be found at:</P>
  209. <PRE>
  210.   <A HREF="http://miracle.geol.msu.ru/sos/">http://miracle.geol.msu.ru/sos/</A></PRE>
  211. <P></P>
  212. <LI><STRONG><A NAME="item_lgdbm"><CODE>-lgdbm</CODE> (<CODE>use GDBM_File</CODE>)</A></STRONG><BR>
  213.  
  214. GDBM is available for Cygwin.  GDBM's ndbm/dbm compatibility feature
  215. also makes <CODE>NDBM_File</CODE> and <CODE>ODBM_File</CODE> possible (although they add
  216. little extra value).
  217. <P></P>
  218. <LI><STRONG><A NAME="item_ldb"><CODE>-ldb</CODE> (<CODE>use DB_File</CODE>)</A></STRONG><BR>
  219.  
  220. BerkeleyDB is available for Cygwin.  Some details can be found in
  221. <EM>ext/DB_File/DB_File.pm</EM>.
  222. <P></P>
  223. <LI><STRONG><A NAME="item_lcygipc"><CODE>-lcygipc</CODE> (<CODE>use IPC::SysV</CODE>)</A></STRONG><BR>
  224.  
  225. A port of SysV IPC is available for Cygwin.
  226. <P>NOTE: This has <STRONG>not</STRONG> been extensively tested.  In particular,
  227. <CODE>d_semctl_semun</CODE> is undefined because it fails a configure test and on
  228. Win9x the shm*() functions seem to hang.</P>
  229. <P></P></UL>
  230. <P>
  231. <H2><A NAME="configuretime options">Configure-time Options</A></H2>
  232. <P>The <EM>INSTALL</EM> document describes several Configure-time options.  Some of
  233. these will work with Cygwin, others are not yet possible.  Also, some of
  234. these are experimental.  You can either select an option when Configure
  235. prompts you or you can define (undefine) symbols on the command line.</P>
  236. <UL>
  237. <LI><STRONG><A NAME="item_%2DUusedl"><CODE>-Uusedl</CODE></A></STRONG><BR>
  238.  
  239. Undefining this symbol forces Perl to be compiled statically.
  240. <P></P>
  241. <LI><STRONG><A NAME="item_%2DUusemymalloc"><CODE>-Uusemymalloc</CODE></A></STRONG><BR>
  242.  
  243. By default Perl uses the <CODE>malloc()</CODE> included with the Perl source.  If you
  244. want to force Perl to build with the system <CODE>malloc()</CODE> undefine this symbol.
  245. <P></P>
  246. <LI><STRONG><A NAME="item_%2DDusemultiplicity"><CODE>-Dusemultiplicity</CODE></A></STRONG><BR>
  247.  
  248. Multiplicity is required when embedding Perl in a C program and using
  249. more than one interpreter instance.  This works with the Cygwin port.
  250. <P></P>
  251. <LI><STRONG><A NAME="item_%2DDuseperlio"><CODE>-Duseperlio</CODE></A></STRONG><BR>
  252.  
  253. The PerlIO abstraction works with the Cygwin port.
  254. <P></P>
  255. <LI><STRONG><A NAME="item_%2DDuse64bitint"><CODE>-Duse64bitint</CODE></A></STRONG><BR>
  256.  
  257. <EM>gcc</EM> supports 64-bit integers.  However, several additional long long
  258. functions are necessary to use them within Perl (<EM>{strtol,strtoul}l</EM>).
  259. These are <STRONG>not</STRONG> yet available with Cygwin.
  260. <P></P>
  261. <LI><STRONG><A NAME="item_%2DDuselongdouble"><CODE>-Duselongdouble</CODE></A></STRONG><BR>
  262.  
  263. <EM>gcc</EM> supports long doubles (12 bytes).  However, several additional
  264. long double math functions are necessary to use them within Perl
  265. (<EM>{atan2,cos,exp,floor,fmod,frexp,log,modf,pow,sin,sqrt}l,strtold</EM>).
  266. These are <STRONG>not</STRONG> yet available with Cygwin.
  267. <P></P>
  268. <LI><STRONG><A NAME="item_%2DDusethreads"><CODE>-Dusethreads</CODE></A></STRONG><BR>
  269.  
  270. POSIX threads are <STRONG>not</STRONG> yet implemented in Cygwin.
  271. <P></P>
  272. <LI><STRONG><A NAME="item_%2DDuselargefiles"><CODE>-Duselargefiles</CODE></A></STRONG><BR>
  273.  
  274. Although Win32 supports large files, Cygwin currently uses 32-bit integers
  275. for internal size and position calculations.
  276. <P></P></UL>
  277. <P>
  278. <H2><A NAME="suspicious warnings">Suspicious Warnings</A></H2>
  279. <P>You may see some messages during Configure that seem suspicious.</P>
  280. <UL>
  281. <LI><STRONG><A NAME="item_Whoa_There">Whoa There</A></STRONG><BR>
  282.  
  283. Cygwin does not yet implement chroot(), <CODE>setegid()</CODE> or <CODE>seteuid()</CODE>
  284. functionality, but has stub functions that return <CODE>ENOSYS</CODE>.  You will
  285. see a message when Configure detects that its guess conflicts with the
  286. hint file.
  287. <PRE>
  288.   *** WHOA THERE!!! ***
  289.       The recommended value for $d_chroot on this machine was "undef"!
  290.       Keep the recommended value? [y]</PRE>
  291. <P>You should keep the recommended value.</P>
  292. <P></P>
  293. <LI><STRONG><A NAME="item_dlsym">dlsym</A></STRONG><BR>
  294.  
  295. <EM>ld2</EM> is needed to build dynamic libraries, but it does not exist
  296. when <A HREF="#item_dlsym"><CODE>dlsym()</CODE></A> checking occurs (it is not created until `<CODE>make</CODE>' runs).
  297. You will see the following message:
  298. <PRE>
  299.   Checking whether your dlsym() needs a leading underscore ...
  300.   I can't compile and run the test program.
  301.   I'm guessing that dlsym doesn't need a leading underscore.</PRE>
  302. <P>Since the guess is correct, this is not a problem.</P>
  303. <P></P>
  304. <LI><STRONG><A NAME="item_Win9x_and_d_eofnblk">Win9x and d_eofnblk</A></STRONG><BR>
  305.  
  306. Win9x does not correctly report <CODE>EOF</CODE> with a non-blocking read on a
  307. closed pipe.  You will see the following messages:
  308. <PRE>
  309.   But it also returns -1 to signal EOF, so be careful!
  310.   WARNING: you can't distinguish between EOF and no data!</PRE>
  311. <PRE>
  312.   *** WHOA THERE!!! ***
  313.       The recommended value for $d_eofnblk on this machine was "define"!
  314.       Keep the recommended value? [y]</PRE>
  315. <P>At least for consistency with WinNT, you should keep the recommended
  316. value.</P>
  317. <P></P>
  318. <LI><STRONG><A NAME="item_Checking_how_std_your_stdio_is%2E%2E%2E">Checking how std your stdio is...</A></STRONG><BR>
  319.  
  320. Configure reports:
  321. <PRE>
  322.   Your stdio doesn't appear very std.</PRE>
  323. <P>This is correct.</P>
  324. <P></P>
  325. <LI><STRONG><A NAME="item_Compiler%2FPreprocessor_defines">Compiler/Preprocessor defines</A></STRONG><BR>
  326.  
  327. The following error occurs because of the Cygwin <CODE>#define</CODE> of
  328. <CODE>_LONG_DOUBLE</CODE>:
  329. <PRE>
  330.   Guessing which symbols your C compiler and preprocessor define...
  331.   try.c:3847: parse error</PRE>
  332. <P>This failure does not seem to cause any problems.</P>
  333. <P></P></UL>
  334. <P>
  335. <HR>
  336. <H1><A NAME="make">MAKE</A></H1>
  337. <P>Simply run make and wait:</P>
  338. <PRE>
  339.   make 2>&1 | tee log.make</PRE>
  340. <P>
  341. <H2><A NAME="warnings">Warnings</A></H2>
  342. <P>Warnings like these are normal:</P>
  343. <PRE>
  344.   warning: overriding commands for target <file>
  345.   warning: ignoring old commands for target <file></PRE>
  346. <PRE>
  347.   Warning: no export definition file provided
  348.   dllwrap will create one, but may not be what you want</PRE>
  349. <P>
  350. <H2><A NAME="ld2">ld2</A></H2>
  351. <P>During `<CODE>make</CODE>', <EM>ld2</EM> will be created and installed in your $installbin
  352. directory (where you said to put public executables).  It does not
  353. wait until the `<CODE>make install</CODE>' process to install the <EM>ld2</EM> script,
  354. this is because the remainder of the `<CODE>make</CODE>' refers to <EM>ld2</EM> without
  355. fully specifying its path and does this from multiple subdirectories.
  356. The assumption is that $installbin is in your current <A HREF="#item_PATH"><CODE>PATH</CODE></A>.  If this
  357. is not the case or if you do not have an <EM>install</EM> program, `<CODE>make</CODE>'
  358. will fail at some point.  If this happens, just manually copy <EM>ld2</EM>
  359. from the source directory to someplace in your <A HREF="#item_PATH"><CODE>PATH</CODE></A>.</P>
  360. <P>
  361. <HR>
  362. <H1><A NAME="test">TEST</A></H1>
  363. <P>There are two steps to running the test suite:</P>
  364. <PRE>
  365.   make test 2>&1 | tee log.make-test</PRE>
  366. <PRE>
  367.   cd t;./perl harness 2>&1 | tee ../log.harness</PRE>
  368. <P>The same tests are run both times, but more information is provided when
  369. running as `<CODE>./perl harness</CODE>'.</P>
  370. <P>Test results vary depending on your host system and your Cygwin
  371. configuration.  It is possible that Cygwin will pass all the tests,
  372. but it is more likely that some tests will fail for one of these reasons.</P>
  373. <P>
  374. <H2><A NAME="file permissions">File Permissions</A></H2>
  375. <P>UNIX file permissions are based on sets of mode bits for
  376. {read,write,execute} for each {user,group,other}.  By default Cygwin only
  377. tracks the Win32 readonly attribute represented as the UNIX file user
  378. write bit (files are always readable, files are executable if they have
  379. a <EM>.{com,bat,exe}</EM> extension or begin with <CODE>#!</CODE>, directories are always
  380. readable and executable).  On WinNT with the <EM>ntea</EM> <CODE>CYGWIN</CODE> setting,
  381. the remaining mode bits are stored as extended attributes.  On WinNT
  382. with the <EM>ntsec</EM> <CODE>CYGWIN</CODE> setting, permissions use the standard WinNT
  383. security descriptors and access control lists.  Without one of these
  384. options, these tests will fail:</P>
  385. <PRE>
  386.   Failed Test           List of failed
  387.   ------------------------------------
  388.   io/fs.t               5, 7, 9-10
  389.   lib/anydbm.t          2
  390.   lib/db-btree.t        20
  391.   lib/db-hash.t         16
  392.   lib/db-recno.t        18
  393.   lib/gdbm.t            2
  394.   lib/ndbm.t            2
  395.   lib/odbm.t            2
  396.   lib/sdbm.t            2
  397.   op/stat.t             9, 20 (.tmp not an executable extension)</PRE>
  398. <P>
  399. <H2><A NAME="hard links">Hard Links</A></H2>
  400. <P>FAT partitions do not support hard links (whereas NTFS does), in which
  401. case Cygwin implements <A HREF="../../lib/Pod/perlfunc.html#item_link"><CODE>link()</CODE></A> by copying the file.  These tests will fail:</P>
  402. <PRE>
  403.   Failed Test           List of failed
  404.   ------------------------------------
  405.   io/fs.t               4
  406.   op/stat.t             3</PRE>
  407. <P>
  408. <H2><A NAME="filetime granularity">Filetime Granularity</A></H2>
  409. <P>On FAT partitions the filetime granularity is 2 seconds.  The following
  410. test will fail:</P>
  411. <PRE>
  412.   Failed Test           List of failed
  413.   ------------------------------------
  414.   io/fs.t               18</PRE>
  415. <P>
  416. <H2><A NAME="tainting checks">Tainting Checks</A></H2>
  417. <P>When Perl is running in taint mode, <CODE>$ENV{PATH}</CODE> is considered tainted
  418. and not used, so DLLs not in the default system directories will not
  419. be found.  While the tests are running you will see warnings popup from
  420. the system with messages like:</P>
  421. <PRE>
  422.   Win9x
  423.     Error Starting Program
  424.     A required .DLL file, CYGWIN1.DLL, was not found</PRE>
  425. <PRE>
  426.   WinNT
  427.     perl.exe or sh.exe - Unable to Locate DLL
  428.     The dynamic link library cygwin1.dll could not be found in the
  429.       specified path ...</PRE>
  430. <P>Just click OK and ignore them.  When running `<CODE>make test</CODE>', 2 popups
  431. occur.  During `<CODE>./perl harness</CODE>', 4 popups occur.  Also, these tests
  432. will fail:</P>
  433. <PRE>
  434.   Failed Test           List of failed
  435.   ------------------------------------
  436.   op/taint.t            1, 3, 31, 37</PRE>
  437. <P>Alternatively, you can copy <EM>cygwin1.dll</EM> into one of the Windows system
  438. directories (although, this is <STRONG>not</STRONG> recommended).</P>
  439. <P>
  440. <H2><A NAME="/etc/group">/etc/group</A></H2>
  441. <P>Cygwin does not require <EM>/etc/group</EM>, in which case the <EM>op/grent.t</EM>
  442. test will be skipped.  The check performed by <EM>op/grent.t</EM> expects to
  443. see entries that use the members field, otherwise this test will fail:</P>
  444. <PRE>
  445.   Failed Test           List of failed
  446.   ------------------------------------
  447.   op/grent.t            1</PRE>
  448. <P>
  449. <H2><A NAME="unexplained failures">Unexplained Failures</A></H2>
  450. <P>Any additional tests that fail are likely due to bugs in Cygwin or the
  451. optional libraries.  It is expected that by the time of the next net
  452. release most of these will be solved so they are not described here.</P>
  453. <P>
  454. <H2><A NAME="script portability">Script Portability</A></H2>
  455. <P>Cygwin does an outstanding job of providing UNIX-like semantics on
  456. top of Win32 systems.  However, in addition to the items noted above,
  457. there are some differences that you should know about.  This is only a
  458. very brief guide to portability, more information can be found in the
  459. Cygwin documentation.</P>
  460. <UL>
  461. <LI><STRONG><A NAME="item_Pathnames">Pathnames</A></STRONG><BR>
  462.  
  463. Cygwin pathnames can be separated by forward (<EM>/</EM>) or backward (<EM>\</EM>)
  464. slashes.  They may also begin with drive letters (<EM>C:</EM>) or Universal
  465. Naming Codes (<EM>//UNC</EM>).  DOS device names (<EM>aux</EM>, <EM>con</EM>, <EM>prn</EM>,
  466. <EM>com*</EM>, <EM>lpt?</EM>) are invalid as base filenames.  However, they can be
  467. used in extensions (e.g., <EM>hello.aux</EM>).  Names may not contain these
  468. characters:
  469. <PRE>
  470.   : * ? " < > |</PRE>
  471. <P>File names are case insensitive, but case preserving.  With the <EM>mixed</EM>
  472. <CODE>CYGWIN</CODE> setting, file names are mixed-case (although, directory names
  473. remain case insensitive).</P>
  474. <P>The <EM>mixed</EM> setting is only available with the ``coolview'' version of
  475. <EM>cygwin1.dll</EM> provided by Sergey Okhapkin at:</P>
  476. <PRE>
  477.   <A HREF="ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Okhapkin_Sergey/">ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Okhapkin_Sergey/</A></PRE>
  478. <P></P>
  479. <LI><STRONG><A NAME="item_Text%2FBinary">Text/Binary</A></STRONG><BR>
  480.  
  481. When a file is opened it is in either text or binary mode.  In text mode
  482. a file is subject to CR/LF/Ctrl-Z translations.  With Cygwin, the default
  483. mode for an <A HREF="../../lib/Pod/perlfunc.html#item_open"><CODE>open()</CODE></A> is determined by the mode of the mount that underlies
  484. the file.  Perl provides a <A HREF="../../lib/Pod/perlfunc.html#item_binmode"><CODE>binmode()</CODE></A> function to set binary mode on files
  485. that otherwise would be treated as text.  <A HREF="../../lib/Pod/perlfunc.html#item_sysopen"><CODE>sysopen()</CODE></A> with the <CODE>O_TEXT</CODE>
  486. flag sets text mode on files that otherwise would be treated as binary:
  487. <PRE>
  488.     sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)</PRE>
  489. <P>lseek(), <A HREF="../../lib/Pod/perlfunc.html#item_tell"><CODE>tell()</CODE></A> and <A HREF="../../lib/Pod/perlfunc.html#item_sysseek"><CODE>sysseek()</CODE></A> only work with files opened in binary mode.</P>
  490. <P>The text/binary issue is covered at length in the Cygwin documentation.</P>
  491. <P></P>
  492. <LI><STRONG><A NAME="item_%2Eexe"><EM>.exe</EM></A></STRONG><BR>
  493.  
  494. The Cygwin <A HREF="../../lib/Pod/perlfunc.html#item_stat"><CODE>stat()</CODE></A> makes the <EM>.exe</EM> extension transparent by looking for
  495. a <EM>foo.exe</EM> when you ask for <EM>foo</EM> (unless a <EM>foo</EM> also exists).
  496. Cygwin does not require a <EM>.exe</EM> extension, but <EM>gcc</EM> adds it
  497. automatically when building a program.  However, when accessing an
  498. executable as a normal file (e.g., <EM>install</EM> or <EM>cp</EM> in a makefile)
  499. the <EM>.exe</EM> is not transparent.
  500. <P>NOTE: There is a version of <EM>install</EM> that understands the <EM>.exe</EM>
  501. semantics, it can be found at:</P>
  502. <PRE>
  503.   <A HREF="ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/">ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/</A></PRE>
  504. <P></P>
  505. <LI><STRONG><A NAME="item_chown"><CODE>chown()</CODE></A></STRONG><BR>
  506.  
  507. On WinNT with the <EM>ntsec</EM> <CODE>CYGWIN</CODE> setting, <A HREF="#item_chown"><CODE>chown()</CODE></A> can change a file's
  508. user and group IDs.  In all other configurations <A HREF="#item_chown"><CODE>chown()</CODE></A> is a no-op,
  509. although this is appropriate on Win9x since there is no security model.
  510. <P></P>
  511. <LI><STRONG><A NAME="item_Miscellaneous">Miscellaneous</A></STRONG><BR>
  512.  
  513. File locking using the <CODE>F_GETLK</CODE> command to <A HREF="../../lib/Pod/perlfunc.html#item_fcntl"><CODE>fcntl()</CODE></A> is a stub that
  514. returns <CODE>ENOSYS</CODE>.
  515. <P>Win9x can not <A HREF="../../lib/Pod/perlfunc.html#item_rename"><CODE>rename()</CODE></A> an open file (although WinNT can).</P>
  516. <P></P></UL>
  517. <P>
  518. <HR>
  519. <H1><A NAME="install">INSTALL</A></H1>
  520. <P>This will install Perl, including man pages.</P>
  521. <PRE>
  522.   make install | tee log.make-install</PRE>
  523. <P>NOTE: If <CODE>STDERR</CODE> is redirected `<CODE>make install</CODE>' will <STRONG>not</STRONG> prompt
  524. you to install <EM>perl</EM> into <EM>/usr/bin</EM>.</P>
  525. <P>You may need to be <EM>Administrator</EM> to run `<CODE>make install</CODE>'.  If you
  526. are not, you must have write access to the directories in question.</P>
  527. <P>Information on installing the Perl documentation in HTML format can be
  528. found in the <EM>INSTALL</EM> document.</P>
  529. <P>
  530. <HR>
  531. <H1><A NAME="manifest">MANIFEST</A></H1>
  532. <P>These are the files in the Perl release that contain references to Cygwin.
  533. These very brief notes attempt to explain the reason for all conditional
  534. code.  Hopefully, keeping this up to date will allow the Cygwin port to
  535. be kept as clean as possible.</P>
  536. <DL>
  537. <DT><STRONG><A NAME="item_Documentation">Documentation</A></STRONG><BR>
  538. <DD>
  539. <PRE>
  540.   INSTALL README.cygwin
  541.   Changes Changes5.005 Changes5.004
  542.   AUTHORS MAINTAIN MANIFEST README.win32
  543.   pod/perl.pod pod/<A HREF="../../lib/Pod/perlfaq3.html">perlfaq3</A>.pod pod/<A HREF="../../lib/Pod/perlhist.html">perlhist</A>.pod pod/<A HREF="../../lib/Pod/perlmodlib.html">perlmodlib</A>.pod
  544.   pod/<A HREF="../../lib/Pod/perlport.html">perlport</A>.pod pod/<A HREF="../../lib/Pod/perltoc.html">perltoc</A>.pod pod/<A HREF="../../lib/Pod/perl5004delta.html">perl5004delta</A>.pod</PRE>
  545. <DT><STRONG><A NAME="item_Build%2C_Configure%2C_Make%2C_Install">Build, Configure, Make, Install</A></STRONG><BR>
  546. <DD>
  547. <PRE>
  548.   cygwin/Makefile.SHs
  549.   cygwin/ld2.in
  550.   cygwin/perlld.in
  551.   ext/IPC/SysV/hints/cygwin.pl
  552.   ext/NDBM_File/hints/cygwin.pl
  553.   ext/ODBM_File/hints/cygwin.pl
  554.   hints/cygwin.sh
  555.   Configure             - help finding hints from uname,
  556.                           shared libperl required for dynamic loading
  557.   Makefile.SH           - linklibperl
  558.   Porting/patchls       - cygwin in port list
  559.   installman            - man pages with :: translated to .
  560.   installperl           - install dll/ld2/perlld, install to pods
  561.   makedepend.SH         - uwinfix</PRE>
  562. <DT><STRONG><A NAME="item_Tests">Tests</A></STRONG><BR>
  563. <DD>
  564. <PRE>
  565.   t/io/tell.t           - binmode
  566.   t/lib/glob-basic.t    - Win32 directory list access differs from read mode
  567.   t/op/magic.t          - $^X/symlink WORKAROUND, s/.exe//
  568.   t/op/stat.t           - no /dev, skip Win32 ftCreationTime quirk
  569.                           (cache manager sometimes preserves ctime of file
  570.                           previously created and deleted), no -u (setuid)</PRE>
  571. <DT><STRONG><A NAME="item_Compiled_Perl_Source">Compiled Perl Source</A></STRONG><BR>
  572. <DD>
  573. <PRE>
  574.   EXTERN.h              - __declspec(dllimport)
  575.   XSUB.h                - __declspec(dllexport)
  576.   cygwin/cygwin.c       - os_extras (getcwd)
  577.   perl.c                - os_extras
  578.   perl.h                - binmode
  579.   doio.c                - win9x can not rename a file when it is open
  580.   pp_sys.c              - do not define h_errno
  581.   mg.c                  - environ WORKAROUND
  582.   unixish.h             - environ WORKAROUND
  583.   util.c                - environ WORKAROUND</PRE>
  584. <DT><STRONG><A NAME="item_Compiled_Module_Source">Compiled Module Source</A></STRONG><BR>
  585. <DD>
  586. <PRE>
  587.   ext/POSIX/POSIX.xs    - tzname defined externally
  588.   ext/SDBM_File/sdbm/pair.c
  589.                         - EXTCONST needs to be redefined from EXTERN.h
  590.   ext/SDBM_File/sdbm/sdbm.c
  591.                         - binary open</PRE>
  592. <DT><STRONG><A NAME="item_Perl_Modules%2FScripts">Perl Modules/Scripts</A></STRONG><BR>
  593. <DD>
  594. <PRE>
  595.   lib/Cwd.pm            - hook to internal Cwd::cwd
  596.   lib/ExtUtils/MakeMaker.pm
  597.                         - require MM_Cygwin.pm
  598.   lib/ExtUtils/MM_Cygwin.pm
  599.                         - canonpath, cflags, manifypods, perl_archive
  600.   lib/File/Spec/Unix.pm - preserve //unc
  601.   lib/perl5db.pl        - use stdin not /dev/tty
  602.   utils/perlcc.PL       - DynaLoader.a in compile, -DUSEIMPORTLIB
  603.   utils/perldoc.PL      - version comment</PRE>
  604. </DL>
  605. <P>
  606. <HR>
  607. <H1><A NAME="bugs">BUGS</A></H1>
  608. <P>Upon each start, <EM>make</EM> warns that a rule for <EM>perlmain.o</EM> is overridden
  609. (but there seems to be no better solution than adding an explicit define).</P>
  610. <P>`<CODE>make clean</CODE>' does not remove library <EM>.def</EM> and <EM>.exe.stackdump</EM>
  611. files.</P>
  612. <P>The <EM>ld2</EM> script contains references to the source directory.  You should
  613. change these to <CODE>/usr/local/bin</CODE> (or whatever) after install.</P>
  614. <P>
  615. <HR>
  616. <H1><A NAME="authors">AUTHORS</A></H1>
  617. <P>Charles Wilson <<A HREF="mailto:cwilson@ece.gatech.edu">cwilson@ece.gatech.edu</A>>,
  618. Eric Fifer <<A HREF="mailto:efifer@sanwaint.com">efifer@sanwaint.com</A>>,
  619. alexander smishlajev <<A HREF="mailto:als@turnhere.com">als@turnhere.com</A>>,
  620. Steven Morlock <<A HREF="mailto:newspost@morlock.net">newspost@morlock.net</A>>,
  621. Sebastien Barre <<A HREF="mailto:Sebastien.Barre@utc.fr">Sebastien.Barre@utc.fr</A>>,
  622. Teun Burgers <<A HREF="mailto:burgers@ecn.nl">burgers@ecn.nl</A>>.</P>
  623. <P>
  624. <HR>
  625. <H1><A NAME="history">HISTORY</A></H1>
  626. <P>Last updated: 1 March 2000</P>
  627. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  628. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  629. <STRONG><P CLASS=block> README.cygwin - Perl for Cygwin</P></STRONG>
  630. </TD></TR>
  631. </TABLE>
  632.  
  633. </BODY>
  634.  
  635. </HTML>
  636.