Put back the cygwin32 Configure fix of 3582 undone by 3597.
[p5sagit/p5-mst-13.2.git] / cygwin32 / build-instructions.steven-morlock
CommitLineData
1cab015a 1This document is obsolete. Refer to README.cygwin32.
2
3From comp.lang.perl.misc. perl5.005_03-static-patch
4implements most of the suggestions below. My observations during the
5build process are commented within the body of Mr. Morlock's message,
6set off by ******CSW******
8736538c 7
8
9**************************************
10Subject: HOWTO: Builiding Perl under Win95/98 using Cygwin32
11Author: Steven Morlock <newspost@morlock.net>
12Date: 1998/12/21
13Forum: comp.lang.perl.misc
14
15If you have a desire to build Perl under Windows 95/98 using Cygnus'
16Cygwin Win32 ports of the GNU development tools (Cygwin32) you might
17get something out of my experience of building it.
18
19An advantage of the versions Perl built with Cygwin32 is that Cygwin32
1cab015a 20has a POSIX compatible library including support for the fork()
21function.
8736538c 22
23Steve
24
25--
26Steven Morlock
27Foliage Software Systems
28aka The Nerd Farm
29http://www.foliage.com
30==
31
32These are the steps I took to build the latest development
33version of Perl (5.005.53) under the Windows 95 & Window 98
34operating system using Cygnus' Cygwin Win32 ports of the GNU
35development tools.
36
37The release of the Cygwin32 tools used was B20.1. These tools
38can be found at:
39
40 http://sourceware.cygnus.com/cygwin
41
42Install Cygwin32 as described on the Cygnus web site. Additionally
43you should mount /bin as described in the following document:
44
45 http://sourceware.cygnus.com/cygwin/cygwin-ug-net/setup-mount.html
46
47Note that the mount command shown in their example should appear on a
48single line:
49
50 mount C:/cygnus/cygwin-b20/H-i586-cygwin32/bin /bin
51
52You must run the described build process below under the Cygwin32
53'bash' shell.
54
55In the following <PERL> will refer to the perl source/build
56directory. <INST> will refer to the perl target/install directory.
57
58* Pre-build checklist:
59
1cab015a 60 - I found that building Perl on a unmounted partition/drive other
61 than the root will fail. It appears that the double forward slash
62 that Cygwin32 uses to reference drives other than the root drive
63 (typically C:) gets converted to a single forward slash at several
64 points in the build process. I have not tried, but expect it would
65 work, to mount the non-root drive. This problem held true for both
66 the drive where the perl source were and the drive where the
67 Cygwin32 binaries where located. In the build described in these
68 notes the Perl source and Cygwin32 binaries were located on the
69 root drive.
8736538c 70
71 - Following the instructions in <PERL>/README.cygwin32:
72*******CSW********
73apply the patch, first
74******************
75
76 + Copy the contents of the <PERL>cygwin32 directory to <PERL>
77
78 + Edit the 'ld2' & 'gcc2' scripts to reflect the build path <PERL>
79
80 + Either move 'ld2' & 'gcc2' to a directory on your path or add
81 <PERL> to you path.
82
83 - Edit <PERL>/hints/cygwin32.sh:
84
85 + Add the following lines to the script:
86*******CSW********
87the patch does this
88******************
89 i_stdarg='define'
90 i_varargs='undef'
91
1cab015a 92 This change allows us to pick up the right version of
93 va_start(). Cygwin32 has both a signal and double parameter
94 versions floating around in their header files.
8736538c 95
1cab015a 96 + Remove support for dynamic linking. I found that all
97 DynaLoader'd extensions crashed during the running of the
98 test suite. Add or edit 'usedl' entry to read:
8736538c 99*******CSW********
100the patch does this
101******************
102 usedl='n'
103
104 If there is enough push I will try to sort out the problems with
105 dynamic loading. I have made several unsuccessful attempts at
1cab015a 106 modifying <PERL>/perlld to fix this problem. If you are
107 interested, write me.
8736538c 108
109 + Change the path to the Cygwin32 directories. This includes the
1cab015a 110 entries for 'usrinc', 'libpth', 'lddlflags', 'libc' and
111 'usrinc'.
8736538c 112*******CSW********
113the patch does this ^
114******************
115
116 - Edit makedepend.SH. The original version of makedepend.SH produces
1cab015a 117 dependencies that include double backslashes. This can not be
118 processed by Cygwin32's 'make'. Apply the following modification
119 to makedepend.SH to correct these unfortunate filenames:
8736538c 120*******CSW********
121and this, as well \/
122******************
123
124*** makedepend.SH.ORIG Wed Sep 23 09:51:56 1998
125--- makedepend.SH Mon Dec 21 09:27:30 1998
126***************
127*** 100,105 ****
128--- 100,107 ----
129 # for file in `cat /dev/null`; do
130 if [ "$osname" = uwin ]; then
131 uwinfix="-e s,\\\\\\\\,/,g -e s,\\([a-zA-Z]\\):/,/\\1/,g"
132+ elif [ "$archname" = cygwin32 ]; then
133+ uwinfix="-e s,\\\\\\\\,/,g"
134 else
135 uwinfix=
136 fi
137
138 - Edit config_h.SH. The original version of config_h.SH has an bogus
139 #include that gets propagated into the dependency list in Makefile
1cab015a 140 create from the makedepend script. The Apply the following
141 modification to config_h.SH to work around this unfortunate
142 filename:
8736538c 143*******CSW********
144the patch does this, too
145******************
146
147*** config_h.SH.ORIG Wed Oct 28 23:16:10 1998
148--- config_h.SH Mon Dec 21 10:14:28 1998
149***************
150*** 1412,1416 ****
151 #endif
152 #if $cpp_stuff != 1 && $cpp_stuff != 42
153! #include "Bletch: How does this C preprocessor catenate tokens?"
154 #endif
155
156--- 1412,1416 ----
157 #endif
158 #if $cpp_stuff != 1 && $cpp_stuff != 42
159! #include "#Bletch: How does this C preprocessor catenate tokens?"
160 #endif
161
162 The real source of the problem appears that the 'make depend' in the
1cab015a 163 'x2p' directory has problems. The following messages are generated
164 by that 'make depend':
8736538c 165
166 Finding dependencies for hash.o.
167 gcc2: Can't open gcc2
168 ... [similar messages to above]
1cab015a 169 You don't seem to have a proper C preprocessor. Using grep
170 instead.
8736538c 171 Updating GNUmakefile...
172
173 So the grep is pulling the bogus #include from the file. The patch
174 turns the #include'd message into a comment.
175
1cab015a 176 - Run the Configure in the <PERL> directory as described in the
177 document <PERL>/README.cygwin32
8736538c 178
1cab015a 179 I receive the message "THIS PACKAGE SEEMS INCOMPLETE.". This does
180 not appear to be a problem.
8736538c 181
182 When presented with the list of handy defaults, select 'cygwin32'
183
184 You can use the defaults for the remainder of the prompts.
185
186* Building:
187
188 - Issue the command 'make' in the directory <PERL>.
189 Cross fingers, wait and be patient.
190
191*******CSW********
192I didn't see this problem \/
193******************
1cab015a 194 - I experience problems when building two files 'pp_sys.o' &
195 'doio.o'. The build process will crash with a Windows dialog
196 during the build of these two files. The way I get by the problem
197 is to control-C the make and issue the build commands for the two
198 files by hand. In the Perl directory issue the following commands:
8736538c 199
200 `sh cflags libperl.a pp_sys.o` pp_sys.c
201 `sh cflags libperl.a doio.o` doio.c
202
203 This appears to be a problem with Cygwin32's make.
204
205 Hopefully if you follow the instructions above you will experience no
206 problems building Perl.
207
208* Testing:
209
210 I found that the majority of the tests passed. There were no errors
1cab015a 211 that I thought particularly scary. There were several unexpected
212 results such as a couple 'A required .DLL file, CYGWIN1.DLL, was not
213 found' dialogs and 'Perl perform an illegal operation' dialogs.
8736538c 214
215*******CSW********
216saw the "missing dll" during one test
217******************
218
219 As long as I can run all my own scripts, things are fine by me...
220
221 - Renamed or delete the file <PERL>/t/lib/io_sock.t so it will not be
222 executed. This test hangs the system. I have made no attempts to
1cab015a 223 fix the problem. From the <PERL> directory issue the following
224 command:
8736538c 225
226*******CSW********
227I didn't do this, and saw no problems.
228******************
229
230 mv t/lib/io_sock.t t/lib/io_sock.t.ORIG
231
232 - Issue the command 'make test' in the directory <PERL>.
233 Cross fingers, wait and be patient.
234
235* Installing:
236
1cab015a 237 The install seems to work okay. There are problems when install the
238 man pages, but we don't need any stinkin' man pages, right?
8736538c 239
240*******CSW********
1cab015a 241the man pages that didn't install were those that had "::" in their
242filename.
8736538c 243******************
244
245 - Issue the command 'make install' in the directory <PERL>.
246
247Configuration files available by request to perl@morlock.net