This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
NeXT doesn't have FD_CLOEXEC (suggested by Hans Mulder)
[perl5.git] / README.cygwin32
CommitLineData
8736538c
AS
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
5aabfad6 4
8736538c 5=head1 NAME
5aabfad6 6
8736538c 7README.cygwin32 - notes about porting Perl to Cygwin32
5aabfad6 8
8736538c 9=head1 SYNOPSIS
5aabfad6 10
8736538c 11=over
5aabfad6 12
8736538c 13=item Cygwin32
5aabfad6 14
8736538c
AS
15 The Cygwin tools are ports of the popular GNU development tools for
16Windows NT, 95, and 98. They run thanks to the Cygwin library which
17provides the UNIX system calls and environment these programs expect.
18More info about this project can be found at it's home page
19http://sourceware.cygnus.com/cygwin/
5aabfad6 20
f89d6eaa 21=item libperl.dll
8736538c 22
f89d6eaa
FE
23These instructions and the default cygwin32 hints build a a shared
24libperl.dll Perl library and enables dynamically loaded extensions.
8736538c 25
8736538c
AS
26
27=back
28
29=head1 BUILDING
30
31=head2 Prerequisites
32
33=over
34
35=item Cygwin b20.1
36
f89d6eaa 37The latest stable Cygwin suite is beta20.1. It may be
8736538c
AS
38downloaded from ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/
39or many mirror sites around the world.
40
41=item egcs-1.1.2
42
f89d6eaa 43This port was built with egcs-1.1.2 downloaded from
8736538c
AS
44ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/egcs-1.1.2/
45
f89d6eaa 46=item install executable
8736538c 47
f89d6eaa
FE
48To make life easier, you should download
49ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/install-cygwin-b20.sh,
50and use it as your install "executable." Just follow the instructions
51that are embedding as comments in the .sh file.
8736538c
AS
52
53=item crypt library
54
f89d6eaa
FE
55http://miracle.geol.msu.ru/sos/ points to two different crypt
56libraries ported to cygwin. This has been tested with the libcrypt.tgz
57by Andy Piper. His home page can be found at
58http://www.xemacs.freeserve.co.uk/
8736538c
AS
59
60=back
61
62=head2 Configure
63
f89d6eaa
FE
64Check hints/cygwin32.sh for any system specific settings. In
65particular change libpth if Cygwin is installed somewhere other
66than /cygnus.
67
8736538c
AS
68run "sh Configure".
69
70When confronted with this prompt:
71
72=begin text
5aabfad6
PP
73
74 First time through, eh? I have some defaults handy for the
75 following systems:
76 .
77 .
78 .
79 Which of these apply, if any?
80
8736538c
AS
81=end text
82
f89d6eaa 83select "cygwin32".
8736538c 84
f89d6eaa
FE
85Do not use the malloc that comes with perl--using the perl malloc
86collides with some cygwin startup routines.
8736538c
AS
87
88=head2 make
89
f89d6eaa
FE
90Run "make". After that, run "make test" to see how stable your system is.
91For me, at io/taint.t you may see several Win32 "Unable To Locate DLL"
92messages (just click Ok) that requires cygwin1.dll to be present in the
93build directory or somewhere in system path (/WINNT, /WINNT/System,
94/WINNT/System32). And, at lib/io_sock.t you may see several Win32
95"Application Error" messages (just click Ok) and the test waits for a
96died child that has to be killed manually. Other test scripts seem to
97be more or less harmless. The result of ./perl harness reads:
8736538c
AS
98
99=begin text
100
101Failed Test Status Wstat Total Fail Failed List of failed
102-------------------------------------------------------------------------------
103lib/anydbm.t 2 512 12 8 66.67% 5-12
104lib/findbin.t 1 1 100.00% 1
f89d6eaa 105lib/io_sock.t 9 2304 5 4 80.00% 2-5
8736538c 106lib/sdbm.t 2 512 18 15 83.33% 2, 5-18
f89d6eaa
FE
107op/magic.t 35 2 5.71% 23, 29
108op/split.t 25 1 4.00% 11
109op/stat.t 58 2 3.45% 9, 26
110op/taint.t 149 3 2.01% 1, 3, 31
8736538c 111pragma/locale.t 11 2816 102 4 3.92% 99-102
f89d6eaa
FE
1129 tests skipped, plus 35 subtests skipped.
113Failed 9/190 test scripts, 95.26% okay. 40/6452 subtests failed, 99.38% okay.
8736538c
AS
114
115=end text
116
117=head1 BUGS
118
f89d6eaa
FE
119A lot of warnings about incompatible pointer types and comparison
120lacking a cast. This is because of __declspec(dllimport).
8736538c 121
f89d6eaa
FE
122Upon each start, make warns that a rule for perlmain.o is overrided.
123Yes, it is. In order to use libperl.dll, perlmain needs to import
124symbols from there. I saw no better solution than adding an explicit
8736538c
AS
125define to the rule.
126
f89d6eaa
FE
127The lib/io_sock.t failure seems to be a problem with a forked child
128not having its DLLs remapped.
8736538c 129
f89d6eaa 130make clean does not remove library .def and .exe.core files.
8736538c 131
f89d6eaa 132ld2 script is installed with reference to source directory. You should
8736538c
AS
133change this to /usr/local/bin (or whatever) after install.
134
135.bat wrappers for installed utility scripts are not made during installation.
5aabfad6 136
8736538c 137=head1 AUTHOR
5aabfad6 138
8736538c 139alexander smishlajev <als@turnhere.com>
5aabfad6 140
8736538c 141=head1 DISCLAIMER
5aabfad6 142
f89d6eaa
FE
143I am not going to maintain this document or this port. I only wanted
144to make perl porting a bit easier. If failed, I can't be helpful for you.
5aabfad6 145
8736538c 146=head1 HISTORY
5aabfad6 147
8736538c
AS
14817..25-apr-1999. perl 5.005_03. cygwin b20.1 egcs 1.1.2.
149 far 1.60. nescafe classic.
5aabfad6 150
f89d6eaa
FE
151efifer@sanwaint.com - Wed May 12 17:22:42 BST 1999
152
153 Removed all references to the impure_ptr hack since it is no longer
154 needed. Some minor cleanup of Alexander's work and a few bug fixes.
155
8736538c 156=cut