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